Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting metadata for auto-generated pages? #52

Open
DonKult opened this issue Oct 18, 2020 · 2 comments
Open

Setting metadata for auto-generated pages? #52

DonKult opened this issue Oct 18, 2020 · 2 comments
Assignees
Labels
usability Makes staticsite easier to use and explain

Comments

@DonKult
Copy link
Contributor

DonKult commented Oct 18, 2020

Lets say I want to include the blog/archive page in the navbar, how best to set e.g. nav_title for this page given that it is auto-generated?

I can create the page manually, but that produces a) a warning for replacing a page and b) it has only an effect for the page itself, others still use the (not available) metadata of the auto-generated page.

Beside, it is also a bit strange that the archive page has the same title as the page they are an archive for. For taxonomies you can at least control the title (in theory, this seems broken in practice?), but again no dice for other metadata like nav_title.

(I am using/adding my own metadata fields left and right, so having a generic solution would be nice, but I guess that is features territory.)

@spanezz spanezz added the usability Makes staticsite easier to use and explain label Aug 27, 2021
@spanezz
Copy link
Owner

spanezz commented Aug 27, 2021

In theory directory metadata could be used for that. I wonder if they work for things like archived pages?

Reference: doc/reference/contents.md

@spanezz
Copy link
Owner

spanezz commented Dec 16, 2022

You should be able, in the front matter of blog.md where you define syndication: <something>, to do something like this:

syndication:
  archive:
     nav_title: My nav title

Staticsite 2.0 should have better documentation for these kinds of things: https://github.com/spanezz/staticsite/blob/refactor/staticsite/features/syndication.py#L254

@spanezz spanezz self-assigned this Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usability Makes staticsite easier to use and explain
Projects
None yet
Development

No branches or pull requests

2 participants