hugo-notice
hugo-notice copied to clipboard
Some questions
Hi @martignoni . Thank you so much for solving my problem with this repository! Now I'd like to create a PR to make this project better, but there are a few questions I need to ask you about:
- Why is the
notice.html
minified, won't Hugo minify it automatically?
And some non-PR related questions:
- What is "Workaround markdownify inconsistency for single/multiple paragraphs"?
- How to make the shortcode work only on paragraphs, not in e.x. code blocks?
Why is the
notice.html
minified, won't Hugo minify it automatically?
Hugo doesn't minify automatically, only if you ask for it (with --minify
or by post-processing), see https://gohugo.io/commands/hugo/ and https://gohugo.io/hugo-pipes/minification/.
What is "Workaround markdownify inconsistency for single/multiple paragraphs"?
See https://github.com/gohugoio/hugo/issues/5975, e.g. https://github.com/gohugoio/hugo/issues/5975#issuecomment-494746975
How to make the shortcode work only on paragraphs, not in e.x. code blocks?
Don't know, but why? Just do not use it in code blocks (I probably don't see your use case).
Don't know, but why? Just do not use it in code blocks (I probably don't see your use case).
This will prevent me from showing its syntax.
For example showing GitHub alerts syntax:
> [!NOTE]
> Useful information that users should know, even when skimming content.
In the paragraph looks like:
[!NOTE] Useful information that users should know, even when skimming content.
But when I showing shortcode syntax, it won't show the source code in the code block. Instead, it shows the rendered look.
What does your hugo code looks like when doing this?
What does your hugo code looks like when doing this?
source code:
## Test
```
{{< notice warning >}}
This is a warning notice. Be warned!
{{< /notice >}}
```
{{< notice warning >}}
This is a warning notice. Be warned!
{{< /notice >}}
Hugo doesn't minify automatically, only if you ask for it (with --minify or by post-processing), see https://gohugo.io/commands/hugo/ and https://gohugo.io/hugo-pipes/minification/.
I have an opinion, would it be possible to not minify the files, but rather have the user minify them at build time (this is what now I do), as the source code is just too hard to read and develop.
Would it be possible to not minify the files, but rather have the user minify them at build time
I think this makes sense. Please make a PR for it!
What does your hugo code looks like when doing this?
Did you try this: https://github.com/gohugoio/hugo/issues/11054#issuecomment-1572295424?
Would it be possible to not minify the files, but rather have the user minify them at build time
I think this makes sense. Please make a PR for it!
See https://github.com/martignoni/hugo-notice/pull/36
Thank you for the PRs. I've finally had time to review them.