-
Notifications
You must be signed in to change notification settings - Fork 233
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
feat: use frontmatter title and description, automatic lists #408
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think automatic lists make sense for things like IPIPs, but for other specs we have we need a mechanism for adjusting the ordering.
Some specs are more meaningful than others. Some build on top of others, and there is certain order that makes sense.
For example, we want:
- IPNS Record specs before we introduuce random routers like PubSub.
- Path Gateway and Trustless Gateway before web ones, additions like _redirects at the very end.
Just to illustrate:
before (meaningful order) | now (not the best) |
---|---|
@hacdias thoughts on potential fixes? my initial suggestion would be to do (B) below:
- (A) use automated list for IPIPs only, other things remain manual (but we leverage title and description from front matter)
- (B) add
hierarchy
value to the front matter, and then create filter tosortByHierarchy
similar to this that adjust order based on the number ifhierarchy
field is present- (0 is the highest, 999 is the lowest, 999 is the implicit default if
hierarchy
is not present in frontmatter) - this will allow us to distinguish between top level specs like IPNS Record and Path Gateway, and always put the at the top
- (0 is the highest, 999 is the lowest, 999 is the implicit default if
B seems the best solution. |
@hacdias maybe call it |
@lidel I added |
disabling as spec-generator uses more advanced logic for fragments and validation happens there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@hacdias mind updating first paragraph of https://specs.ipfs.tech/meta/spec-for-specs/#title-sections to say the title should be in front matter? |
Required before #385.
For this I had to make a small change in spec-generator, which I released: ipfs/spec-generator#13.
It uses
title
anddescription
in frontmatter for rendering. Also description included in meta tags.Automatic listings thanks to the
tags
feature of Eleventy. Ordering within each tag is based on the date field. Couldn't find much information on how to sort by a different field, such as title. For that, we probably have to write our own code, and potentially hard code more things.Also updated the template because it seems we did forget before.