Skip to content

Commit

Permalink
Merge commit '26f1458a2df6b55eee3a5de46f5fec23a43a7c7d'
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jan 5, 2020
1 parent 7cac590 commit 61d5400
Show file tree
Hide file tree
Showing 62 changed files with 57 additions and 64 deletions.
3 changes: 0 additions & 3 deletions .github/calibre/image-actions.yml

This file was deleted.

2 changes: 1 addition & 1 deletion content/en/content-management/image-processing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ menu:

## The Image Page Resource

The `image` is a [Page Resource]({{< relref "/content-management/page-resources" >}}), and the processing methods listed below does not work on images inside your `/static` folder.
The `image` is a [Page Resource]({{< relref "/content-management/page-resources" >}}), and the processing methods listed below do not work on images inside your `/static` folder.

To get all images in a [Page Bundle]({{< relref "/content-management/organization#page-bundles" >}}):

Expand Down
Binary file modified content/en/content-management/image-processing/sunset.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion content/en/functions/RenderString.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ signature: [".RenderString MARKUP"]

`.RenderString` is a method on `Page` that renders some markup to HTML using the content renderer defined for that page (if not set in the options).

*Note* that this method does not parse and render shortcodes.

The method takes an optional map argument with these options:

display ("inline")
Expand All @@ -34,4 +36,4 @@ Some examples:
```


**Note** that this method is more powerful than the similar [markdownify](functions/markdownify/) function as it also supports [Render Hooks](/getting-started/configuration-markup/#markdown-render-hooks) and it has options to render other markup formats.
**Note** that this method is more powerful than the similar [markdownify](/functions/markdownify/) function as it also supports [Render Hooks](/getting-started/configuration-markup/#markdown-render-hooks) and it has options to render other markup formats.
8 changes: 7 additions & 1 deletion content/en/functions/ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Looks up a content page by logical name.
godocref:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
lastmod: 2019-12-28
categories: [functions]
menu:
docs:
Expand All @@ -29,6 +29,12 @@ aliases: []
`ref` looks up Hugo "Regular Pages" only. It can't be used for the homepage, section pages, etc.
{{% /note %}}

It is also possible to pass additional arguments to link to another language or an alternative output format. Therefore, pass a map of arguments instead of just the path.

```
{{ ref . (dict "path" "about.md" "lang" "ja" "outputFormat" "rss") }}
```

These functions are used in two of Hugo's built-in shortcodes. You can see basic usage examples of both `ref` and `relref` in the [shortcode documentation](/content-management/shortcodes/#ref-and-relref).

For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/).
8 changes: 7 additions & 1 deletion content/en/functions/relref.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Looks up a content page by relative path.
godocref:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
lastmod: 2019-12-28
categories: [functions]
menu:
docs:
Expand All @@ -29,6 +29,12 @@ aliases: []
`relref` looks up Hugo "Regular Pages" only. It can't be used for the homepage, section pages, etc.
{{% /note %}}

It is also possible to pass additional arguments to link to another language or an alternative output format. Therefore, pass a map of arguments instead of just the path.

```
{{ relref . (dict "path" "about.md" "lang" "ja" "outputFormat" "rss") }}
```

These functions are used in two of Hugo's built-in shortcodes. You can see basic usage examples of both `ref` and `relref` in the [shortcode documentation](/content-management/shortcodes/#ref-and-relref).

For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/).
2 changes: 1 addition & 1 deletion content/en/functions/safeURL.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ This partial would produce the following HTML output:
</ul>
{{< /output >}}

The odd output can be remedied by adding ` | safeURL` to our `.Title` page variable:
The odd output can be remedied by adding ` | safeURL` to our `.URL` page variable:

{{< code file="layouts/partials/correct-url-sidebar-menu.html" copy="false" >}}
<!-- This unordered list may be part of a sidebar menu -->
Expand Down
14 changes: 6 additions & 8 deletions content/en/getting-started/configuration-markup.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ Note that this is only supported with the [Goldmark](#goldmark) renderer.

These Render Hooks allow custom templates to render links and images from markdown.

You can do this by creating templates with base names `render-link` and/or `render-image` inside `layouts/_default`.
You can do this by creating templates with base names `render-link` and/or `render-image` inside `layouts/_default/_markup`.

You can define [Output Format](/templates/output-formats) and [language](/content-management/multilingual/) nspecific templates if needed.[^hooktemplate] Your `layouts` folder may look like this:
You can define [Output-Format-](/templates/output-formats) and [language-](/content-management/multilingual/)specific templates if needed.[^hooktemplate] Your `layouts` folder may look like this:

```bash
layouts
└── _default
└── markup
└── _markup
├── render-image.html
├── render-image.rss.xml
└── render-link.html
Expand Down Expand Up @@ -122,19 +122,17 @@ Text
PlainText
: The plain variant of the above.

A Markdown example for a inline-style link with title:
A Markdown example for an inline-style link with title:

```md
[Text](https://www.gohugo.io "Title")
```

A very simple template example given the above:

{{< code file="layouts/_default/render-link.html" >}}
<a href="{{ .Destination | safeURL }}"{{ with .Title}}title="{{ . }}"{{ end }}>{{ .Text }}{{ with .Page }} (in page {{ .Title }}){{ end }}"</a>
{{< code file="layouts/_default/_markup/render-link.html" >}}
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text }}</a>
{{< /code >}}

(look in the page bundle, inside `/assets` etc.) and [transform](/content-management/image-processing) images.

[^hooktemplate]: It's currently only possible to have one set of render hook templates, e.g. not per `Type` or `Section`. We may consider that in a future version.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion content/en/getting-started/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ Hugo installed via Snap can write only inside the user’s `$HOME` directory---a

sudo apt-get install hugo

This installs the "extended" Sass/SCSS version.
What this installs depends on your Debian/Ubuntu version. On Ubuntu bionic (18.04), this installs the non-extended version without Sass/SCSS support. On Ubuntu disco (19.04), this installs the extended version with Sass/SCSS support.

This option is not recommended because the Hugo in Linux package managers for Debian and Ubuntu is usually a few versions behind as described [here](https://github.com/gcushen/hugo-academic/issues/703)

Expand Down
40 changes: 14 additions & 26 deletions content/en/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ It is recommended to have [Git installed](https://git-scm.com/downloads) to run
For other approaches learning Hugo like book or a video tutorial refer to the [external learning resources](/getting-started/external-learning-resources/) page.
{{% /note %}}



## Step 1: Install Hugo

{{% note %}}
Expand All @@ -44,10 +42,8 @@ To verify your new install:
hugo version
```


{{< asciicast ItACREbFgvJ0HjnSNeTknxWy9 >}}


## Step 2: Create a New Site

```bash
Expand All @@ -58,33 +54,32 @@ The above will create a new Hugo site in a folder named `quickstart`.

{{< asciicast 3mf1JGaN0AX0Z7j5kLGl3hSh8 >}}


## Step 3: Add a Theme

See [themes.gohugo.io](https://themes.gohugo.io/) for a list of themes to consider. This quickstart uses the beautiful [Ananke theme](https://themes.gohugo.io/gohugo-theme-ananke/).

First, download the theme from Github and add it to your site's `theme` directory:

```bash
cd quickstart

# Download the theme
git init
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
# Note for non-git users:
# - If you do not have git installed, you can download the archive of the latest
# version of this theme from:
# https://github.com/budparr/gohugo-theme-ananke/archive/master.zip
# - Extract that .zip file to get a "gohugo-theme-ananke-master" directory.
# - Rename that directory to "ananke", and move it into the "themes/" directory.
# End of note for non-git users.

# Edit your config.toml configuration file
# and add the Ananke theme.
echo 'theme = "ananke"' >> config.toml
```

*Note for non-git users:*
- If you do not have git installed, you can download the archive of the latest
version of this theme from:
https://github.com/budparr/gohugo-theme-ananke/archive/master.zip
- Extract that .zip file to get a "gohugo-theme-ananke-master" directory.
- Rename that directory to "ananke", and move it into the "themes/" directory.

{{< asciicast 7naKerRYUGVPj8kiDmdh5k5h9 >}}
Then, add the theme to the site configuration:

```bash
echo 'theme = "ananke"' >> config.toml
```

{{< asciicast 7naKerRYUGVPj8kiDmdh5k5h9 >}}

## Step 4: Add Some Content

Expand All @@ -107,15 +102,12 @@ draft: true

```


## Step 5: Start the Hugo server

Now, start the Hugo server with [drafts](/getting-started/usage/#draft-future-and-expired-content) enabled:

{{< asciicast BvJBsF6egk9c163bMsObhuNXj >}}



```
▶ hugo server -D
Expand All @@ -140,12 +132,10 @@ Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
```


**Navigate to your new site at [http://localhost:1313/](http://localhost:1313/).**

Feel free to edit or add new content and simply refresh in browser to see changes quickly (You might need to force refresh in webbrowser, something like Ctrl-R usually works).


## Step 6: Customize the Theme

Your new site already looks great, but you will want to tweak it a little before you release it to the public.
Expand All @@ -167,12 +157,10 @@ Replace the `title` above with something more personal. Also, if you already hav
**Tip:** Make the changes to the site configuration or any other file in your site while the Hugo server is running, and you will see the changes in the browser right away, though you may need to [clear your cache](https://kb.iu.edu/d/ahic).
{{% /note %}}


For theme specific configuration options, see the [theme site](https://github.com/budparr/gohugo-theme-ananke).

**For further theme customization, see [Customize a Theme](/themes/customizing/).**


### Step 7: Build static pages

It is simple. Just call:
Expand Down
12 changes: 6 additions & 6 deletions content/en/hosting-and-deployment/hosting-on-render.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ linktitle: Host on Render
description: Host your Hugo site for free with Render's global CDN, fully-managed SSL and auto deploys from GitHub.
date: 2019-06-06
publishdate: 2019-06-06
lastmod: 2019-06-21
lastmod: 2020-01-01
categories: [hosting and deployment]
keywords: [render,hosting,deployment]
authors: [Anurag Goel]
Expand All @@ -25,7 +25,7 @@ toc: true

Static sites are **completely free** on Render and include the following:

- Continuous, automatic builds & deploys from GitHub.
- Continuous, automatic builds & deploys from [GitHub](https://render.com/docs/github) and [GitLab](https://render.com/docs/gitlab).
- Automatic SSL certificates through [Let's Encrypt](https://letsencrypt.org).
- Instant cache invalidation with a lightning fast, global CDN.
- Unlimited collaborators.
Expand All @@ -38,28 +38,28 @@ Static sites are **completely free** on Render and include the following:

## Assumptions

* You have an account with GitHub.
* You have an account with GitHub or GitLab.
* You have completed the [Quick Start][] or have a Hugo website you are ready to deploy and share with the world.
* You have a Render account. You can sign up at https://render.com/register.

## Deployment

You can set up a Hugo site on Render in two quick steps:

1. Create a new **Web Service** on Render, and give Render permission to access your GitHub repo.
1. Create a new **Web Service** on Render, and give Render permission to access your GitHub/Gitlab repo.
2. Use the following values during creation:

Field | Value
------------------- | -------------------
**Environment** | `Static Site`
**Build Command** | `hugo --gc --minify` (or our own build command)
**Build Command** | `hugo --gc --minify` (or your own build command)
**Publish Directory** | `public` (or your own output directory)

That's it! Your site will be live on your Render URL (which looks like `yoursite.onrender.com`) as soon as the build is done.

## Continuous Deploys

Now that Render is connected to your repo, it will **automatically build and publish your site** any time you push to GitHub.
Now that Render is connected to your repo, it will **automatically build and publish your site** any time you push to your GitHub/Gitlab.

You can choose to disable auto deploys under the **Settings** section for your site and deploy it manually from the Render dashboard.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions content/en/news/0.62.0-relnotes/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@

---
date: 2019-12-23
title: "0.62.0"
description: "0.62.0"
title: "Hugo Christmas Edition!"
description: "Hugo 0.62 brings Markdown Render Hooks. And it's faster!"
categories: ["Releases"]
---

From all of us to all of you, a **very Merry Christmas** -- and Hugo `0.56.0`! This version brings [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks). This gives you full control over how links and images in Markdown are rendered without using any shortcodes. With this, you can get Markdown links that work on both GitHub and Hugo, resize images etc. It is a very long sought after feature, that has been hard to tackle until we got [Goldmark](https://github.com/yuin/goldmark/), the new Markdown engine, by [@yuin](https://github.com/yuin). When you read up on this new feature in the documentation, also note the new [.RenderString](https://gohugo.io/renderstring/) method on `Page`.
From all of us to all of you, a **very Merry Christmas** -- and Hugo `0.62.0`! This version brings [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup/#markdown-render-hooks). This gives you full control over how links and images in Markdown are rendered without using any shortcodes. With this, you can get Markdown links that work on both GitHub and Hugo, resize images etc. It is a very long sought after feature, that has been hard to tackle until we got [Goldmark](https://github.com/yuin/goldmark/), the new Markdown engine, by [@yuin](https://github.com/yuin). When you read up on this new feature in the documentation, also note the new [.RenderString](https://gohugo.io/functions/renderstring/) method on `Page`.

Adding these render hooks also had the nice side effect of making Hugo **faster and more memory** effective. We could have just added this feature on top of what we got, getting it to work. But you like Hugo's fast builds, you love instant browser-refreshes on change. So we had to take a step back and redesign how we detect "what changed?" for templates referenced from content files, either directly or indirectly. And by doing that we greatly simplified how we handle all the templates. Which accidentally makes this version **the fastest to date**. It's not an "every site will be much faster" statement. This depends. Sites with many languages and/or many templates will benefit more from this. We have benchmarks with site-building showing about 15% improvement in build speed and memory efficiency.
Adding these render hooks also had the nice side effect of making Hugo **faster and more memory effective**. We could have just added this feature on top of what we got, getting it to work. But you like Hugo's fast builds, you love instant browser-refreshes on change. So we had to take a step back and redesign how we detect "what changed?" for templates referenced from content files, either directly or indirectly. And by doing that we greatly simplified how we handle all the templates. Which accidentally makes this version **the fastest to date**. It's not an "every site will be much faster" statement. This depends. Sites with many languages and/or many templates will benefit more from this. We have benchmarks with site-building showing about 15% improvement in build speed and memory efficiency.

This release represents **25 contributions by 5 contributors** to the main Hugo code base.[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@gavinhoward](https://github.com/gavinhoward), [@niklasfasching](https://github.com/niklasfasching), and [@zaitseff](https://github.com/zaitseff) for their ongoing contributions. And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) and [@onedrawingperday](https://github.com/onedrawingperday) for their relentless work on keeping the themes site in pristine condition and to [@kaushalmodi](https://github.com/kaushalmodi) for his great work on the documentation site.
This release represents **25 contributions by 5 contributors** to the main Hugo code base. [@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@gavinhoward](https://github.com/gavinhoward), [@niklasfasching](https://github.com/niklasfasching), and [@zaitseff](https://github.com/zaitseff) for their ongoing contributions. And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) and [@onedrawingperday](https://github.com/onedrawingperday) for their relentless work on keeping the themes site in pristine condition and to [@kaushalmodi](https://github.com/kaushalmodi) for his great work on the documentation site.

Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs), which has received **8 contributions by 5 contributors**. A special thanks to [@bep](https://github.com/bep), [@DirtyF](https://github.com/DirtyF), [@pfhawkins](https://github.com/pfhawkins), and [@bubelov](https://github.com/bubelov) for their work on the documentation site.

Expand All @@ -25,7 +25,7 @@ Hugo now has:
## Notes

* Ace and Amber support is now removed from Hugo. See [#6609](https://github.com/gohugoio/hugo/issues/6609) for more information.
* The `markdownify` template function does not, yet, support render hooks. We recommend you look at the new and more powerful [.RenderString](https://gohugo.io/renderstring/) method on `Page`.
* The `markdownify` template function does not, yet, support render hooks. We recommend you look at the new and more powerful [.RenderString](https://gohugo.io/functions/renderstring/) method on `Page`.
* If you have output format specific behaviour in a template used from a content file, you must create a output format specific template, e.g. `myshortcode.amp.html`. This also applies to the new rendering hooks introduced in this release. This has been the intended behaviour all the time, but a failing test (now fixed) shows that the implementation of this has not been as strict as specified, hence this note.
* The `errorf` does not return any value anymore. This means that the ERROR will just be printed to the console. We have also added a `warnf` template func.

Expand Down
6 changes: 1 addition & 5 deletions content/en/news/0.62.1-relnotes/index.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@

---
date: 2020-01-01
title: "Hugo 0.62.1: A couple of Bug Fixes"
description: "This version fixes a couple of bugs introduced in 0.62.0."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png

---



This is a bug-fix release with a couple of important fixes.
This release is mainly motivated by getting [this demo site](https://github.com/bep/portable-hugo-links) up and running. It demonstrates truly portable Markdown links and images, whether browsed on GitHub or deployed as a Hugo site.

* Support files in content mounts [ff6253bc](https://github.com/gohugoio/hugo/commit/ff6253bc7cf745e9c0127ddc9006da3c2c00c738) [@bep](https://github.com/bep) [#6684](https://github.com/gohugoio/hugo/issues/6684)[#6696](https://github.com/gohugoio/hugo/issues/6696)
* Update alpine base image in Dockerfile to 3.11 [aa4ccb8a](https://github.com/gohugoio/hugo/commit/aa4ccb8a1e9b8aa17397acf34049a2aa16b0b6cb) [@RemcodM](https://github.com/RemcodM)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/en/showcase/hartwell-insurance/hartwell-columns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/en/showcase/hartwell-insurance/hartwell-lighthouse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/en/showcase/hartwell-insurance/hartwell-webpagetest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/en/showcase/linode/featured.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/en/showcase/over/featured-over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/en/showcase/pharmaseal/featured-pharmaseal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/en/showcase/tomango/featured.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 61d5400

Please sign in to comment.