diff options
62 files changed, 57 insertions, 64 deletions
diff --git a/docs/.github/calibre/image-actions.yml b/docs/.github/calibre/image-actions.yml deleted file mode 100644 index fda8a00b3..000000000 --- a/docs/.github/calibre/image-actions.yml +++ /dev/null @@ -1,3 +0,0 @@ -ignorePaths: - - "resources/**" - - "_vendor/**" diff --git a/docs/content/en/content-management/image-processing/index.md b/docs/content/en/content-management/image-processing/index.md index ed6478d7a..0b9bcf323 100644 --- a/docs/content/en/content-management/image-processing/index.md +++ b/docs/content/en/content-management/image-processing/index.md @@ -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" >}}): diff --git a/docs/content/en/content-management/image-processing/sunset.jpg b/docs/content/en/content-management/image-processing/sunset.jpg Binary files differindex 7d7307bed..4dbcc0836 100644 --- a/docs/content/en/content-management/image-processing/sunset.jpg +++ b/docs/content/en/content-management/image-processing/sunset.jpg diff --git a/docs/content/en/content-management/organization/1-featured-content-bundles.png b/docs/content/en/content-management/organization/1-featured-content-bundles.png Binary files differindex 1706a29d6..501e671e2 100644 --- a/docs/content/en/content-management/organization/1-featured-content-bundles.png +++ b/docs/content/en/content-management/organization/1-featured-content-bundles.png diff --git a/docs/content/en/functions/RenderString.md b/docs/content/en/functions/RenderString.md index 61f5d6417..e62f0cae0 100644 --- a/docs/content/en/functions/RenderString.md +++ b/docs/content/en/functions/RenderString.md @@ -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") @@ -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.
\ No newline at end of file +**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. diff --git a/docs/content/en/functions/ref.md b/docs/content/en/functions/ref.md index d63c0a89d..feac06c97 100644 --- a/docs/content/en/functions/ref.md +++ b/docs/content/en/functions/ref.md @@ -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: @@ -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/). diff --git a/docs/content/en/functions/relref.md b/docs/content/en/functions/relref.md index ea992af2f..fe5699053 100644 --- a/docs/content/en/functions/relref.md +++ b/docs/content/en/functions/relref.md @@ -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: @@ -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/). diff --git a/docs/content/en/functions/safeURL.md b/docs/content/en/functions/safeURL.md index cb9979cd3..2e0733142 100644 --- a/docs/content/en/functions/safeURL.md +++ b/docs/content/en/functions/safeURL.md @@ -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 --> diff --git a/docs/content/en/getting-started/configuration-markup.md b/docs/content/en/getting-started/configuration-markup.md index d876ae0d8..1ac7e44ea 100644 --- a/docs/content/en/getting-started/configuration-markup.md +++ b/docs/content/en/getting-started/configuration-markup.md @@ -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 @@ -122,7 +122,7 @@ 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") @@ -130,11 +130,9 @@ A Markdown example for a inline-style link with 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. diff --git a/docs/content/en/getting-started/external-learning-resources/hia.jpg b/docs/content/en/getting-started/external-learning-resources/hia.jpg Binary files differindex ee45b0e9e..601947a70 100644 --- a/docs/content/en/getting-started/external-learning-resources/hia.jpg +++ b/docs/content/en/getting-started/external-learning-resources/hia.jpg diff --git a/docs/content/en/getting-started/installing.md b/docs/content/en/getting-started/installing.md index 55c876646..931849e77 100644 --- a/docs/content/en/getting-started/installing.md +++ b/docs/content/en/getting-started/installing.md @@ -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) diff --git a/docs/content/en/getting-started/quick-start.md b/docs/content/en/getting-started/quick-start.md index 3c8eb6b8a..8f5847522 100644 --- a/docs/content/en/getting-started/quick-start.md +++ b/docs/content/en/getting-started/quick-start.md @@ -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 %}} @@ -44,10 +42,8 @@ To verify your new install: hugo version ``` - {{< asciicast ItACREbFgvJ0HjnSNeTknxWy9 >}} - ## Step 2: Create a New Site ```bash @@ -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 @@ -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 @@ -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. @@ -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: diff --git a/docs/content/en/hosting-and-deployment/hosting-on-render.md b/docs/content/en/hosting-and-deployment/hosting-on-render.md index c8fceea7c..eb7947161 100644 --- a/docs/content/en/hosting-and-deployment/hosting-on-render.md +++ b/docs/content/en/hosting-and-deployment/hosting-on-render.md @@ -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] @@ -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. @@ -38,7 +38,7 @@ 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. @@ -46,20 +46,20 @@ Static sites are **completely free** on Render and include the following: 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. diff --git a/docs/content/en/news/0.62.0-relnotes/hugo-62-poster-featured.png b/docs/content/en/news/0.62.0-relnotes/hugo-62-poster-featured.png Binary files differnew file mode 100644 index 000000000..9a024c023 --- /dev/null +++ b/docs/content/en/news/0.62.0-relnotes/hugo-62-poster-featured.png diff --git a/docs/content/en/news/0.62.0-relnotes/index.md b/docs/content/en/news/0.62.0-relnotes/index.md index c7168a92f..71f01145d 100644 --- a/docs/content/en/news/0.62.0-relnotes/index.md +++ b/docs/content/en/news/0.62.0-relnotes/index.md @@ -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 |