In Pelican, how to create a page dedicated to hosting all the blog articles? -
in pelican, default, blog articles listed on index.html file.
what want instead use static page home page , put blog articles on dedicated "blog" page.
how can done?
while there several possible methods achieving desired goals, start following changes settings file:
siteurl = '/blog' output_path = 'output/blog' page_url = '../{slug}.html' page_save_as = '../{slug}.html' display_pages_on_menu = false display_categories_on_menu = false menuitems = [('home', '/'), ('blog', '/blog/')]
put blog posts in content/
usual, , create home page following headers , save content/pages/home.md
:
title: home url: ../ save_as: ../index.html home page.
caveats:
dynamic navigation menu generation has been turned off since doesn't work configuration. highlighting currently-active menu item — feature out-of-the-box — not present in configuration and, if desired, must implemented separately in theme.
if theme's
base.html
template has link site home depends onsiteurl
(e.g., notmyidea theme does), need change link point<a href="/">
instead.
Comments
Post a Comment