'How to make individual index.html file for each category in pelican
I'm new to pelican and I recently made my personal blogs website
- My website link : hosted on github pages
- Source code : on github
website is hosted on
gh-pagesbranch with the help ofghp-import
Here I want to generate custom category welcome/homepage for each category. I don't want to display all the articles of that specific category. I tried this by creating index.html file in the each specific folder of category but it didn't worked. Also searched on SO and found some related answers but I cannot figure out what to do in my case Here are those questions (Mentioning it cos maybe they are helpful) :
- How do I choose a category page to be the home page for a Pelican site?
- How to customize individual category pages in Pelican
- Introduction pages for categories in Pelican
What I want?
- For example, In
Shah-Aayush.github.io/content/notes/category, I don't want to display all the pages reside in this notes category and givingmorebutton to expand and see each category. instead I want to display custom introduction page which isindex.md. so when I click onnotescategory on my website it opens the default generatedhttps://shah-aayush.github.io/category/notes.htmlpage but I want to generatehttps://shah-aayush.github.io/my-notes.htmlpage which is index.md. - Another example : in this profile category, I want to display the contents of
profiles.mdnot displaying all contents reside in profile folder/category the10ff.md,spotify.md,profiles.mdand givingmorebutton to expand each. so what does it display now when I click on profile : https://shah-aayush.github.io/category/profiles.html
What I want it do display when I click profile category : https://shah-aayush.github.io/my-profiles.html
How to achieve this? Thanks in advance :)
Solution 1:[1]
I do not fully understand your question. The Pelican metadata has a field called save_as on the documentation page. I have used this feature on my own website.
https://docs.getpelican.com/en/latest/content.html
On your index.md file, you can have a metadata line like this,
Title: My super title
save_as: my-notes.html
Date: 2010-12-03 10:20
Modified: 2010-12-05 19:30
Category: Python
Tags: pelican, publishing
Slug: my-super-post
Authors: Alexis Metaireau, Conan Doyle
Summary: Short version for index and feeds
The second line will direct Pelican to save the output as my-notes.html.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user3927282 |
