9.10a1 General Purpose Blocks Feedback #1868
Replies: 5 comments 49 replies
-
Very Cool! I read through the docs here. Is that the current up-to-date version? Of course, a rendered version would be better, but I understand why you wouldn't want to override the current stable version docs. Regarding the two requested points of feedback...
|
Beta Was this translation helpful? Give feedback.
-
Upon reading the tab docs, I noticed that tab 2 in the "new tabbed group" example links to the previous example's tab 2 (instead of switching to the tab). |
Beta Was this translation helpful? Give feedback.
-
One quick thing I immediately noticed – the front matter separator Example # Lorem ipsum
Lorem ipsum dolor sit amet.
/// details | Some summary
---
type: warning
---
Some content
/// Result |
Beta Was this translation helpful? Give feedback.
-
I am biased towards how currently Block markerYou ask for opinions. Well, I feel like Key parametersFenced or unfenced YAML? Neither. I do love YAML, but i feel that having any named/optional parameter specified as yaml metadata in every block type is too verbose. Even more verbose if we finally use fences for that. I feel like key parameters could be better solved inline, like: /// blocktype key=val key2="val with spaces"
content
/// For long parameter lists, still we could give the option to split them in lines by using, for example, the line continuation escaping, which is a common idiom in many languages (not currently supported in /// blocktype \
key=val \
key2="val with spaces"
content
/// I know that, by removing yaml parameters, we left an scenario uncovered: having structured data. But, i feel that they will be the 2% or less of the cases, and we are messing everybody with verbose syntax. If your block type really needs structured data, let block-type authors consider the yaml part of their content. We could even provide them a helper (say Positional parametersRegarding the positional parameters, for me the Both, backslash line continuation and word parameter separation with quoting for spaces are common syntax patterns that many people are used to. Indeed yaml use them. Flag parametersTaking as reference what you can do with /// figure myimage.jpg width=200px nolightbox thumb
This is the **caption**
///
Single line closingWhenever you don't need any content the block gets kind of ugly. /// figure myimage.jpg width=200px nolightbox thumb
/// An idea could be having single line closing if you do not need any content: /// figure myimage.jpg width=200px nolightbox thumb /// Of course, if content is to be indented neither option would be necessary. Escaping closing tagAlso because the content is at the same indentation level, we could end up having some content containing Just some ideas. |
Beta Was this translation helpful? Give feedback.
-
Discussion is moving to the new Alpha 2 discussion thread: #1883. Please use the new thread for further discussions. I will be releasing the alpha 2 shortly. |
Beta Was this translation helpful? Give feedback.
-
Documentation: https://facelessuser.github.io/pymdown-extensions/extensions/blocks/
The purpose of this discussion is to allow feedback for the latest iteration of General Purpose Blocks 9.10.a1. It should be noted that any and all feedback is welcome, but there is a focus on feedback specifically related to syntax. In particular, we have two main points we are hoping to get feedback on, but again, any feedback on syntax is welcome.
Currently, we have two general options that are only available during the alpha (and maybe beta) stage. By the final release, we'd like to remove these options with a permanent solution.
Which is preferred, syntax with
:::
or///
? Currently, the optioncolon_syntax
allows selecting between the current default syntax of///
and the colon syntax (:::
). Which is generally preferred by the community?The new general purpose Blocks extension allows YAML configs in block headers to set per block options. YAML fences are currently optional and can be omitted, but using
require_yaml_fences
can make them mandatory.The thinking is that some people may find including the YAML fences tedious, so allowing them to be optional allows a user not use them, but this requires us to enforce a new line between block headers and block content, headers in this sense meaning the start of the block and the config.
Requiring YAML fences means we can easily identify when there is a config, so no new line is required. This means a user can still add a new line if desired, but if not desired, they can omit it.
Beta Was this translation helpful? Give feedback.
All reactions