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

Use Hugo's native support for processing HTML & markdown, not file extension testing #906

Open
5 of 8 tasks
chalin opened this issue Feb 24, 2022 · 1 comment
Open
5 of 8 tasks

Comments

@chalin
Copy link
Collaborator

chalin commented Feb 24, 2022

Originally posted by @deining in #526 (comment) :

I just realized that shortcode lead treats its .Inner content either as markdown or as HTML, depending on the extension of the page that makes use of the the shortcode:

{{ if eq .Page.File.Ext "md" }}
    {{ .Inner | markdownify }}
{{ else }}
    {{ .Inner | htmlUnescape | safeHTML }}
{{ end }}

Does it make sense to implement this for shortcode feature in a similar way?

IMHO, that is the wrong way to do it. When using a shortcode, one needs to use either {{< >}} or {{% %}} instead, depending on the content of the shortcode (HTML and markdown, respectively).

If we all agree that this is the way to go, then a number of files will need to be changed (which mostly were introduced by #378 I believe):

Related:

@chalin
Copy link
Collaborator Author

chalin commented Feb 24, 2022

Hey @trombonehero - this issue is a proposal to revert #378, which you submitted a little while back. Might you be willing to give some more details concerning your use case, possibly illustrating why docsy -- prior to #378 -- didn't seem to address your needs? Thanks!

deining added a commit to deining/docsy that referenced this issue Feb 4, 2023
deining added a commit to deining/docsy that referenced this issue Feb 5, 2023
deining added a commit to deining/docsy that referenced this issue Feb 5, 2023
deining added a commit to deining/docsy that referenced this issue Feb 5, 2023
deining added a commit to deining/docsy that referenced this issue Feb 9, 2023
- use Hugo's native support for processing HTML & markdown (google#906)
- drop support for pre-Hugo-0.54.x behavior of {{% %}} google#939
deining added a commit to deining/docsy that referenced this issue Feb 9, 2023
- use Hugo's native support for processing HTML & markdown (google#906)
- drop support for pre-Hugo-0.54.x behavior of {{% %}} google#939
deining added a commit to deining/docsy that referenced this issue Feb 9, 2023
- use Hugo's native support for processing HTML & markdown (google#906)
- drop support for pre-Hugo-0.54.x behavior of {{% %}} google#939
deining added a commit to deining/docsy that referenced this issue Feb 10, 2023
- use Hugo's native support for processing HTML & markdown (google#906)
- drop support for pre-Hugo-0.54.x behavior of {{% %}} google#939
deining added a commit to deining/docsy that referenced this issue Feb 10, 2023
- use Hugo's native support for processing HTML & markdown (google#906)
- drop support for pre-Hugo-0.54.x behavior of {{% %}} google#939
deining added a commit to deining/docsy that referenced this issue Feb 14, 2023
deining added a commit to deining/docsy that referenced this issue Feb 14, 2023
deining added a commit to deining/docsy that referenced this issue Feb 15, 2023
deining added a commit to deining/docsy that referenced this issue Feb 15, 2023
- use Hugo's native support for processing HTML & markdown (google#906)
- drop support for pre-Hugo-0.54.x behavior of {{% %}} google#939
chalin added a commit to deining/docsy that referenced this issue Mar 8, 2023
- use Hugo's native support for processing HTML & markdown (google#906)
- drop support for pre-Hugo-0.54.x behavior of {{% %}} google#939
chalin pushed a commit to deining/docsy that referenced this issue May 4, 2023
deining added a commit to deining/docsy that referenced this issue Jun 11, 2023
- use Hugo's native support for processing HTML & markdown (google#906)
- drop support for pre-Hugo-0.54.x behavior of {{% %}} google#939
deining added a commit to deining/docsy that referenced this issue Jun 11, 2023
- use Hugo's native support for processing HTML & markdown (google#906)
- drop support for pre-Hugo-0.54.x behavior of {{% %}} google#939
deining added a commit to deining/docsy that referenced this issue Nov 20, 2023
- use Hugo's native support for processing HTML & markdown (google#906)
- drop support for pre-Hugo-0.54.x behavior of {{% %}} google#939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant