Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRustdoc: Frontmatter Support #16374
Conversation
This comment has been minimized.
This comment has been minimized.
|
Thanks. Even though this isn't wired up to anything yet, I want to get it merged so I can use it for describing metadata, to close out #12466. |
This comment has been minimized.
This comment has been minimized.
|
This seems to require that values are formatted differently than in Jekyll. For example in jekyll you can write
but this looks to be more strongly typed, and require quotes around strings. I'd like to keep rustdoc in conformance with whatever markdown 'standards' already exist. Can this be changed? Is there any spec anywhere for markdown frontmatter? |
This comment has been minimized.
This comment has been minimized.
|
I believe jekyll just uses YAML, we probably don't want to write a full YAML parser (not yet anyway); AIUI, it's very compilcated. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, it's traditionally YAML, which I wanted to stay away from creating a full blown parser. I can definitely change the syntax to be a little looser and follow the jekyll syntax a little more. |
This comment has been minimized.
This comment has been minimized.
|
@brson Did you want strings to only be contained on a single line, or did you want multiline support? |
This comment has been minimized.
This comment has been minimized.
|
@thehydroimpulse sorry for delay. One line strings are probably good enough for me. |
This comment has been minimized.
This comment has been minimized.
|
@brson np. Will do! |
This comment has been minimized.
This comment has been minimized.
|
@brson ping, does this look ok to you? It would be nice to have some comments in the file about this (personal preference) as well! |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton Just need to push my change to be a little like yaml (less strongly typed) per @brson's request. I'll also add some comments! |
thehydroimpulse
closed this
Sep 8, 2014
This comment has been minimized.
This comment has been minimized.
|
Don't have free time anymore, sorry. Feel free to use whatever is here or not. |
thehydroimpulse
referenced this pull request
Aug 12, 2015
Closed
rustdoc needs a way to specify HTML metadata for standalone docs #16178
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton, @brson Should we re-open and merge this as-is? If the lack of comments and need for quotes are a blocker, I can have a go at fixing it up, but I might make it worse Just nudging on this since it seems to be nearly-complete and looks like the path of least resistance to completing #16178. The only merge conflict between this commit and Rust right now is that Git can't figure out where in the list of modules |
This comment has been minimized.
This comment has been minimized.
|
@edunham If the SEO issue is still relevant then it may be worth cleaning up and reposting. We could also consider different approaches to solving the SEO problem, for example by just putting HTML directly into our standalone docs. |
thehydroimpulse commentedAug 9, 2014
This is the initial PR to add frontmatter support. Note that it
currently only supports strings (and booleans) as values. Lists,
integers and such can be added in future PRs.
This doesn't integrate the frontmatter into the rest of rustdoc as I
wanted to get this out there.
/cc @brson