Conversation
docs/guide/custom-styles.qmd
Outdated
| - `mode`: Whether to render the selected metadata item as one | ||
| output file (`one`) or to render each item in the selected | ||
| metadata collection as a separate output file (`many`). |
joelostblom
left a comment
There was a problem hiding this comment.
Looking good! Some suggestions
docs/guide/custom-styles.qmd
Outdated
| your `datapackage.json`. You can choose any variable name in your | ||
| template; we could have chosen `root`, for example, and accessed | ||
| nested properties like `root.title`. The variable name will be | ||
| linked to the template in the `sections.toml` configuration file. |
There was a problem hiding this comment.
I don't understand this part. Why is the variable names not just title, name, etc since these properties are at the top level in the JSON file?
There was a problem hiding this comment.
Is the explanation not clearly written or is it the actual concept of passing package as a "bundle" not clear?
I'm working on the assumption that the jsonpath is $, which selects the root node, that is, the whole object.
docs/guide/custom-styles.qmd
Outdated
| # Specify where the output files should be generated | ||
| output-dir = "docs/" |
There was a problem hiding this comment.
If docs is the default output location, maybe we don't need to set it?
There was a problem hiding this comment.
But is it the default for output_dir? Config suggests that's the cwd. Or are you suggesting that we should change the default to docs?
lwjohnst86
left a comment
There was a problem hiding this comment.
Nice start!! I did a quicker review and will do another one after more of the changes have been made. Two overall things: Use you pronouns rather than we (as it is a guide directed at the reader, as only the reader is involved) and it's sections.toml not .sections.toml as we don't want it hidden in the template/ folder.
| passed to the template as `package`. Double curly brackets `{{{...}}}` | ||
| are used to output the value of a variable or expression. In this | ||
| example, `{{{ package.title or package.name }}}` sets the title of the |
There was a problem hiding this comment.
Need an extra pair because it strips one pair out
Description
This PR adds a guide on custom styles.
Closes #98
Needs a thorough review.
Checklist
just run-all