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 SGML Processing Instructions to pass arguments to render hooks #6670

Closed
bep opened this issue Dec 25, 2019 · 9 comments
Closed

Use SGML Processing Instructions to pass arguments to render hooks #6670

bep opened this issue Dec 25, 2019 · 9 comments

Comments

@bep
Copy link
Member

bep commented Dec 25, 2019

This is just me thinking out loud during Christmas. I kind of like the simplicity of it. The idea is to use SGML Processing Instructions as a way to pass parameters to the new and shiny render hooks in Hugo (images and links).

  • CommonMark has a proposed/experimental syntax for Markdown attributes. Goldmark has implemented it for titles and code blocks, but the Goldmark author have said that it would be "very hard" to implement it as a general thing for all elements.
  • The nice thing about using SGML Processing Instructions is that most Markdown renderers (including GitHub) just ignore them (they will not get rendered).

One example would maybe look like this:

<?params width="400" height="500" ?>
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")

I suggest that we:

  • Agree on 1 instruction name, for now, e.g. params.
  • I think it should work if we just create a stack of length 1 and pop any element into the rendering hook.

/cc @regisphilibert

@bep bep added the Proposal label Dec 25, 2019
@bep bep added this to the v0.63 milestone Dec 25, 2019
@regisphilibert
Copy link
Member

Looks promising in the long term. My feeling though is that Markdown will eventually be just one option among the many #6310 will open to Hugo users. So "roadmap wise" I woudn't put this in front of #6310.

@bep
Copy link
Member Author

bep commented Dec 26, 2019

The road map is also budget constrained. This issue may be easier to finance (cheaper to implement).

@bep bep modified the milestones: v0.63, v0.64 Jan 22, 2020
@bep bep modified the milestones: v0.64, v0.65 Jan 30, 2020
@bep bep modified the milestones: v0.65, v0.66 Feb 18, 2020
@bep bep modified the milestones: v0.66, v0.67 Mar 2, 2020
@bep bep modified the milestones: v0.67, v0.68 Mar 9, 2020
@bep bep modified the milestones: v0.68, v0.69 Mar 20, 2020
@bep bep modified the milestones: v0.69, v0.70 Apr 8, 2020
@bep bep modified the milestones: v0.70, v0.71 Apr 28, 2020
@bep bep modified the milestones: v0.71, v0.72 May 18, 2020
@bep bep modified the milestones: v0.72, v0.73 May 31, 2020
@bep bep modified the milestones: v0.73, v0.74 Jun 23, 2020
@bep bep modified the milestones: v0.74, v0.75 Jul 13, 2020
@bep bep removed this from the v0.75 milestone Sep 14, 2020
@bep bep modified the milestones: v0.111.0, v0.112.0 Feb 15, 2023
@bep bep modified the milestones: v0.112.0, v0.113.0 Apr 15, 2023
@bep bep modified the milestones: v0.113.0, v0.115.0 Jun 13, 2023
@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 4, 2023
@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep modified the milestones: v0.121.0, v0.122.0 Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep closed this as completed Jan 31, 2024
@chalin
Copy link
Contributor

chalin commented Feb 3, 2024

Was this closed because it won't be fixed or because it has been implemented? The text above shows "@bep closed this as completed" but I'm not seeing any linked commit or other information that would give evidence of this feature now being supported. Thanks!

@bep
Copy link
Member Author

bep commented Feb 3, 2024

Was this closed because it won't be fixed or because it has been implemented?

We now have Markdown attributes that solves this:

https://gohugo.io/getting-started/glossary/#markdown-attribute

And yes, I should have commented on this before closing, I sometimes forget that other people watches these issues.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants