Skip to content

Commit

Permalink
Squashed 'docs/' changes from 4f4d1f48c..acf70cdd9
Browse files Browse the repository at this point in the history
acf70cdd9 Update CSS after removing Purge
74c0bb7f2 Remove purge from Webpack, temporarily
397b7284f Merge commit 'ccb1e38f3822e9b5e4fb89a296324daf3400f23b'
ccb1e38f3 Squashed 'themes/gohugoioTheme/' changes from 042112e2d..b7853ae70
bca84e914 Fix search box text being invisible in Safari
3f21d0957 FAQ: "this feature is not available in your current Hugo version"
d8b318f90 Remove Gulp from Victor Hugo description
09d9b4c24 Update contribute/development.md
4d0f6ba47 Theme Components Support on the Hugo Themes Site (#769)
f2ec3f2a6 Fix broken link 404
af82c56c5 config: Remove superflous param
8dc14f563 Update theme total on homepage (#765)
7838fd7e2 Update description of Atlas to reflect new changes
6abab23c6 update: total of hugo themes
1dba24fde Clarify: summaryLength uses words not characters
8c54f45d6 Add missing punctuation
d17000481 Remove Hugo Frontend caddy-plugin
a7094ae62 remove unneeded meta tags
f8b0f31c6 Fix typo in cross references
61781bab9 Fix: use gh shortcode correctly
357bfca43 Update files.md
d1d2406cc Updated Hugo convert to clarify for and not ..
86850f3c3 Fix typos in multilingual.md
b68d0d892 Fix typo
8cba70e28 Document disableAliases
00e440260 Remove extra whitespace
212d63e4c Update with latest Theme Submission Guidelines (#744)
c24ea638f Update frontends.md
942bc1972 Add one more video
2e1e1091d Update the rest of the videos
a7dc70f2b Add new installation video
1a78f8487 Hosting on AWS amplify
112420c46 Fix typo
f723425e4 Add fireship.io bio to showcase
574f43503 Fixed typo
88e0e0cb7 Release 0.54.0
303edf19e Merge branch 'temp54'
c38debebd releaser: Prepare repository for 0.55.0-DEV
5c6c56fa1 releaser: Add release notes to /docs for release of 0.54.0
f86e05950 releaser: Bump versions for release of 0.54.0
6a2684fe4 Add the default cache configuration
f75c0125a Merge commit 'f27faf9afd0a8db768a21954b8755f1bf1a14f1b'
e440dc6a4 Merge commit '5e078383a787e8b5ec3ba73f05ea4130840afbe2'
981bf53f8 Update _index.md
b54aea066 tpl: Fix reflect
41f8af5a6 Merge commit '978856e2ad12d2bcaf37bb9e31f806b30a4c42f4'

git-subtree-dir: docs
git-subtree-split: acf70cdd9fe2a89413e13db29466e45629372343
  • Loading branch information
bep committed Mar 26, 2019
1 parent f27faf9 commit c2037f0
Show file tree
Hide file tree
Showing 48 changed files with 3,011 additions and 140 deletions.
19 changes: 17 additions & 2 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
baseURL = "https://gohugo.io/"
paginate = 100
paginate = 100
defaultContentLanguage = "en"
enableEmoji = true
# Set the unicode character used for the "return" link in page footnotes.
Expand Down Expand Up @@ -48,6 +48,21 @@ baseName = "_headers"
isPlainText = true
notAlternative = true

[caches]
[caches.getjson]
dir = ":cacheDir/:project"
maxAge = -1
[caches.getcsv]
dir = ":cacheDir/:project"
maxAge = -1
[caches.images]
dir = ":resourceDir/_gen"
maxAge = -1
[caches.assets]
dir = ":resourceDir/_gen"
maxAge = -1


[related]

threshold = 80
Expand All @@ -58,7 +73,7 @@ toLower = false
name = "keywords"
weight = 100
[[related.indices]]
name = "date"
name = "date"
weight = 10
pattern = "2006"

Expand Down
4 changes: 0 additions & 4 deletions config/production/params.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# Params for production

# This is turned off in development as it is relatively slow.
# This is needed to get accurate lastMod and Git commit info
# on the docs pages.
enableGitInfo = true
2 changes: 1 addition & 1 deletion content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion content/en/commands/hugo_convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand Down
2 changes: 1 addition & 1 deletion content/en/content-management/cross-references.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion content/en/content-management/multilingual.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions content/en/content-management/shortcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 */>}}
Expand Down Expand Up @@ -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" >}}
Expand Down
2 changes: 1 addition & 1 deletion content/en/content-management/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
49 changes: 38 additions & 11 deletions content/en/contribute/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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):
Expand Down
19 changes: 2 additions & 17 deletions content/en/contribute/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion content/en/functions/reflect.IsMap.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: reflect.IsMap
description: Reports if a value is a map.
draft: true
godocref:
date: 2018-11-28
publishdate: 2018-11-28
Expand Down
1 change: 0 additions & 1 deletion content/en/functions/reflect.IsSlice.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: reflect.IsSlice
description: Reports if a value is a slice.
draft: true
godocref:
date: 2018-11-28
publishdate: 2018-11-28
Expand Down
5 changes: 4 additions & 1 deletion content/en/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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).
Expand Down
44 changes: 25 additions & 19 deletions content/en/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ hugo version
```


{{< asciicast HDlKrUrbfT7yiWsbd6QoxzRTN >}}
{{< asciicast ItACREbFgvJ0HjnSNeTknxWy9 >}}


## Step 2: Create a New Site
Expand All @@ -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
Expand All @@ -81,14 +81,16 @@ echo 'theme = "ananke"' >> config.toml
```


{{< asciicast WJM2LEZQs8VRhNeuZ5NiGPp9I >}}
{{< asciicast 7naKerRYUGVPj8kiDmdh5k5h9 >}}

## Step 4: Add Some Content

```
hugo new posts/my-first-post.md
```

{{< asciicast eUojYCfRTZvkEiqc52fUsJRBR >}}


Edit the newly created content file if you want.

Expand All @@ -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
```
Expand Down Expand Up @@ -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 >}}
Loading

0 comments on commit c2037f0

Please sign in to comment.