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

Notes release notes 0.100 #9934

Closed
bep opened this issue May 26, 2022 · 3 comments · Fixed by #9945
Closed

Notes release notes 0.100 #9934

bep opened this issue May 26, 2022 · 3 comments · Fixed by #9945
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented May 26, 2022

.RenderString with shortcodes

And finally, you can now use shortcodes in the strings pased to .RenderString See #6703 for more information.

Indentation fixes for shortcode blocks

We now record the indentation before the opening shortcode tag when parsing the source. This allow us to fix a couple of annoying issues in Hugo:

  1. We have added a new .InnerIndent method to the shortcode context to prevent the highlight shortcode from including in the indentation as part of the code block. See Indented highlight shortcode brings in the indentation as part of the code block #4717.
  2. Hugo now preserves the indentation for shortcode blocks. See more below.

A shortcode block is when the shortcode is included as the first non-whitespace content on a line. Note that this does not touch shortcodes with inner content, where the user is in control of the indentation. See issue #9946 for more information. An example, say that I have this in layouts/shortcodes/mylist.md:

* Culpa enim incididunt fugiat id dolore velit laboris veniam minim.
* Tempor ex nisi labore ad elit laborum ex ullamco aute labore eu occaecat. 
* Deserunt mollit aliqua est laboris et irure eu non. 
* Consectetur nulla minim non reprehenderit Lorem elit dolore quis.

And then use that shortcode in a content file:

* My List
  {{% mylist %}}

In earlier versions of Hugo the above would render as:

image

Now it renders as:

image

Note that in the example above we use the md file suffix for the shortcode. In this release we also added Markdown as a built-in output format in Hugo, defined as a plain text format, meaning you get more lenient parsing compared to HTML. Using this if your shortcode produces Markdown has fewer quirks. See #9821.

resources.Copy

{{ $resized := $image.Resize "400x400" |  resources.Copy "images/mynewname.jpg" } }}
<img src="{{ $resized.RelPermalink }}">
@bep bep self-assigned this May 26, 2022
@bep bep added this to the v0.100.0 milestone May 26, 2022
bep added a commit to bep/hugo that referenced this issue May 28, 2022
It has been deprecated for a long time, its v1 version is not maintained anymore, and there are many known issues. Goldmark should be
a mature replacement by now.

Closes gohugoio#9934
bep added a commit to bep/hugo that referenced this issue May 28, 2022
It has been deprecated for a long time, its v1 version is not maintained anymore, and there are many known issues. Goldmark should be
a mature replacement by now.

Closes gohugoio#9934
@bep bep closed this as completed in #9945 May 29, 2022
bep added a commit that referenced this issue May 29, 2022
It has been deprecated for a long time, its v1 version is not maintained anymore, and there are many known issues. Goldmark should be
a mature replacement by now.

Closes #9934
@bep bep reopened this May 30, 2022
@bep bep pinned this issue May 30, 2022
@kaushalmodi
Copy link
Contributor

Does it mean that it fixes #4717 as well?

@bep
Copy link
Member Author

bep commented May 30, 2022

Does it mean that it fixes #4717 as well?

I don't know.

@bep bep modified the milestones: v0.100.0, v0.101.0 May 31, 2022
@bep bep closed this as completed Jun 1, 2022
@jmooring jmooring unpinned this issue Jun 2, 2022
@github-actions
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 Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants