10185 Commits

Author SHA1 Message Date
Bjørn Erik Pedersen
562ad8e969
Add timeZone 2021-12-17 13:19:44 +01:00
Bjørn Erik Pedersen
4bc4821521
Update introduction.md 2021-12-17 12:27:49 +01:00
Bjørn Erik Pedersen
1eb66c758b
news: Add a note about the placement of release notes 2021-12-17 12:25:18 +01:00
Bjørn Erik Pedersen
b2a293abb1
Remove the default archetype template 2021-12-17 12:22:35 +01:00
Bjørn Erik Pedersen
f9837793ca
netlify: Hugo 0.91.0 v0.91.0 2021-12-17 12:19:31 +01:00
Bjørn Erik Pedersen
467256ad5a docs: Regen docs helper 2021-12-17 10:31:08 +01:00
Bjørn Erik Pedersen
68554cf77c Add some basic security policies with sensible defaults
This ommmit contains some security hardening measures for the Hugo build runtime.

There are some rarely used features in Hugo that would be good to have disabled by default. One example would be the "external helpers".

For `asciidoctor` and some others we use Go's `os/exec` package to start a new process.

These are a predefined set of binary names, all loaded from `PATH` and with a predefined set of arguments. Still, if you don't use `asciidoctor` in your project, you might as well have it turned off.

You can configure your own in the new `security` configuration section, but the defaults are configured to create a minimal amount of site breakage. And if that do happen, you will get clear instructions in the loa about what to do.

The default configuration is listed below. Note that almost all of these options are regular expression _whitelists_ (a string or a slice); the value `none` will block all.

```toml
[security]
  enableInlineShortcodes = false
  [security.exec]
    allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']
    osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']

  [security.funcs]
    getenv = ['^HUGO_']

  [security.http]
    methods = ['(?i)GET|POST']
    urls = ['.*']
```
2021-12-16 09:40:22 +01:00
Bjørn Erik Pedersen
4eb10c1a96
Set a sensible maxAge on the image cache 2021-12-12 15:18:21 +01:00
Bjørn Erik Pedersen
2c37f4f898
Update lists.md 2021-12-11 20:31:28 +01:00
Bjørn Erik Pedersen
8690c018fd
Update introduction.md 2021-12-11 18:27:35 +01:00
Bjørn Erik Pedersen
0458c3d887
Update index.md 2021-12-11 16:04:06 +01:00
Bjørn Erik Pedersen
150982f5eb
Update index.md 2021-12-11 16:01:25 +01:00
Bjørn Erik Pedersen
50dc0b6b9d
Update multilingual.md 2021-12-11 15:55:48 +01:00
Bjørn Erik Pedersen
648598090e
Configure image cache to use :cacheDir/images
That should make the Netlify builds faster, now that we don't store the images in Git anymore.
2021-12-11 15:45:23 +01:00
Bjørn Erik Pedersen
4dfb523c31
Update introduction.md 2021-12-11 15:01:02 +01:00
Bjørn Erik Pedersen
b94d42e6f3 Add text to social images 2021-12-11 14:51:05 +01:00
Bjørn Erik Pedersen
d3253d2aa2
Add resources/_gen/images/ to .gitignore
Fixes #1607
2021-12-11 13:40:14 +01:00
Bjørn Erik Pedersen
8a56e1dfd4
Delete resources/_gen/images 2021-12-11 13:36:52 +01:00
Bjørn Erik Pedersen
1521e79b67
Update introduction.md 2021-12-11 00:33:52 +01:00
Bjørn Erik Pedersen
c7110a5971
Update introduction.md 2021-12-10 23:34:08 +01:00
Bjørn Erik Pedersen
f7c4d220f8
Update introduction.md 2021-12-10 23:32:49 +01:00
Bjørn Erik Pedersen
c14ecf1ff9
Update introduction.md 2021-12-10 23:29:23 +01:00
Ian Maddaus
c4b388c202
Fix shortcode in hugo-pipes/introduction (#1605) 2021-12-10 14:01:28 -08:00
Bjørn Erik Pedersen
d9876bd68e
Update introduction.md 2021-12-10 13:44:31 +01:00
Bjørn Erik Pedersen
a39a532d50
Update introduction.md 2021-12-10 13:27:31 +01:00
Bjørn Erik Pedersen
fa8758122d
netlify: Hugo 0.90.1 v0.90.1 2021-12-10 13:08:50 +01:00
Joe Mooring
50cc405704 Update Contribute to Hugo Development
Closes #1600
2021-12-09 11:24:55 +01:00
Joe Mooring
fc98fc82c3
Add .vscode dir to .gitignore (#1602) 2021-12-08 19:44:12 -08:00
Joe Mooring
8f8bcdefc0
Add frontmatter param to code-toggle shortcode (#1601)
Closes #1598
2021-12-08 18:51:26 -08:00
Joe Mooring
f3b432c7c9
Add markdownlint configuration file (#1597)
Closes #1102
2021-12-08 09:00:09 -08:00
Bjørn Erik Pedersen
7ea3aea929
netlify: Bump to 0.90.0 v0.90.0 2021-12-08 11:42:28 +01:00
Bjørn Erik Pedersen
e2b6f990b8 docs: Regenerate docs helper 2021-12-08 08:56:16 +01:00
Bjørn Erik Pedersen
c02259e332 Merge commit '8d9511a08f14260cbfb73119e4afae50e5a9966d' 2021-12-08 08:54:25 +01:00
Joe Mooring
316cec2494
Update future events template example (#1595)
Closes #593
2021-12-07 09:09:40 -08:00
Bjørn Erik Pedersen
2e3573899e Add custom font support to images.Text
Fixes #9253
2021-12-07 16:53:02 +01:00
Paul van Brouwershaven
3186e6458d images: Text filter that draws text with the given options (#9239)
Fixes #9238
2021-12-07 11:29:55 +01:00
Joe Mooring
424f219ebc tpl/transform: Optional options for highlight func
Closes #9249
Fixes gohugoio/hugoDocs#63
2021-12-07 11:26:56 +01:00
Santosh Kumar
3bde7d4897
Install mage outside module (#1592)
* Install mage outside module

Fixes #1591

* Remove extra info

* Use go install instead

mage is not a dependency, and we are only interested in mage executable.

Co-authored-by: Joe Mooring <joe@mooring.com>

Co-authored-by: Joe Mooring <joe@mooring.com>
2021-12-06 10:30:17 -08:00
Joe Mooring
762e27eff1 Clarify ignoreFiles regex matching
Closes #1375
2021-12-06 18:21:39 +01: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
Paul van Brouwershaven
7993f17d02 Implement XML data support
Example:

```
{{ with resources.Get "https://example.com/rss.xml" | transform.Unmarshal }}
    {{ range .channel.item }}
        <strong>{{ .title | plainify | htmlUnescape }}</strong><br />
        <p>{{ .description | plainify | htmlUnescape }}</p>
        {{ $link := .link | plainify | htmlUnescape }}
        <a href="{{ $link }}">{{ $link }}</a><br />
        <hr>
    {{ end }}
{{ end }}
```

Closes #4470
2021-12-02 17:30:36 +01:00
Paul van Brouwershaven
1eb9d34cfd Make resources.Get use a file cache for remote resources
Closes #9228
2021-12-02 12:56:25 +01:00
Joe Mooring
8262b077c6
Improve inline resource examples (#1587) 2021-11-30 08:24:56 -08:00
Paul van Brouwershaven
8a0fffd56d Add remote support to resources.Get
Closes #5255
Supports #9044
2021-11-30 11:49:51 +01:00
Christian Oliff
2eae7c7ec0
fix disqus example name (#1588) 2021-11-30 00:21:29 -08:00
Manny Aparaschivei
a772f48048
Added install instructions for openSUSE Tumbleweed (#1459) 2021-11-29 22:45:12 -08:00
Joe Mooring
7ad1c301bc
Remove screen capture from Hosting on GitHub page (#1586) 2021-11-29 22:13:42 -08:00
Vincent Liao
a58541f495
add more details on about gh-pages and baseURL on hosting-on-github.md (#1346)
* add more details on about gh-pages and baseURL on hosting-on-github.md

* Update content/en/hosting-and-deployment/hosting-on-github.md

Co-authored-by: Shohei Ueda <30958501+peaceiris@users.noreply.github.com>

* Update content/en/hosting-and-deployment/hosting-on-github.md

Co-authored-by: Shohei Ueda <30958501+peaceiris@users.noreply.github.com>

Co-authored-by: Joe Mooring <joe@mooring.com>
Co-authored-by: Shohei Ueda <30958501+peaceiris@users.noreply.github.com>
2021-11-29 22:04:18 -08:00
Joe Mooring
3bd0b46dc5
Update configuration page (#1585)
Add copyright and languageCode entries.

Fixes #1582
Fixes #1583
2021-11-29 21:17:00 -08:00
Joe Mooring
4cf1f013e9 Update OS functions
Corrections and clarifications.
2021-11-27 16:43:58 +01:00