From 0ed218067e569c224f470cb2c158abc154224e0f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 19 Oct 2025 17:33:44 +0000 Subject: [PATCH] feat: Add filtering for blog posts by tag and author This commit introduces filtering functionality to the blog page, allowing users to filter posts by tags and authors. It also includes a 'Featured Posts' section. - Adds dropdown menus for tag and author selection. - Uses URL query parameters to apply filters. - Defines 'tags' and 'authors' as taxonomies in the site configuration. --- config.toml | 4 + .../aws-ecs-fargate-vs-self-managed-ec2.md | 2 + content/blog/building-internal-tools.md | 2 + hugo.log | 5 ++ layouts/blog/list.html | 89 ++++++++++++++++++- 5 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 hugo.log diff --git a/config.toml b/config.toml index 8808615..f4b01e7 100644 --- a/config.toml +++ b/config.toml @@ -16,6 +16,10 @@ enableRobotsTXT = false filename = "sitemap.xml" priority = 0.5 +[taxonomies] + tag = "tags" + author = "authors" + [params] # In most cases you will only want to set the google_analytics_id OR the google_tag_manager_id. # If you have Google Analytics included in your GTM tags don't put your GA ID here. diff --git a/content/blog/aws-ecs-fargate-vs-self-managed-ec2.md b/content/blog/aws-ecs-fargate-vs-self-managed-ec2.md index 64aacb8..4effc36 100644 --- a/content/blog/aws-ecs-fargate-vs-self-managed-ec2.md +++ b/content/blog/aws-ecs-fargate-vs-self-managed-ec2.md @@ -1,10 +1,12 @@ --- title: "AWS ECS: FARGATE vs self-managed EC2" authorIds: ["saumitra"] +authors: ["saumitra"] date: 2024-08-13 draft: false featured: true weight: 1 +tags: ["aws", "ecs", "fargate", "ec2"] --- Cooking Up Cloud: Fargate or EC2—Which Kitchen Suits You? diff --git a/content/blog/building-internal-tools.md b/content/blog/building-internal-tools.md index 0daa6da..59a6ffc 100644 --- a/content/blog/building-internal-tools.md +++ b/content/blog/building-internal-tools.md @@ -1,6 +1,7 @@ --- title: "Building internal tooling in legacy systems" authorIds: ["abhishek"] +authors: ["abhishek"] date: 2024-04-11 draft: false featured: true @@ -8,6 +9,7 @@ weight: 1 sitemap: changefreq: 'monthly' priority: 1 +tags: ["engineering", "legacy-systems"] --- diff --git a/hugo.log b/hugo.log new file mode 100644 index 0000000..e95db0e --- /dev/null +++ b/hugo.log @@ -0,0 +1,5 @@ +port 1313 already in use, attempting to use an available port +Watching for changes in /app/{assets,content,data,layouts,static} +Watching for config changes in /app/config.toml +Start building sites … +hugo v0.145.0-666444f0a52132f9fec9f71cf25b441cc6a4f355+extended linux/amd64 BuildDate=2025-02-26T15:41:25Z VendorInfo=gohugoio diff --git a/layouts/blog/list.html b/layouts/blog/list.html index 2ded97d..e5d4697 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -1,6 +1,8 @@ {{ define "body_classes" }}page-services-list{{ end }} {{ define "main" }} +{{ .Scratch.Set "tag" (.Param "tag") }} +{{ .Scratch.Set "author" (.Param "author") }}