diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-03-26 18:41:36 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-03-26 18:41:36 +0100 |
commit | 876e5f67b14a3707b757fd008bbcc7792057c69d (patch) | |
tree | f0aa763b744e78ad6f558e2ceff30984f991a538 /docs/content | |
parent | 9bc6187b8337c4a370bd3f21130a764d9ef6f7b3 (diff) | |
parent | c2037f0c9a3a35b9db9c404f6b5f94ec8b690a53 (diff) |
Merge commit 'c2037f0c9a3a35b9db9c404f6b5f94ec8b690a53'
Diffstat (limited to 'docs/content')
24 files changed, 171 insertions, 76 deletions
diff --git a/docs/content/en/_index.md b/docs/content/en/_index.md index 30269eb23..334704833 100644 --- a/docs/content/en/_index.md +++ b/docs/content/en/_index.md @@ -32,7 +32,7 @@ features: tagline: HTML not enough? copy: Hugo allows you to output your content in multiple formats, including JSON or AMP, and makes it easy to create your own. sections: - - heading: "100s of Themes" + - heading: "300+ Themes" cta: Check out the Hugo themes. link: http://themes.gohugo.io/ color_classes: bg-accent-color white diff --git a/docs/content/en/commands/hugo_convert.md b/docs/content/en/commands/hugo_convert.md index 7f95c3675..f04338066 100644 --- a/docs/content/en/commands/hugo_convert.md +++ b/docs/content/en/commands/hugo_convert.md @@ -10,10 +10,12 @@ Convert your content to different formats ### Synopsis -Convert your content (e.g. front matter) to different formats. +Convert your content files (front matter) to different formats. See convert's subcommands toJSON, toTOML and toYAML for more information. +**Please Note:** This will convert front matter only. It does not convert theme and configuration files (e.g. config.toml, theme.toml). Those files will need to be manually changed to your preference. + ### Options ``` diff --git a/docs/content/en/content-management/cross-references.md b/docs/content/en/content-management/cross-references.md index 145c2d338..f51271306 100644 --- a/docs/content/en/content-management/cross-references.md +++ b/docs/content/en/content-management/cross-references.md @@ -76,7 +76,7 @@ More information about document unique identifiers and headings can be found [be The behaviour can, since Hugo 0.45, be configured in `config.toml`: refLinksErrorLevel ("ERROR") -: When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this logg level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`). +: When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`). refLinksNotFoundURL : URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is. diff --git a/docs/content/en/content-management/multilingual.md b/docs/content/en/content-management/multilingual.md index e8d2291ae..49af92b65 100644 --- a/docs/content/en/content-management/multilingual.md +++ b/docs/content/en/content-management/multilingual.md @@ -49,7 +49,7 @@ linkedin = "https://linkedin.com/fr/whoever" help = "Aide" {{< /code-toggle >}} -Anything not defined in a `[languages]` block will fall back to the global value for that key (e.g., `copyright` for the English [`en`] language). This also works for `params`, as demonstrated witgh `help` above: You will get the value `Aide` in French and `Help` in all the languages without this parameter set. +Anything not defined in a `[languages]` block will fall back to the global value for that key (e.g., `copyright` for the English [`en`] language). This also works for `params`, as demonstrated with `help` above: you will get the value `Aide` in French and `Help` in all the languages without this parameter set. With the configuration above, all content, sitemap, RSS feeds, paginations, and taxonomy pages will be rendered below `/` in English (your default content language) and then below `/fr` in French. diff --git a/docs/content/en/content-management/shortcodes.md b/docs/content/en/content-management/shortcodes.md index 1990cce5a..b719e681d 100644 --- a/docs/content/en/content-management/shortcodes.md +++ b/docs/content/en/content-management/shortcodes.md @@ -243,7 +243,7 @@ Using the preceding `instagram` with `hidecaption` example above, the following ### `param` -Gets a value from the current `Page's` params set in front matter, with a fall back to the site param value. If will log an `ERROR` if the param with the given key could not be found in either. +Gets a value from the current `Page's` params set in front matter, with a fall back to the site param value. It will log an `ERROR` if the param with the given key could not be found in either. ```bash {{</* param testparam */>}} @@ -372,7 +372,7 @@ Copy the YouTube video ID that follows `v=` in the video's URL and pass it to th {{</* youtube w7Ft2ymGmfc */>}} {{< /code >}} -Furthermore, you can automatically start playback of the embedded video by setting the `autoplay` parameter to `true`. Remember that you can't mix named an unnamed parameters, so you'll need to assign the yet unnamed video id to the parameter `id`: +Furthermore, you can automatically start playback of the embedded video by setting the `autoplay` parameter to `true`. Remember that you can't mix named and unnamed parameters, so you'll need to assign the yet unnamed video id to the parameter `id`: {{< code file="example-youtube-input-with-autoplay.md" >}} diff --git a/docs/content/en/content-management/toc.md b/docs/content/en/content-management/toc.md index 56f51049d..31326746c 100644 --- a/docs/content/en/content-management/toc.md +++ b/docs/content/en/content-management/toc.md @@ -89,7 +89,7 @@ With the preceding example, even pages with > 400 words *and* `toc` not set to ` {{% /note %}} [conditionals]: /templates/introduction/#conditionals -[front matter]: /content-management/table-of-contents/ +[front matter]: /content-management/front-matter/ [pagevars]: /variables/page/ [partials]: /templates/partials/ [single page template]: /templates/single-page-templates/ diff --git a/docs/content/en/contribute/development.md b/docs/content/en/contribute/development.md index 93b31ee8c..2ac0d0ddb 100644 --- a/docs/content/en/contribute/development.md +++ b/docs/content/en/contribute/development.md @@ -52,7 +52,7 @@ go version You should see something similar to the following written to the console. Note that the version here reflects the most recent version of Go as of the last update for this page: ``` -go version go1.8 darwin/amd64 +go version go1.12 darwin/amd64 ``` Next, make sure that you set up your `GOPATH` [as described in the installation guide][setupgopath]. @@ -116,8 +116,8 @@ echo "alias git='hub'" >> ~/.bash_profile Confirm the installation: ``` -git version 2.6.3 -hub version 2.2.2 +git version 2.21.0 +hub version 2.10.0 ``` ## Set up your working copy @@ -132,16 +132,29 @@ We assume that you've set up your `GOPATH` (see the section above if you're unsu We're going to clone the [master Hugo repository](https://github.com/gohugoio/hugo). That seems counter-intuitive, since you won't have commit rights on it. But it's required for the Go workflow. You'll work on a copy of the master and push your changes to your own repository on GitHub. -So, let's clone that master repository: +So, let's make a new directory and clone that master repository: ``` -go get -v -u github.com/gohugoio/hugo +mkdir $HOME/src +cd $HOME/src +git clone https://github.com/gohugoio/hugo.git ``` -Hugo relies on [Testify](https://github.com/stretchr/testify) for testing Go code. If you don't already have it, get the Testify testing tools: +> Since Hugo 0.48, Hugo uses the Go Modules support built into Go 1.11 to build. +> The easiest is to clone Hugo in a directory outside of GOPATH + +And then, install dependencies of Hugo by running the following in the cloned directory: + +``` +cd $HOME/src/hugo +go install +``` + + +Hugo relies on [mage](github.com/magefile/mage) for some convenient build and test targets. If you don't already have it, get it: ``` -go get github.com/stretchr/testify +go get github.com/magefile/mage ``` ### Fork the repository @@ -163,7 +176,7 @@ Now open your fork repository on GitHub and copy the remote url of your fork. Yo Switch back to the terminal and move into the directory of the cloned master repository from the last step. ``` -cd $GOPATH/src/github.com/gohugoio/hugo +cd $HOME/src/hugo ``` Now Git needs to know that our fork exists by adding the copied remote url: @@ -233,19 +246,33 @@ We have developed a [separate Hugo documentation contribution guide][docscontrib While making changes in the codebase it's a good idea to build the binary to test them: ``` -go build -o hugo main.go +mage hugo +``` + +This command generates the binary file at the root of the repository. + +If you want to install the binary in `$GOPATH/bin`, run + +``` +mage install ``` ### Test Sometimes changes on the codebase can cause unintended side effects. Or they don't work as expected. Most functions have their own test cases. You can find them in files ending with `_test.go`. -Make sure the commands `go test ./...` passes, and `go build` completes. +Make sure the commands + +``` +mage -v check +``` + +passes. ### Formatting The Go code styleguide maybe is opinionated but it ensures that the codebase looks the same, regardless who wrote the code. Go comes with its own formatting tool. Let's apply the styleguide to our additions: ``` -go fmt ./... +mage fmt ``` Once you made your additions commit your changes. Make sure that you follow our [code contribution guidelines](https://github.com/gohugoio/hugo/blob/master/CONTRIBUTING.md): diff --git a/docs/content/en/contribute/themes.md b/docs/content/en/contribute/themes.md index 07f63a25b..5ec244fe7 100644 --- a/docs/content/en/contribute/themes.md +++ b/docs/content/en/contribute/themes.md @@ -30,7 +30,7 @@ A collection of all themes created by the Hugo community, including screenshots 4. Add a descriptive `README.md` to the root of the theme source 5. Add `/images/screenshot.png` and `/images/tn.png` -\* If your theme doesn't fit into the `Hugo Basic Example` site, we encourage theme authors to supply a self-contained Hugo site in `/exampleSite`. +\* If your theme doesn't fit into the `Hugo Basic Example` site, we encourage theme authors to supply a self-contained Hugo site in `/exampleSite/`, but note that for security reasons the content directory on the Hugo showcase will still be published from the [`Hugo Basic Example`](https://github.com/gohugoio/hugoBasicExample/tree/master/content) repository. {{% note %}} The folder name here---`exampleSite`---is important, as this folder will be picked up and used by the script that generates the Hugo Theme Site. It mirrors the root directory of a Hugo website and allows you to add custom content, assets, and a `config` file with preset values. @@ -125,22 +125,7 @@ Additional media may be provided in the same directory. Your theme's README file should be written in markdown and saved at the root of your theme's directory structure. Your `README.md` serves as 1. Content for your theme's details page at <https://themes.gohugo.io> -2. General information about the theme in your GitHub repository (i.e., it's usual purpose) - -#### Example `README.md` - -You can download the following `README.md` as an outline: - -{{< code file="README.md" download="README.md" >}} - -# Theme Title - -**Need input from @digitalcraftsman on what could be added to this file.** - - - - -{{< /code >}} +2. General information about the theme in your GitHub repository (i.e., it's usual purpose, features and instructions) {{% note "Screenshots in your `README.md`"%}} If you add screenshots to the README, please make use of absolute file paths instead of relative ones like `/images/screenshot.png`. Relative paths work great on GitHub but they don't correspond to the directory structure of [themes.gohugo.io](http://themes.gohugo.io/). Therefore, browsers will not be able to display screenshots on the theme site under the given (relative) path. diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md index b37fa48e7..5b310db15 100644 --- a/docs/content/en/getting-started/configuration.md +++ b/docs/content/en/getting-started/configuration.md @@ -114,6 +114,9 @@ defaultContentLanguage ("en") defaultContentLanguageInSubdir (false) : Render the default content language in subdir, e.g. `content/en/`. The site root `/` will then redirect to `/en/`. +disableAliases (false) +: Will disable generation of alias redirects. Note that even if `disableAliases` is set, the aliases themselves are preserved on the page. The motivation with this is to be able to generate 301 redirects in an `.htacess`, a Netlify `_redirects` file or similar using a custom output format. + disableHugoGeneratorInject (false) : Hugo will, by default, inject a generator meta tag in the HTML head on the _home page only_. You can turn it off, but we would really appreciate if you don't, as this is a good way to watch Hugo's popularity on the rise. @@ -251,7 +254,7 @@ stepAnalysis (false) : Display memory and timing of different steps of the program. summaryLength (70) -: The length of text to show in a [`.Summary`](/content-management/summaries/#hugo-defined-automatic-summary-splitting). +: The length of text in words to show in a [`.Summary`](/content-management/summaries/#hugo-defined-automatic-summary-splitting). taxonomies : See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies). diff --git a/docs/content/en/getting-started/quick-start.md b/docs/content/en/getting-started/quick-start.md index 59f9f96e1..b1b5fec31 100644 --- a/docs/content/en/getting-started/quick-start.md +++ b/docs/content/en/getting-started/quick-start.md @@ -43,7 +43,7 @@ hugo version ``` -{{< asciicast HDlKrUrbfT7yiWsbd6QoxzRTN >}} +{{< asciicast ItACREbFgvJ0HjnSNeTknxWy9 >}} ## Step 2: Create a New Site @@ -54,7 +54,7 @@ hugo new site quickstart The above will create a new Hugo site in a folder named `quickstart`. -{{< asciicast 1PH9A2fs14Dnyarx5v8OMYQer >}} +{{< asciicast 3mf1JGaN0AX0Z7j5kLGl3hSh8 >}} ## Step 3: Add a Theme @@ -81,7 +81,7 @@ echo 'theme = "ananke"' >> config.toml ``` -{{< asciicast WJM2LEZQs8VRhNeuZ5NiGPp9I >}} +{{< asciicast 7naKerRYUGVPj8kiDmdh5k5h9 >}} ## Step 4: Add Some Content @@ -89,6 +89,8 @@ echo 'theme = "ananke"' >> config.toml hugo new posts/my-first-post.md ``` +{{< asciicast eUojYCfRTZvkEiqc52fUsJRBR >}} + Edit the newly created content file if you want. @@ -97,23 +99,30 @@ Edit the newly created content file if you want. Now, start the Hugo server with [drafts](/getting-started/usage/#draft-future-and-expired-content) enabled: +{{< asciicast BvJBsF6egk9c163bMsObhuNXj >}} + + + ``` ▶ hugo server -D -Started building sites ... -Built site for language en: -1 of 1 draft rendered -0 future content -0 expired content -1 regular pages created -8 other pages created -0 non-page files copied -1 paginator pages created -0 categories created -0 tags created -total in 18 ms -Watching for changes in /Users/bep/sites/quickstart/{data,content,layouts,static,themes} + | EN ++------------------+----+ + Pages | 10 + Paginator pages | 0 + Non-page files | 0 + Static files | 3 + Processed images | 0 + Aliases | 1 + Sitemaps | 1 + Cleaned | 0 + +Total in 11 ms +Watching for changes in /Users/bep/quickstart/{content,data,layouts,static,themes} +Watching for config changes in /Users/bep/quickstart/config.toml +Environment: "development" Serving pages from memory +Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) Press Ctrl+C to stop ``` @@ -148,6 +157,3 @@ For theme specific configuration options, see the [theme site](https://github.co **For further theme customization, see [Customize a Theme](/themes/customizing/).** -## Recapitulation - -{{< asciicast pWp4uvyAkdWgQllD9RCfeBL5k >}} diff --git a/docs/content/en/hosting-and-deployment/hosting-on-aws-amplify.md b/docs/content/en/hosting-and-deployment/hosting-on-aws-amplify.md new file mode 100644 index 000000000..83f20c2fe --- /dev/null +++ b/docs/content/en/hosting-and-deployment/hosting-on-aws-amplify.md @@ -0,0 +1,43 @@ +--- +title: Host on AWS Amplify +linktitle: Host on AWS Amplify +description: Develop and deploy a cloud-powered web app with AWS Amplify. +date: 2018-01-31 +publishdate: 2018-01-31 +lastmod: 2018-01-31 +categories: [hosting and deployment] +keywords: [amplify,hosting,deployment] +authors: [Nikhil Swaminathan] +menu: + docs: + parent: "hosting-and-deployment" + weight: 10 +weight: 10 +sections_weight: 10 +draft: false +aliases: [] +toc: true +--- + +In this guide we'll walk through how to deploy and host your Hugo site using the [AWS Amplify Console](https://console.amplify.aws). + +AWS Amplify is a combination of client library, CLI toolchain, and a Console for continuous deployment and hosting. The Amplify CLI and library allow developers to get up & running with full-stack cloud-powered applications with features like authentication, storage, serverless GraphQL or REST APIs, analytics, Lambda functions, & more. The Amplify Console provides continuous deployment and hosting for modern web apps (single page apps and static site generators). Continuous deployment allows developers to deploy updates to their web app on every code commit to their Git repository. Hosting includes features such as globally available CDNs, easy custom domain setup + HTTPS, feature branch deployments, and password protection. + +## Pre-requisites + +* [Sign up for an AWS Account](https://portal.aws.amazon.com/billing/signup?redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation). There are no upfront charges or any term commitments to create an AWS account and signing up gives you immediate access to the AWS Free Tier. +* You have an account with GitHub, GitLab, or Bitbucket. +* You have completed the [Quick Start][] or have a Hugo website you are ready to deploy and share with the world. + +## Hosting + +1. Log in to the [AWS Amplify Console](https://console.aws.amazon.com/amplify/home) and choose Get Started under Deploy. + ![Hugo Amplify](/images/hosting-and-deployment/hosting-on-aws-amplify/amplify-gettingstarted.png) + +1. Connect a branch from your GitHub, Bitbucket, GitLab, or AWS CodeCommit repository. Connecting your repository allows Amplify to deploy updates on every code commit to a branch. + ![Hugo Amplify](/images/hosting-and-deployment/hosting-on-aws-amplify/amplify-connect-repo.gif) + +1. Accept the default build settings. The Amplify Console automatically detects your Hugo build settings and output directory. + ![Hugo Amplify](/images/hosting-and-deployment/hosting-on-aws-amplify/amplify-build-settings.png) + +1. Review your changes and then choose **Save and deploy**. The Amplify Console will pull code from your repository, build changes to the backend and frontend, and deploy your build artifacts at `https://master.unique-id.amplifyapp.com`. Bonus: Screenshots of your app on different devices to find layout issues.
\ No newline at end of file diff --git a/docs/content/en/news/0.16-relnotes/index.md b/docs/content/en/news/0.16-relnotes/index.md index 72839eea5..92f6e54a0 100644 --- a/docs/content/en/news/0.16-relnotes/index.md +++ b/docs/content/en/news/0.16-relnotes/index.md @@ -100,16 +100,13 @@ times decreased anywhere from 10% to 99%. `PygmentsCodeFencesGuessSyntax = true` {{<gh 2034>}} * Make `ByCount` sort consistently {{<gh 1930>}} * Add `Scratch` to shortcode {{<gh 2000>}} -* Add support for symbolic links for content, layout, static, theme {{<gh 1855 - >}} -* Add '+' as one of the valid characters in URLs specified in the front matter - {{<gh 1290 >}} -* Make alias redirect output URLs relative when `RelativeURLs = true` {{<gh - 2093 >}} -* Hugo injects meta generator tag on homepage if missing {{<gh - 2182 >}} +* Add support for symbolic links for content, layout, static, theme {{<gh 1855 >}} +* Add '+' as one of the valid characters in URLs specified in the front matter {{<gh 1290 >}} +* Make alias redirect output URLs relative when `RelativeURLs = true` {{<gh 2093 >}} +* Hugo injects meta generator tag on homepage if missing {{<gh 2182 >}} ### Fixes + * Fix file change watcher for TextMate 2 and friends on OS X {{<gh 1053 >}} * Make dynamic reloading of config file reliable on all platform {{<gh 1684 >}} * Hugo now works on Linux/arm64 {{<gh 1772 >}} diff --git a/docs/content/en/news/0.54.0-relnotes/featured-hugo-54.0-poster.png b/docs/content/en/news/0.54.0-relnotes/featured-hugo-54.0-poster.png Binary files differnew file mode 100644 index 000000000..10fe563c3 --- /dev/null +++ b/docs/content/en/news/0.54.0-relnotes/featured-hugo-54.0-poster.png diff --git a/docs/content/en/news/0.54.0-relnotes/index.md b/docs/content/en/news/0.54.0-relnotes/index.md index 4de903a01..8fc56620b 100644 --- a/docs/content/en/news/0.54.0-relnotes/index.md +++ b/docs/content/en/news/0.54.0-relnotes/index.md @@ -1,15 +1,12 @@ --- date: 2019-02-01 -title: "0.54.0" -description: "0.54.0" +title: "0.54.0: Mostly Bugfixes" +description: "0.54.0 is mostly a bugfix-release, but also some nice improvements." categories: ["Releases"] -images: -- images/blog/hugo-bug-poster.png --- - This release represents **27 contributions by 7 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 [@tryzniak](https://github.com/tryzniak), [@anthonyfok](https://github.com/anthonyfok), and [@mywaiting](https://github.com/mywaiting) 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 **38 contributions by 17 contributors**. A special thanks to [@bep](https://github.com/bep), [@kaushalmodi](https://github.com/kaushalmodi), [@onedrawingperday](https://github.com/onedrawingperday), and [@peaceiris](https://github.com/peaceiris) for their work on the documentation site. diff --git a/docs/content/en/showcase/fireship/bio.md b/docs/content/en/showcase/fireship/bio.md new file mode 100644 index 000000000..faf739bfa --- /dev/null +++ b/docs/content/en/showcase/fireship/bio.md @@ -0,0 +1,6 @@ + +**Fireship.io** is an ecosystem of detailed and practical resources for developers who want to build and ship high-quality apps. + +The site is built by: + +* [Jeff Delaney](https://fireship.io/contributors/jeff-delaney/) diff --git a/docs/content/en/showcase/fireship/featured.png b/docs/content/en/showcase/fireship/featured.png Binary files differnew file mode 100644 index 000000000..33d1a47c5 --- /dev/null +++ b/docs/content/en/showcase/fireship/featured.png diff --git a/docs/content/en/showcase/fireship/index.md b/docs/content/en/showcase/fireship/index.md new file mode 100644 index 000000000..bab68a547 --- /dev/null +++ b/docs/content/en/showcase/fireship/index.md @@ -0,0 +1,18 @@ |