adityatelange / hugo-PaperMod

A fast, clean, responsive Hugo theme.
https://adityatelange.github.io/hugo-PaperMod/
MIT License
9.72k stars 2.62k forks source link

Added a "categories" page for further categorization #1490

Closed woadey closed 5 months ago

woadey commented 5 months ago

What does this PR change? What problem does it solve? Creates a new tab for "categories". This allows users to have groupings of posts (sort of like a folder) that can be navigated, rather than having to go through the "posts" tab or the "tags" tab.

Users simply create a folder called "categories" under "content". The _index.md file within the "categories" folder will be used to configure that page.

For creating each category page, just create folders (and their _index.md files) within the "categories" folder like so:

content
└── categories
│  └────  foo/ 
│  │  └────  _index.md  
│  └────  bar/ 
│  │  └────  _index.md  
│  └────  foobar/ 
│  │  └────  _index.md  
│  └────  _index.md 

Posts can be assigned to categories just as they would be for tags or keywords:

---
title: 'Example Post'
categories: ["PRs"]
tags: ["new thing"]
keywords: []
---

Was the change discussed in an issue or in the Discussions before? No

PR Checklist

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

adityatelange commented 5 months ago

Request you to discuss changes before you open PRs.