Commit Graph
10491 Commits
Author SHA1 Message Date
Bjørn Erik Pedersen cb998b3d6f Add page fragments support to Related
The main topic of this commit is that you can now index fragments (content heading identifiers) when calling `.Related`.

You can do this by:

* Configure one or more indices with type `fragments`
* The name of those index configurations maps to an (optional) front matter slice with fragment references. This allows you to link
page<->fragment and page<->page.
* This also will index all the fragments (heading identifiers) of the pages.

It's also possible to use type `fragments` indices in shortcode, e.g.:

```
{{ $related := site.RegularPages.Related .Page }}
```

But, and this is important, you need to include the shortcode using the `{{<` delimiter. Not doing so will create infinite loops and timeouts.

This commit also:

* Adds two new methods to Page: Fragments (can also be used to build ToC) and HeadingsFiltered (this is only used in Related Content with
index type `fragments` and `enableFilter` set to true.
* Consolidates all `.Related*` methods into one, which takes either a `Page` or an options map as its only argument.
* Add `context.Context` to all of the content related Page API. Turns out it wasn't strictly needed for this particular feature, but it will
soon become usefil, e.g. in #9339.

Closes #10711
Updates #9339
Updates #10725
2023-02-21 17:56:41 +01:00
Bjørn Erik Pedersen 4c0b5a0b53 dos: Regen CLI docs 2023-01-17 12:52:53 +01:00
Bjørn Erik Pedersen 05d9db7055 docs: Regen docshelper 2023-01-17 12:52:08 +01:00
Bjørn Erik Pedersen f73bdb6e58 Merge commit 'ef6f101e75256c3bb88a6f1f3b5c1273bf8d7382' 2023-01-17 12:51:46 +01:00
Bjørn Erik Pedersen 2943c031ab Add fill HTTP Response info into .Data in resources.GetRemote
See #10604
2023-01-16 14:44:15 +01:00
Regis Philibert 1214f6ffbf Document cleanDestinationDir configuration setting 2023-01-14 12:21:03 -05:00
Joe Mooring 27ca65463c Clarify .Page.Param method (#1953) 2023-01-11 13:06:41 -08:00
Jacob Zhong 3fa1792d24 Document the usage of hardWrap option for markdown rendering (#1951) 2023-01-10 17:29:39 -08:00
Bjørn Erik Pedersen 8b5afdfb47 Update theme 2023-01-09 13:05:31 +01:00
Oliver Kamer 207e7f0a05 fix docs for getting remote font
Doesn't work with `resources.Get`, need to use `.GetRemote`
2023-01-09 12:44:07 +01:00
Josh Payne 1f7094b9e6 Correct typo
Updates usage.md to correct a small typo on line 123. Changing "When are ready to deploy your site, run:" to "When you are ready to deploy your site, run:".
2023-01-06 08:35:56 -08:00
Arun Mani J f9d6445c4d Added missing / in URL generator (#1946)
* Added missing `/` in URL generator

In the example to render tags and topics, we use:
```html
<a href="{{ "tags" | absURL }}{{ . | urlize }}">
```
But this will produce links like `www.example.com/tagsTerm`  where `Term` is a tag. So added the missing `/`.

* Updated the tags and topics listing code

The example previously used the old `with .Params.tags` style. Updated it to use `.GetTerms "tags"` style.
2023-01-01 23:29:31 -08:00
Joe Mooring 3a22ee7d6e Remove translations
The english content remains in content/en.
2022-12-30 14:45:10 +01:00
Bjørn Erik Pedersen b3b900f3fc Update introduction.md 2022-12-24 15:46:41 +01:00
Karl Keefer aca440052e rm Forestry - facing end-of-life shortly (#1944) 2022-12-24 22:56:26 +09:00
Bjørn Erik Pedersen af0014e146 Update scss-sass.md 2022-12-23 12:20:04 +01:00
Bjørn Erik Pedersen 1c43bbbc91 Merge branch 'docs/goworkspace' 2022-12-23 12:12:44 +01:00
Bjørn Erik Pedersen d034175ca6 netlify: Hugo 0.109.0 2022-12-23 12:12:19 +01:00
Bjørn Erik Pedersen d3a6a5c3fa Merge branch 'tempv0.109.0' 2022-12-23 12:11:36 +01:00
Bjørn Erik Pedersen e033dbeadc docs: Regen docs helper JSON 2022-12-23 10:15:48 +01:00
Septs 452bf675ce resource/page: Add Page.Ancestors
Fixes #10567
2022-12-23 10:14:53 +01:00
Bjørn Erik Pedersen 12edd7363c Add some docs for workspaces 2022-12-23 09:31:36 +01:00
Bjørn Erik Pedersen 8f0fcba6bd Add HUGO_PUBLISHDIR to the Node environment
So you can do  `process.env.HUGO_PUBLISHDIR` in your `postcss.config.js` to figure out where Hugo publishes
its files.

Note that the value will always be an absolute file path and will point to a directory on disk even when running `hugo server` in memory mode.

If you write to this folder from PostCSS when running the server, you could run the server with one of these flags:

```
hugo server --renderToDisk
hugo server --renderStaticToDisk
```

Fixes #10554
2022-12-22 12:43:50 +01:00
Bjørn Erik Pedersen 4e66d98adf Update theme 2022-12-20 17:09:22 +01:00
Bjørn Erik Pedersen 808aee6f64 config: Update to ga v4 2022-12-20 17:09:22 +01:00
Bjørn Erik Pedersen 1de2bc5a90 config: Update to ga v4 2022-12-20 17:03:25 +01:00
Bjørn Erik Pedersen ddb5fd6b04 Merge commit '41bc6f702aa54200530efbf4267e5c823df3028d' 2022-12-20 11:04:41 +01:00
Bjørn Erik Pedersen 2c0125b529 Remove .Site.Author
I will eventually deprecate and remove this.
2022-12-19 21:48:25 +01:00
Bjørn Erik Pedersen 54c54bf765 modules: Adjust watch logic vs workspace use definitions 2022-12-19 20:17:33 +01:00
Ivan Duka 2cf8841b35 Update partialCached.md (#1924)
* Update partialCached.md

Clarifying mechanics of `partialCached`

* incorporating jmooring's feedback
2022-12-18 21:06:26 -08:00
385487191b Update data-templates.md (#1926)
Co-authored-by: jafaican <118852541+jafaican@users.noreply.github.com>
Co-authored-by: Joe Mooring <joe.mooring@veriphor.com>
2022-12-18 17:56:11 -08:00
Joe Mooring ce207e1416 Remove redundant markdown and fix a few typos (#1936) 2022-12-18 16:54:18 -08:00
Joe Mooring 3687c29534 Make heading id linkable, take 2 2022-12-18 16:20:28 -08:00
Joe Mooring 45c79bea70 Make heading id linkable 2022-12-18 16:16:11 -08:00
TokiNoKawa b220793447 Delete duplicates the lines 557-569 and 570-582. (#1934)
`## 404 Server Error Page" is duplicated between lines 557-569 and 570-582.
So, lines 570-582 should be deleted.
2022-12-18 16:12:52 -08:00
Joe Mooring 0a90dc1224 Rework the taxonomy variables page (#1935)
Closes #1933
2022-12-18 16:03:49 -08:00
Bjørn Erik Pedersen 7f8979c50c Update theme 2022-12-17 13:25:31 +01:00
Joe Mooring 26e682a3aa Update multilingual.md
Remove outdated admonition.
2022-12-16 07:16:20 -08:00
Joe Mooring d40e7693ff Update postcss.md 2022-12-14 09:50:37 -08:00
Joe Mooring 375d75c013 Update postcss npm instructions (#1931) 2022-12-13 17:24:47 -08:00
Joe Mooring 63020094ad Emphasize Window shell selection (#1930)
Closes #1928
2022-12-13 12:57:54 -08:00
Bjørn Erik Pedersen 56824be2cc Update configuration.md 2022-12-13 17:06:38 +01:00
Andreas Deininger b7b8f16b34 Docu 'Theme components': minor fix (#1929) 2022-12-10 07:15:40 -08:00
Sergio Carlavilla 09dc81a05a Remove Docker from BSD page (#1927)
Docker does not support any BSD
2022-12-06 07:11:03 -08:00
Bjørn Erik Pedersen 205fea204a netlify: Hugo 0.108.0 2022-12-06 15:05:26 +01:00
Bjørn Erik Pedersen 6abe49c28f Merge commit 'da670c38ee63a7fef25e2b9f42519232055b60dc' 2022-12-06 10:42:36 +01:00
Bjørn Erik Pedersen 2201ac0e5f Update theme 2022-12-06 10:41:41 +01:00
Bjørn Erik Pedersen 12b59a4c57 docs: Add basic doc for wrapStandAloneImageWithinParagraph etc.
See #10492
2022-12-05 16:50:47 +01:00
Bjørn Erik Pedersen ba07bd9707 dartsass: Add sourceMapIncludeSources option 2022-12-05 16:36:45 +01:00
Randy Burden 4c1309cdfe Fix broken link to front matter page (#1923) 2022-11-25 21:31:51 -08:00