Skip to content

docs: 📝 add guide about custom styles#109

Open
martonvago wants to merge 5 commits intomainfrom
docs/custom-styles
Open

docs: 📝 add guide about custom styles#109
martonvago wants to merge 5 commits intomainfrom
docs/custom-styles

Conversation

@martonvago
Copy link
Contributor

Description

This PR adds a guide on custom styles.

Closes #98

Needs a thorough review.

Checklist

  • Formatted Markdown
  • Ran just run-all

Comment on lines 313 to 315
- `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`).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove if we want this change

@martonvago martonvago moved this from Todo to In Review in Iteration planning Feb 11, 2026
@martonvago martonvago marked this pull request as ready for review February 11, 2026 10:54
@martonvago martonvago requested a review from a team as a code owner February 11, 2026 10:54
Copy link
Contributor

@joelostblom joelostblom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Some suggestions

Comment on lines 177 to 180
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 260 to 261
# Specify where the output files should be generated
output-dir = "docs/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If docs is the default output location, maybe we don't need to set it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@github-project-automation github-project-automation bot moved this from In Review to In Progress in Iteration planning Feb 11, 2026
Copy link
Member

@lwjohnst86 lwjohnst86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +106 to +108
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need an extra pair because it strips one pair out

@martonvago martonvago moved this from In Progress to In Review in Iteration planning Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Guide on making customised styles

3 participants