Conversation
| cards.platforms.cloud_rc.web_server, | ||
| cards.account.code_rc_create, | ||
| ) | ||
| }} | indent(4) |
There was a problem hiding this comment.
Is the text “indent(4)” a command? Or was this text just typed by mistake?
There was a problem hiding this comment.
The | indent(4) ensures the text coming from the Jinja {{ }} block is indented by 4 spaces. All content under a markdown block environment (such as the === tabs) must be indent by 4 spaces relative to the block environment.
The | indicates we want to pipe the output of the previous command renderer.render_cards() through the indent() command.
The indent() command comes from the MultiLineInclude Jinja extension, installed in build_env.yml and referenced in mkdocs.yml. Jinja doesn't do a good job of allowing multi-line content to be indented consistently, and over the last 15+ years they have never improved it. So, someone wrote an extension that handles this situation.
Jinja is most often used in HTML, where indentation has no semantic meaning. We're using Jinja in markdown, where indentation has a definite semantic meaning, indicating what content is contained within a markdown block environment. So, we MUST have correct multiline indentation when importing.
These are the kinds of things that need to be in the contributor guide.
There was a problem hiding this comment.
OK, this issue was that "| indent(4)" was outside the Jinja expression and was therefore rendered as plain text when I run mkdocs serve. Placing it inside the expression:
)| indent(4))
}}
resolves the issue.
…red endpoint not ideal but it will do
|
Everything looks good to me. Let’s move the |
Pull Request
Intent
A demonstration of what grids and grid cards, content tabs, and macros are capable of. The goal of this set of changes is to simplify our documentation's presentation and reduce the cognitive load of readers, while important making content easier to discover.
Proposed Changes
index.mdres/announcements.ymlhelp/support.mdaccount_managementsection of the documentationaccountfor shorter URLsmkdocs-macrospluginmkdocs-table-reader-pluginfor compatibility withmkdocs-macrosbuild_env.ymlfor compatibility fixes/docs/_macro/(using jinja2)/macros/(grid card engine using YAML data)_templatedirectories with jinja2 templates supporting the documentation in the same directoryresto_resfor better visibilityimagesto_imgfor better visibility{% raw %}blocks where necessary to avoid unexpected jinja2 template interpretationres/grid_cards.ymlChanges to Section Headers
There are many, we will need to carefully review the changes.
Changes to Page URLs
There are many, we will need to carefully review the changes.
Related or Fixed Issues
Related to #858, #1094, #1095,
Accessibility Checklist
I have ensured all of the following for new or changed content:
Style Checklist
I have done all of the following:
mkdocs.ymlfor any moved headers or pages.