Commit Graph

365 Commits

Author SHA1 Message Date
Joe Mooring 4cd505612e Simplify news listing 2023-08-13 15:10:25 -07:00
Joe Mooring e8d744951e Populate news section via GitHub releases API
- Keeps the news section fresh
- Displays last 20 releases
- One API call per build, so we shouldn't be rate-limited
- Removes old articles
- Includes content from news section (if any), date sorted with releases

Closes #1816
2023-08-08 09:17:34 +02:00
Bjørn Erik Pedersen 420f7aa698 Add all config to docshelper.json
Also consolidate so the mediaTypes and outputFormats are listed once only.

Fixes #11328
2023-08-07 13:42:54 +02:00
Joe Mooring bc53ea5ce5 Use sentence-style capitalization for headings 2023-07-13 09:55:39 -07:00
Joe Mooring 73197046fb Change config.xxx to hugo.xxx throughout the documentation (#2090)
- Updates copy
- Updates code-toggle shortcode
2023-05-23 20:53:44 -07:00
Bjørn Erik Pedersen 91eb442754 Some more about 0.112.0 2023-05-23 09:05:25 +02:00
Joe Mooring 944e274304 Replace output shortcode calls 2023-04-03 11:50:31 -07:00
Joe Mooring 3afac22fc1 Refactor code shortcode 2023-04-03 11:50:31 -07:00
Joe Mooring ffe5d39b94 Remove duplicate shortcodes 2023-04-03 11:50:31 -07:00
Joe Mooring fb33bf59bd Update code-toggle shortcode
Simplify bool param logic
2023-03-27 15:05:07 -07:00
JB eddd25ff46 Mermaid: reflect latest docs specifications
MermaidJS now specifies to write chart's markdown within a `pre` HTML tag to improve semantics.
2023-02-27 11:35:33 +01:00
JB b2a23b6f5d Mermaid: switch to ESM import 2023-02-27 11:35:33 +01:00
Bjørn Erik Pedersen 874db199db Hide the news stripe on front page for now 2022-11-24 15:27:04 +01:00
Joe Mooring 71e81ec5f6 Remove asciicast from site 2022-11-21 10:19:45 +01:00
Joe Mooring b04a4b32e2 Make CLI command summaries meaningful (#1886)
Closes #109
2022-11-11 21:38:50 -08:00
Bjørn Erik Pedersen 00cbe3f2fc Check for nil Chroma .Aliases 2022-06-16 10:43:56 +02:00
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