From ce88c4d0bcdebe9eb0052572702b3eda18b2b0f7 Mon Sep 17 00:00:00 2001 From: Stuart Reilly Date: Wed, 8 Oct 2025 16:03:47 +0100 Subject: [PATCH 01/81] Split main page into columns, add 3rd featured post, split metadata onto two lines --- README.md | 17 +++++-- _includes/featured_post.html | 49 ++++++++++++++++++++ _includes/featured_posts.html | 78 +++++++++----------------------- _includes/post_index.html | 34 +++++++------- _includes/post_metadata.html | 2 +- _includes/post_summary.html | 4 +- _includes/post_summary_list.html | 4 +- scss/_featured-posts.scss | 2 +- scss/_post-index.scss | 5 +- shell/docker-dev-watch.sh | 2 +- style.css | 2 +- 11 files changed, 111 insertions(+), 88 deletions(-) create mode 100644 _includes/featured_post.html diff --git a/README.md b/README.md index d33bc152ed..6c46bea314 100644 --- a/README.md +++ b/README.md @@ -127,16 +127,18 @@ gem update gem install jekyll bundler nokogiri ``` -Thirdly, configure Bundler to store project dependencies in `vendor/bundle`, and, -when in the root directory of your clone of the blog, install the project dependencies. - +Optionally, configure Bundler to store project dependencies in `vendor/bundle` ```shell bundle config path vendor/bundle +``` + +When in the root directory of your clone of the blog, install the project dependencies. +```shell cd PATH/TO/BLOG bundle install ``` -Finally, run `jekyll -v` to check whether Jekyll is working. If so, you're good to run the blog! +Finally, run `bundle exec jekyll -v` to check whether Jekyll is working. If so, you're good to run the blog! #### Running in the native environment @@ -146,8 +148,9 @@ Navigate to the root directory of your clone of the blog and execute Jekyll usin ```shell bundle exec jekyll serve ``` +See [jekyll's docs](https://jekyllrb.com/docs/configuration/options/) for command line flags. -The blog will then be available on [localhost][localhost]. +The blog will then be available on [localhost:4000](http://localhost:4000). If you are working on fixes or new features, and need to re-compile the scripts or SCSS, you can use these npm scripts: @@ -157,6 +160,10 @@ npm run scripts npm run style ``` +##### Useful Command Line Flags +* `--livereload` - trigger a build on file change (excluding SCSS or JS) and refresh the brower once built +* `--incremental` - use the experimental incremental build mode which after the initial build, only builds changed files + ### Running with Docker Use a bash-compatible shell; Git bash on Windows should work fine. diff --git a/_includes/featured_post.html b/_includes/featured_post.html new file mode 100644 index 0000000000..e1f183b227 --- /dev/null +++ b/_includes/featured_post.html @@ -0,0 +1,49 @@ +{% assign post = include.post %} +{% assign shape = include.shape %} + +
+
{% include category_display.html post = post %}
+

+ {{ post.title }} + {% include post_summary_social.html post=post %} +

+
{{ post.summary | truncatewords:25 }}
+ +
+
+ + {% if shape == nil %} + {% capture shape %}{% include post_shape.html post=post %}{% endcapture %} + {% assign shape = shape | strip %} + {% endif %} + {% case shape %} + {% when "shape1" %} + + + + {% when "shape2" %} + + + + {% when "shape3" %} + + + + {% when "shape4" %} + + + + {% else %} + + + + {% endcase %} + {% if post.image and post.featuredImage %} + {% capture image-path %}{{ site.baseurl }}/{{post.image}}{% endcapture %} + thumbnail of post: '{{post.title}}' + {% endif %} +
\ No newline at end of file diff --git a/_includes/featured_posts.html b/_includes/featured_posts.html index 8b673a21ff..592b3008a1 100644 --- a/_includes/featured_posts.html +++ b/_includes/featured_posts.html @@ -1,62 +1,28 @@ {% if include.categoryName == "Latest Articles" %} - {% assign featuredPosts = site.tags.featured %} + {% assign featuredPosts = site.tags.featured %} {% else %} - {% assign featuredPosts = '' | split: '' %} - {% for post in include.postsToFilter %} - {% if post.tags contains 'featured' %} - {% assign featuredPosts = featuredPosts | push: post %} - {% endif %} - {% endfor %} + {% assign featuredPosts = '' | split: '' %} + {% for post in include.postsToFilter %} + {% if post.tags contains 'featured' %} + {% assign featuredPosts = featuredPosts | push: post %} + {% endif %} + {% endfor %} {% endif %} {% assign numPosts = featuredPosts | size %} -{% if numPosts >= 2 %} -