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

Docs: shortcodes: Mention argument parens are mandatory #1752

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

philpax
Copy link
Contributor

@philpax philpax commented Feb 6, 2022

IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.

The place to discuss new features is the forum: https://zola.discourse.group/
If you want to add a new feature, please open a thread there first in the feature requests section.

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

I wanted to create an aside shortcode to decouple content structuring from its HTML rendering (trying to keep HTML out of my Markdown), and was struggling to figure out why my shortcode wasn't rendering.

An unrelated search for something else brought me here, which ended up solving my problem for me. Figured I'd bring it across to the docs for the next poor sap to come by! 😆

@@ -130,6 +131,29 @@ A quote
The body of the shortcode will be automatically passed down to the rendering context as the `body` variable and needs
to be on a new line.

### Shortcodes with no arguments
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is that necessary with the paragraph change above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Having an example of an arguments-less shortcode instantiation will help people who are skimming the page.

I personally tried copying the body example, deleted the arguments, and was wondering why it wasn't working; I figure that there will be others like me.

@Keats Keats merged commit 542daa7 into getzola:master Feb 7, 2022
thomasantony pushed a commit to thomasantony/zola that referenced this pull request Sep 17, 2022
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.

2 participants