Commit Graph

349 Commits

Author SHA1 Message Date
Christian Oliff 4c5edacfee cSpell config update (#1700) 2022-04-08 10:43:49 +09:00
Joe Mooring 34f3167b79 Update image processing (#1625) 2022-03-25 06:09:41 -07:00
Brennan Angel 29180e4d2a add .html suffix to partial usage and references 2022-03-09 09:06:13 +01:00
Yannic Haupenthal 94660c34b6 add missing %s 2022-03-03 15:54:06 +01:00
Yannic Haupenthal 325de15e22 fix link to latest release note
since the release notes were moved to GitHub:
https://gohugo.io/news/no-more-releasenotes-here/
2022-03-03 15:54:06 +01:00
Bjørn Erik Pedersen 64ac75367a Adjust diagram docs 2022-02-28 10:50:52 +01:00
Bjørn Erik Pedersen 849a8437fb Merge commit 'c1398b91a9f4c67876b31feb67516b252e654d3c' 2022-02-28 10:37:27 +01:00
Bjørn Erik Pedersen f33ba4e5a7 CodeblockContext method renames
Fixes #9577
2022-02-27 17:59:36 +01:00
Bjørn Erik Pedersen 979b479686 Move the Goat template to the correct place
Updates #7765
2022-02-25 00:09:07 +01:00
Bjørn Erik Pedersen 2df37e9e80 Add Markdown diagrams and render hooks for code blocks
You can now create custom hook templates for code blocks, either one for all (`render-codeblock.html`) or for a given code language (e.g. `render-codeblock-go.html`).

We also used this new hook to add support for diagrams in Hugo:

* Goat (Go ASCII Tool) is built-in and enabled by default; just create a fenced code block with the language `goat` and start draw your Ascii diagrams.
* Another popular alternative for diagrams in Markdown, Mermaid (supported by GitHub), can also be implemented with a simple template. See the Hugo documentation for more information.

Updates #7765
Closes #9538
Fixes #9553
Fixes #8520
Fixes #6702
Fixes #9558
2022-02-24 18:59:50 +01:00
Luke Rijk de Waal e8d5180116 requires -> require typo fix (#1666) 2022-02-23 09:15:13 -08:00
John Elliott bd8037d432 Allow images to be cropped without being resized
Introduces the Crop method for image processing which implements gift.CropToSize. Also allows a smartCrop without resizing, and updates the documentation.

Fixes #9499
2022-02-23 10:01:50 +01:00
Bjørn Erik Pedersen 778503ca8f Merge commit 'a8e9fc699a6ff7d578f97a7c553ce844efad8fdb' 2022-01-12 08:16:35 +01:00
Bjørn Erik Pedersen 2d2401c915 docs: Add dependency table to maintainance page
See #8949
2022-01-11 21:57:37 +01:00
Bjørn Erik Pedersen 948d6d69d9 layouts: Use .File.Path 2022-01-04 13:55:21 +01:00
Joe Mooring 8f8bcdefc0 Add frontmatter param to code-toggle shortcode (#1601)
Closes #1598
2021-12-08 18:51:26 -08:00
Joe Mooring 4d00320512 Add id attribute to h2 elements (#1590)
Prior to this change, it was not possible to link to headings. For
example, this link wasn't functional:

functions/lang/#langformatnumber
2021-12-04 19:40:52 -08:00
Joe Mooring 2d0f38978b Remove blank lines from code-toggle output (#1564) 2021-11-04 07:10:53 -07:00
Bjørn Erik Pedersen 198cdf8f04 tpl/lang: Add new localized versions of lang.FormatNumber etc.
Fixes #8820
2021-07-29 16:40:06 +02:00
Bjørn Erik Pedersen ef73ffc3bc Misc config loading fixes
The main motivation behind this is simplicity and correctnes, but the new small config library is also faster:

```
BenchmarkDefaultConfigProvider/Viper-16         	  252418	      4546 ns/op	    2720 B/op	      30 allocs/op
BenchmarkDefaultConfigProvider/Custom-16        	  450756	      2651 ns/op	    1008 B/op	       6 allocs/op
```

Fixes #8633
Fixes #8618
Fixes #8630
Updates #8591
Closes #6680
Closes #5192
2021-06-14 17:00:32 +02:00
Salim B 0c8f2dcb13 Avoid scratch usage 2021-05-03 21:08:23 +02:00
Salim B 696fa92e11 Rename scratch var 2021-05-03 21:08:23 +02:00
Salim B 44193f267d Update usage instructions 2021-05-03 21:08:23 +02:00
Salim B 4230f8fa54 Rename and refactor shortcode 2021-05-03 21:08:23 +02:00
Salim B e9953751ec Strip leading whitespaces 2021-05-03 21:08:23 +02:00
Salim B d61a580103 Add insertpages shortcode
This is an improvement over the `readfiles` shortcode in that it allows to insert content files that contain shortcodes themselves.

This new shortcode is used to fix a regression introduced in https://github.com/gohugoio/hugoDocs/pull/1442 (`new-in` shortcode was not rendered as intended).
2021-05-03 21:08:23 +02:00
Joe Mooring fce835fead Trim newlines from .Inner in the 'code' shortcode
Closes #1437
2021-05-01 00:46:18 +02:00
Joe Mooring 363251a517 Improve presentation of template lookup order (#1382)
Closes #1374
2021-04-14 21:33:50 -07:00
Jessica Huynh 223b80f420 Fix page kinds shortcode not rendering on Taxonomies page (#1158)
* remove trailing space after "terms" in page-kinds shortcode

* use % style shortcode to render page-kinds markdown table
2020-06-25 15:09:56 +09:00
Bjørn Erik Pedersen e9596b2ee1 Merge branch 'temp73' 2020-06-23 19:05:46 +02:00
Christian Oliff 73c31758e0 Fix for broken link again (#1151) 2020-06-18 19:15:17 +09:00
max-re d070672951 Fix broken link (#1144) 2020-06-18 19:10:11 +09:00
Bjørn Erik Pedersen bc0b484d1b Rename taxonomy kinds from taxonomy to term, taxonomyTerm to taxonomy
And we have taken great measures to limit potential site breakage:

* For `disableKinds` and `outputs` we try to map from old to new values if possible, if not we print an ERROR that can be toggled off if not relevant.
* The layout lookup is mostly compatible with more options for the new `term` kind.

That leaves:

* Where queries in site.Pages using taxonomy/taxonomyTerm Kind values as filter.
* Other places where these kind value are used in the templates (classes etc.)

Fixes #6911
Fixes #7395
2020-06-18 09:09:56 +02:00
Bjørn Erik Pedersen ded74f0982 Add Goldmark as the new default markdown handler
This commit adds the fast and CommonMark compliant Goldmark as the new default markdown handler in Hugo.

If you want to continue using BlackFriday as the default for md/markdown extensions, you can use this configuration:

```toml
[markup]
defaultMarkdownHandler="blackfriday"
```

Fixes #5963
Fixes #1778
Fixes #6355
2019-11-23 14:12:24 +01:00
Bjørn Erik Pedersen d087cf3068 Update image docs for 0.58 2019-09-04 17:33:09 +02:00
Bjørn Erik Pedersen 9d6ac714de Fix shortcode 2019-07-27 17:35:00 +02:00
Bjørn Erik Pedersen cfda93bc34 Update gomodules-info.html 2019-07-25 19:53:38 +02:00
Bjørn Erik Pedersen 3fdb45b3cd docs: Add Hugo Modules docs 2019-07-25 13:21:30 +02:00
Rodolfo Carvalho de7ab636bc Use actual width in image processing examples
The image processing examples are rendered within containers with a
'nested-img' parent CSS class, which by default makes images responsive
by resizing them to the size of their containers.

That doesn't work well for the examples as the small images end up
stretched.

Since there can be other images in the same 'nested-img' context, we
keep that class in the parent and set the example images width to auto,
such that they will render with their actual size.

On small screens, larger images will still be sized down via the
max-width property.

Fixes #812
2019-06-18 17:02:21 +02:00
Bjørn Erik Pedersen 0f2bf195ef Adjust shortcodes for 0.55
Took the easy approach.

Fixes #783
2019-04-09 12:33:09 +02:00
Bjørn Erik Pedersen 5ea938ad60 Remove some Scratch 2018-08-29 11:03:31 +02:00
Bjørn Erik Pedersen 8da3572409 Content and images for the 5th birthday blog post 2018-07-04 13:07:31 +02:00
Bjørn Erik Pedersen 772a26f842 Fix source link on maintainance 2018-05-16 21:25:17 +02:00
Bjørn Erik Pedersen c5a5250a1b Use the new go-html-template Chroma lexer 2018-04-02 15:07:01 +02:00
Bjørn Erik Pedersen 2de831f4b9 Add the full list of Chroma lexers 2018-04-02 14:44:35 +02:00
Kaushal Modi 6bfc17cfcb Update few links to now point to gohugoio organization repos
Ref: https://github.com/gohugoio/hugoDocs/issues/6
2018-03-16 16:03:32 -04:00
Bjørn Erik Pedersen 7cfd530d24 Revise the archetype docs
Fixes #11
2018-03-07 11:12:28 +01:00
Bjørn Erik Pedersen fad6a25dda maintenance: Show last 30 2018-02-12 22:18:05 +01:00
Bjørn Erik Pedersen 0bd5121250 Improve the Netlify versioning docs 2018-02-12 09:31:14 +01:00
Bjørn Erik Pedersen bf93a46eaa maintenance: Add TODO list
And add the section to the menu.
2018-02-11 16:15:06 +01:00