Commit Graph
14054 Commits
Author SHA1 Message Date
Bjørn Erik Pedersen e83141f88d Format config 2023-01-17 12:12:37 +01:00
Bjørn Erik Pedersen 4cadf795ef Rename config.toml -> hugo.toml 2023-01-17 12:11:34 +01:00
Bjørn Erik Pedersen c8aa8617f1 Move config/_default/config.toml -> config.toml
I will do a new rename in a minute, but my take on this now is that:

* Every site should have a hugo.toml (or yaml,json) file.
* In most simple setups, I would limit the use of the /config folder to environment specific things.
2023-01-17 12:09:45 +01:00
Bjørn Erik Pedersen c6b3887696 config/security: Add O\w+ (e.g. GOROOT) to the default allowed list
Fixes #10429
2023-01-17 10:52:51 +01:00
Bjørn Erik Pedersen 21af5b359f Preserve front matter slice value types (e.g. int)
Fixes #10624
2023-01-17 08:58:05 +01:00
Bjørn Erik Pedersen f38a2fbd2e Make hugo.toml the new config.toml
Both will of course work, but hugo.toml will win if both are set.

We should have done this a long time ago, of course, but the reason I'm picking this up now is that my VS Code setup by default picks up some
JSON config schema from some random other software which also names its config files config.toml.

Fixes #8979
2023-01-16 15:34:16 +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
Bjørn Erik Pedersen 6a579ebac3 Add fill HTTP Response info into .Data in resources.GetRemote
See #10604
2023-01-16 14:44:15 +01:00
Bjørn Erik Pedersen f13531e608 Fix HEAD method in resources.GetRemote
Fixes #10604
2023-01-16 14:44:15 +01:00
Bjørn Erik Pedersen b5d485060f Fix order when reading custom headers in resources.GetRemote
Fixes #10616
2023-01-16 14:44:15 +01:00
Bjørn Erik Pedersen 6e9fa9e0fd deps: Upgrade github.com/evanw/esbuild v0.15.18 => v0.17.0
Also add a test to make sure legal comments are preserved in JS bundles.

Closes #10536
2023-01-16 14:41:13 +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 c4f3a46ce6 Update README.md 2023-01-09 14:13:30 +01: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
Bjørn Erik Pedersen fbc3e08c64 resource: Fix Go Doc vs .Data.Integrity 2023-01-07 10:58:34 +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
Bjørn Erik Pedersen e402d91ee1 Misc doc, code refactoring to improve documentation 2023-01-04 18:01:26 +01:00
Bjørn Erik Pedersen 3c51625c71 Make readFile return nil when file not found (note)
Fixes #9620
2023-01-04 18:01:26 +01:00
Omar Kohl dd6d0a6de1 Remove reference to Goreleaser in code comment
Hugo no longer uses the Goreleaser tool.
2023-01-03 20:25:44 +01:00
acclassic f95fd57aac tpl/compare: Sort special float values as string
When sorting strings a worng order is returned. This happens because the strings are first converted
to floating values to check whether or not they should be sorted as
floating values. When an error is returned the strings will be
handled as string literals.
No error will be returned when parsing Inf, Infinity or NaN (case insensitive) because they
will be coverted to special floating point values and therefore are
legal float values.
Now we check if the returned converted values are special floating
values and treat them as string literals.

Fixes #10389
2023-01-02 17:35:08 +01: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 e754d5cb3e tpl/diagrams: Move Goat to its own file 2022-12-25 14:02:22 +01:00
Bjørn Erik Pedersen 002cd52807 Update CONTRIBUTING.md 2022-12-24 15:53:27 +01:00
Bjørn Erik Pedersen a76c405d40 Update CONTRIBUTING.md 2022-12-24 15:49:00 +01:00
Bjørn Erik Pedersen c0a03a2a39 Update README.md 2022-12-24 15:48:45 +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
hugoreleaser e127d3e5c6 releaser: Prepare repository for 0.110.0-DEV
[ci skip]
2022-12-23 10:50:52 +00:00
hugoreleaser 47b12b83e6 releaser: Bump versions for release of 0.109.0
[ci skip]
2022-12-23 10:38:11 +00:00
Bjørn Erik Pedersen 180dfeba03 Adjust "you need the extended version" error message 2022-12-23 10:33:49 +01:00
Bjørn Erik Pedersen e033dbeadc docs: Regen docs helper JSON 2022-12-23 10:15:48 +01:00
Bjørn Erik Pedersen 10bb29d7f3 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 eb0c8f9d02 resource/page: Slight adjustment of Page.Ancestors
Fixes #10567
2022-12-23 10:14:53 +01:00
Septs 3a216186b2 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
dependabot[bot] 7874b96815 build(deps): bump golang.org/x/tools from 0.3.0 to 0.4.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-23 09:26:10 +01:00
Joe Mooring 71832328f8 Annotate test assertions 2022-12-22 18:53:12 +01:00
Joe Mooring 37ab1cf12a hugolib: Exclude non-linkable pages from translations map
Fixes #9073
2022-12-22 18:53:12 +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 59af05cabc 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
Joe Mooring 4989da653d Revert "tpl/tplimpl: Use https in sitemap templates"
This reverts commit 3fd0b78498.
2022-12-22 08:53:58 +01:00