Skip to content

Upgrade to latest Hugo #5418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a22b92e
Upgrade to use Hugo ~latest
cnunciato Mar 9, 2021
d779dbb
Don't double-render in a chooser
cnunciato Mar 11, 2021
aabb2c4
Remove the `md` shortcode
cnunciato Mar 11, 2021
e41c529
Remove langchoose
cnunciato Mar 11, 2021
8879fda
Linting fixes
cnunciato Mar 11, 2021
53ba4be
Handle examples (with a sample of the doc-gen changes we'll need to m…
cnunciato Mar 11, 2021
508d7ef
Remove unused shortcodes
cnunciato Mar 11, 2021
d2ecc0d
Fix Deploy the Changes | Kubernetes
cnunciato Mar 11, 2021
b00af51
Fix Download and Install
cnunciato Mar 11, 2021
1a61fa4
An example of what we'll need to do to fix tutorials
cnunciato Mar 11, 2021
9bafbea
Fix Create a Kubernetes Control Plane
cnunciato Mar 12, 2021
010b378
Fix Importing Infrastructure
cnunciato Mar 12, 2021
785d3f2
Fix Azure Kubernetes Service (AKS) - Hello World!
cnunciato Mar 12, 2021
20e6de5
Fix Try Out the Cluster
cnunciato Mar 12, 2021
9f545d9
Fix Configure Kubernetes Cluster Defaults
cnunciato Mar 12, 2021
bd7fba0
Fix Deploy Kubernetes Cluster Services
cnunciato Mar 12, 2021
ae87a1a
Deploy Kubernetes Apps
cnunciato Mar 12, 2021
bbf3c95
Unit Testing
cnunciato Mar 12, 2021
a4762ec
Fix API Reference index
cnunciato Mar 12, 2021
4f06ad5
Regenerate resource docs
cnunciato Mar 12, 2021
277057e
Add a note to the components/shortcodes README
cnunciato Mar 12, 2021
dd2d7c3
Regenerate the tutorials
cnunciato Mar 12, 2021
81ad82e
Fix up the blog posts with choosers
cnunciato Mar 12, 2021
03df289
Fix up the blog posts with minor rendering issues
cnunciato Mar 12, 2021
0484e43
Update the README
cnunciato Mar 12, 2021
7b27cfc
Add missing providers, script adjustments
cnunciato Mar 13, 2021
0e93e59
Regenerate with skipped providers
cnunciato Mar 13, 2021
4d9fc82
Final lil' papercuts
cnunciato Mar 13, 2021
89fe7a4
Regenerate azure-native
cnunciato Mar 13, 2021
239cbf0
Pass md .Inner to markdownify
cnunciato Mar 13, 2021
fac6c36
Regenerate with the notes adjustments
cnunciato Mar 13, 2021
9d6a208
Add a line
cnunciato Mar 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.55.4'
hugo-version: '0.81.0'
extended: true

- name: Install assume-role
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,8 @@ The following commands use the package manager, [Homebrew](https://brew.sh/).

##### Install Hugo

If you already have Hugo installed, uninstall it:

```bash
brew uninstall hugo
```

Install Hugo v0.55.4:

```bash
brew install pulumi/tap/hugo@0.55.4
brew install hugo
```

##### Install Go
Expand Down
78 changes: 76 additions & 2 deletions components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,25 @@ Similarly:

```
{{< chooser cloud "aws,azure,gcp" >}}

{{% choosable cloud aws %}}

Some AWS stuff.

{{% /choosable %}}

{{% choosable cloud azure %}}

Some Azure stuff.

{{% /choosable %}}

{{% choosable cloud gcp %}}

Some GCP stuff.

{{% /choosable %}}

{{< /chooser >}}
```

Expand All @@ -199,8 +209,72 @@ Some GCP stuff.

A few things to note:

* The `choosable` shortcode **renders Markdown automatically**. You don't need use the
`md` shortcode to do that anymore. (So please don't, and thank you!)
* Pay attention to how you nest `chooser` and `choosable` shortcodes. [Hugo shortcodes](https://gohugo.io/content-management/shortcodes/) work with both
`<>` and `%%` delimiters, but the two behave very differently: `%` will cause content to be
Markdown-rendered, `<` and `>` will not. So for example:

```
{{< some-shortcode >}}

This content will *not* be rendered as Markdown.

{{< /some-shortcode >}}

{{% some-shortcode %}}

This content *will* be.

{{% /some-shortcode %}}
```

You need to be careful about double-rendering, though. For example, this is okay: the outer
container won't be rendered as Markdown, but the inner children will be.

```
{{< some-parent >}}

<some-component>
Just some regular HTML, here.
</some-component>

{{% some-child %}}
[Some Markdown]("http://some-link").
{{% /some-child %}}

{% some-child %}}
[Some more Markdown]("http://some-link").
{{% /some-child %}}

{{< /some-parent >}}
```

If you did this, however:

```
{{% some-parent %}}

<some-component>
Just some regular HTML, here.
</some-component>

{{% some-child %}}
[Some Markdown]("http://some-link").
{{% /some-child %}}

{% some-child %}}
[Some more Markdown]("http://some-link").
{{% /some-child %}}

{{% /some-parent %}}
```

... the nested shortcodes would be rendered twice -- first by virtue of their being
wrapped in a `%`-delimited shortcode, and then a second time when the parent's content
is rendered itself. Sometimes this turns out okay, but if you're rendering source code,
where indentation matters, you can wind up with some terrible results.

So as a rule, avoid nesting `%`-delimited shortcodes. Decide which shortcode will be responsible
for rendering, and use `%`s on that one, `<>`s on descendants.

* The containing `div`s emitted by the `chooser` and `choosable` shortcodes are
intentional and in most cases required, because the template renderers we're using today
Expand Down
22 changes: 19 additions & 3 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ timeout = 300000
[outputs]
home = ["HTML"]
section = ["HTML"]
taxonomy = ["HTML"]

[taxonomies]
author = "authors"
Expand All @@ -40,8 +39,25 @@ timeout = 300000
authors = "/blog/author/:slug/"
tags = "/blog/tag/:slug/"

[blackfriday]
fractions = false
[markup.goldmark]
[markup.goldmark.extensions]
definitionList = true
footnote = true
linkify = true
strikethrough = true
table = true
taskList = true
typographer = true
[markup.goldmark.parser]
autoHeadingID = true
autoHeadingIDType = "github"
[markup.goldmark.parser.attribute]
block = false
title = true
[markup.goldmark.renderer]
hardWraps = false
unsafe = true
xhtml = false

[params]
canonicalURL = "https://www.pulumi.com"
Expand Down
Loading