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

Documents the body_class parameter #1541

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

fekete-robert
Copy link
Collaborator

@fekete-robert fekete-robert commented Jun 6, 2023

Just ran into that while looking for a way to add custom attributes to the body tag (which doesn't seem to be possible, so I'll open a separate PR for that).

Anyway, this PR documents #774 and fixes #778

@chalin

Preview: https://deploy-preview-1541--docsydocs.netlify.app/docs/adding-content/lookandfeel/#adding-custom-class-to-the-body-element

@fekete-robert
Copy link
Collaborator Author

Thanks a lot for the review, I've updated the doc based on your comments.

Copy link
Collaborator

@chalin chalin left a comment

Choose a reason for hiding this comment

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

Thanks for this @fekete-robert. See inline comments.

userguide/content/en/docs/adding-content/lookandfeel.md Outdated Show resolved Hide resolved
userguide/content/en/docs/adding-content/lookandfeel.md Outdated Show resolved Hide resolved
<body class="td-section">
```

Sometimes it's useful to assign custom classes to a page, or to an entire section, for example, to apply custom styling. To do so, add the `body_class` parameter to the frontmatter of your page. The value of the parameter will be then added to the class attribute of your page's body element.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please line-wrap all long paragraphs in this delta.

Also:

  • "will be then" --> "will then be"

fekete-robert and others added 2 commits July 2, 2024 12:55
Co-authored-by: Patrice Chalin <chalin@users.noreply.github.com>
Co-authored-by: Patrice Chalin <chalin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document body_class page param
3 participants