-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support for content layouts in Markdown #1981
base: main
Are you sure you want to change the base?
Conversation
CSS as UGC may be desirable as it allows users to define custom layouts independently. Since Funnel is designed to segment permissions at the account and project level, custom stylesheets can be located at either level (TBD as a separate ticket). Within the Markdown parser, this can be supported by enabling the attrs plugin with a custom validator:
|
Image or image gallery embeds could use the container plugin for image(s) + caption. Typical layouts:
::: splash-image
![Alt text](/path/to/image)
![Second image creates a carousel](/path/to/image)
Caption _with_ Markdown markup
::: ::: gallery
![Alt text](/path/to/image)
![Both images appear as clickable thumbnails](/path/to/image)
Caption _with_ Markdown markup
::: These blocks are parsed as Markdown and the container markup ( |
The Attribution plugin upgrades a regular blockquote to add a source citation if the last line is prefixed with |
Candidate syntax for >-> Summary here
> Details here Output: Summary hereDetails hereDefault output without the extension:
|
Markdown offers this syntax for images, but with no control over size or positioning:
Markdown extensions like the attrs plugin offer a flexible syntax for attaching HTML attributes, allowing for layout control with CSS:
But this is unsafe for UGC websites because user-content can use system CSS classes and ids that mimic the system itself or interfere with system functionality. In addition, stylesheets are part of code and are version controlled independently from content, so this content is not archival-safe. Markup in Markdown should be semantic markup, and semantic styles should be well defined and supported long term. This PR attempts to define and support some common content patterns by enabling existing plugins in restricted contexts. Discussion in comments.