Squashed 'docs/' changes from 4f4d1f48c..acf70cdd9
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
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
```
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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" >}}
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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:
|
||||
|
||||
```
|
||||
go get github.com/stretchr/testify
|
||||
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/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):
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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 >}}
|
||||
|
|
43
content/en/hosting-and-deployment/hosting-on-aws-amplify.md
Normal file
|
@ -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.
|
|
@ -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 >}}
|
||||
|
|
BIN
content/en/news/0.54.0-relnotes/featured-hugo-54.0-poster.png
Normal file
After Width: | Height: | Size: 58 KiB |
69
content/en/news/0.54.0-relnotes/index.md
Normal file
|
@ -0,0 +1,69 @@
|
|||
|
||||
---
|
||||
date: 2019-02-01
|
||||
title: "0.54.0: Mostly Bugfixes"
|
||||
description: "0.54.0 is mostly a bugfix-release, but also some nice improvements."
|
||||
categories: ["Releases"]
|
||||
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 32265+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 441+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 289+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Adjust tests [ddc6d4e3](https://github.com/gohugoio/hugo/commit/ddc6d4e30f282f23b703a3b42da552886062c8c8) [@bep](https://github.com/bep) [#5643](https://github.com/gohugoio/hugo/issues/5643)
|
||||
* Prevent getJSON and getCSV fetch failure from aborting build [6a2bfcbe](https://github.com/gohugoio/hugo/commit/6a2bfcbec8df14b1741dbe9b5ead08158bf7adb9) [@anthonyfok](https://github.com/anthonyfok) [#5643](https://github.com/gohugoio/hugo/issues/5643)
|
||||
|
||||
### Core
|
||||
|
||||
* Expand TestPageWithEmoji to cover '+', '-' and '_' too [2a9060a8](https://github.com/gohugoio/hugo/commit/2a9060a85ce430b28f5ec47e1438c6ef1b8e13fa) [@anthonyfok](https://github.com/anthonyfok) [#5635](https://github.com/gohugoio/hugo/issues/5635)
|
||||
* Restore 0.48 slash handling in taxonomies [40ffb048](https://github.com/gohugoio/hugo/commit/40ffb0484b96b7b77fb66202b33073b241807199) [@bep](https://github.com/bep) [#5571](https://github.com/gohugoio/hugo/issues/5571)
|
||||
|
||||
### Other
|
||||
|
||||
* Use official semver even for main releases [fab41f42](https://github.com/gohugoio/hugo/commit/fab41f42d3e23c11651ab75413b01d97e5d37c30) [@bep](https://github.com/bep) [#5639](https://github.com/gohugoio/hugo/issues/5639)
|
||||
* Add test for --configDir [59d87044](https://github.com/gohugoio/hugo/commit/59d87044a4146f578b92b3d67b46660212940912) [@bep](https://github.com/bep) [#5662](https://github.com/gohugoio/hugo/issues/5662)
|
||||
* Ignore unknown config files in config dir [3244cb3b](https://github.com/gohugoio/hugo/commit/3244cb3b31f8f8c39d9dfa82bc01fb2d6db59257) [@bep](https://github.com/bep) [#5646](https://github.com/gohugoio/hugo/issues/5646)
|
||||
* Store supported config formats in a variable [d9282cf9](https://github.com/gohugoio/hugo/commit/d9282cf98a346fcf98f363d9c353e4920ca85fc7) [@tryzniak](https://github.com/tryzniak)
|
||||
* Bump to Go 1.11.5 [8ed2a1ca](https://github.com/gohugoio/hugo/commit/8ed2a1caa9e0892d5bf97ed1b7279befa159f764) [@bep](https://github.com/bep) [#5654](https://github.com/gohugoio/hugo/issues/5654)
|
||||
* Update Afero [e8596139](https://github.com/gohugoio/hugo/commit/e85961390a050cd4f2e6ce4f2666012bc83bb449) [@bep](https://github.com/bep) [#5650](https://github.com/gohugoio/hugo/issues/5650)
|
||||
* Accept hyphen and plus sign in emoji detection [3038464e](https://github.com/gohugoio/hugo/commit/3038464ea6f931c8a08ee49d47f1eaec99ba4817) [@anthonyfok](https://github.com/anthonyfok) [#5635](https://github.com/gohugoio/hugo/issues/5635)
|
||||
* Support numeric sort in ByParam [26f75edb](https://github.com/gohugoio/hugo/commit/26f75edb7a76c816349749a05edf98fb36dc338a) [@tryzniak](https://github.com/tryzniak) [#5305](https://github.com/gohugoio/hugo/issues/5305)
|
||||
* Make hugo server -t work again [db3c49d0](https://github.com/gohugoio/hugo/commit/db3c49d049193e0fc225fe4bdb95712c311d6615) [@tryzniak](https://github.com/tryzniak) [#5569](https://github.com/gohugoio/hugo/issues/5569)[#5061](https://github.com/gohugoio/hugo/issues/5061)[#4868](https://github.com/gohugoio/hugo/issues/4868)
|
||||
* Add configFile(s) back to the watch list after RENAME event too [e3cb8e6c](https://github.com/gohugoio/hugo/commit/e3cb8e6c7874d7dfe1d4d1c7f5c9765b681fb647) [@anthonyfok](https://github.com/anthonyfok) [#5205](https://github.com/gohugoio/hugo/issues/5205)
|
||||
* Remove historical rssURI config [55251aa8](https://github.com/gohugoio/hugo/commit/55251aa89099358c040d38f3af48e3699d67bab2) [@mywaiting](https://github.com/mywaiting)
|
||||
* Use subtests with server_test.go [843fcd19](https://github.com/gohugoio/hugo/commit/843fcd19d4d97bac979410a4e0abed72586a0aa0) [@tryzniak](https://github.com/tryzniak)
|
||||
* Move resource interfaces into its own package [ce8a09a4](https://github.com/gohugoio/hugo/commit/ce8a09a4c0661dece931ab1173e4f09e8e04aa38) [@bep](https://github.com/bep)
|
||||
* Move resource processors into sub-packages [669ada43](https://github.com/gohugoio/hugo/commit/669ada436787311cc5d02dae5b88e60a09adda58) [@bep](https://github.com/bep)
|
||||
* Update _index.md [50745122](https://github.com/gohugoio/hugo/commit/507451229c2255788d72b757a85ad5bb3ba00f4f) [@vrMarc](https://github.com/vrMarc)
|
||||
* Update go.sum [0584432b](https://github.com/gohugoio/hugo/commit/0584432b078f1e3a488ad4f27f39edac0557e042) [@bep](https://github.com/bep)
|
||||
* Update Chroma [cc351958](https://github.com/gohugoio/hugo/commit/cc351958e12d4dc83f664a1d51be76a447fea9b8) [@bep](https://github.com/bep) [#4993](https://github.com/gohugoio/hugo/issues/4993)
|
||||
* Make docshelper run again [c24f3ae2](https://github.com/gohugoio/hugo/commit/c24f3ae22b27dfe5339662277f8183596a6d148d) [@bep](https://github.com/bep) [#5568](https://github.com/gohugoio/hugo/issues/5568)
|
||||
|
||||
## Fixes
|
||||
|
||||
### Templates
|
||||
|
||||
* Fix reflect [9e4f9e0b](https://github.com/gohugoio/hugo/commit/9e4f9e0bb69276e9bca0dfbdbc7aefbf5f6fc9e5) [@moorereason](https://github.com/moorereason) [#5564](https://github.com/gohugoio/hugo/issues/5564)
|
||||
|
||||
### Other
|
||||
|
||||
* Fix some inline shortcode issues [c52045bb](https://github.com/gohugoio/hugo/commit/c52045bbb38cbf64b9cb39352230060aa122cc9f) [@bep](https://github.com/bep) [#5645](https://github.com/gohugoio/hugo/issues/5645)[#5653](https://github.com/gohugoio/hugo/issues/5653)
|
||||
* Fix OpenGraph image fallback to site params [526b5b1c](https://github.com/gohugoio/hugo/commit/526b5b1c4986d43d6184671b02f45ca40f041b65) [@statik](https://github.com/statik)
|
||||
* Fix Params case handling in the new site global [e1a66c73](https://github.com/gohugoio/hugo/commit/e1a66c7343db9d232749255dd9e3a58d94b86997) [@bep](https://github.com/bep) [#5615](https://github.com/gohugoio/hugo/issues/5615)
|
||||
* cache/namedmemcache: Fix data race [3f3187de](https://github.com/gohugoio/hugo/commit/3f3187de0f62107da19d9341aebd1d8414bff0ea) [@bep](https://github.com/bep)
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
content/en/showcase/fireship/bio.md
Normal file
|
@ -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/)
|
BIN
content/en/showcase/fireship/featured.png
Normal file
After Width: | Height: | Size: 134 KiB |
18
content/en/showcase/fireship/index.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
|
||||
title: fireship.io
|
||||
date: 2019-02-02
|
||||
description: "Showcase: \"Hugo helps us create complex technical content that integrates engaging web components\""
|
||||
siteURL: https://fireship.io
|
||||
siteSource: https://github.com/fireship-io/fireship.io
|
||||
byline: "[Jeff Delaney](https://github.com/codediodeio), Fireship.io Creator"
|
||||
---
|
||||
|
||||
After careful consideration of JavaScript/JSX-based static site generators, it became clear that Hugo was the only tool capable of handling our project's complex demands. Not only do we have multiple content formats and taxonomies, but we often need to customize the experience at a more granular level. The problems Hugo has solved for us include:
|
||||
|
||||
- **Render speed.** We know from past experience that JavaScript-based static site generators become very slow when you have thousands of pages and images.
|
||||
- **Feature-rich.** Our site has a long list of specialized needs and Hugo somehow manages to cover every single use case.
|
||||
- **Composability.** Hugo's partial and shortcode systems empower us to write DRY and maintainable templates.
|
||||
- **Simplicity.** Hugo is easy to learn (even without Go experience) and doesn't burden us with brittle dependencies.
|
||||
|
||||
The site is able to achieve Lighthouse performance scores of 95+, despite the fact that it is a fully interactive PWA that ships Angular and Firebase in the JS bundle. This is made possible by (1) prerendering content with Hugo and (2) lazily embedding native web components directly in the HTML and markdown. We provide a [detailed explanation](https://youtu.be/gun8OiGtlNc) of the architecture on YouTube and can't imagine development without Hugo.
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Local File Templates
|
||||
linktitle: Local File Templates
|
||||
description: Hugo's `readerDir` and `readFile` functions make it easy to traverse your project's directory structure and write file contents to your templates.
|
||||
description: Hugo's `readDir` and `readFile` functions make it easy to traverse your project's directory structure and write file contents to your templates.
|
||||
godocref: https://golang.org/pkg/os/#FileInfo
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
|
|
|
@ -162,7 +162,7 @@ The default behavior of Hugo is to pluralize list titles; hence the inflection o
|
|||
|
||||
### Section Template
|
||||
|
||||
This list template has been modified slightly from a template originally used in [spf13.com](http://spf13.com/). It makes use of [partial templates][partials] for the chrome of the rendered page rather than using a [base template][base] The examples that follow also use the [content view templates][views] `li.html` or `summary.html`.
|
||||
This list template has been modified slightly from a template originally used in [spf13.com](http://spf13.com/). It makes use of [partial templates][partials] for the chrome of the rendered page rather than using a [base template][base]. The examples that follow also use the [content view templates][views] `li.html` or `summary.html`.
|
||||
|
||||
{{< code file="layouts/section/posts.html" >}}
|
||||
{{ partial "header.html" . }}
|
||||
|
|
|
@ -20,7 +20,7 @@ toc: false
|
|||
|
||||
Hugo provides a robust theming system that is easy to implement yet feature complete. You can view the themes created by the Hugo community on the [Hugo themes website][hugothemes].
|
||||
|
||||
Hugo themes are powered by the excellent Go template library and are designed to reduce code duplication. They are easy to both customize and keep in synch with the upstream theme.
|
||||
Hugo themes are powered by the excellent Go template library and are designed to reduce code duplication. They are easy to both customize and keep in sync with the upstream theme.
|
||||
|
||||
[goprimer]: /templates/introduction/
|
||||
[hugothemes]: http://themes.gohugo.io/
|
||||
|
|
|
@ -45,7 +45,7 @@ Also note that a component that is part of a theme can have its own configuratio
|
|||
The same rules apply here: The left-most param/menu etc. with the same ID will win. There are some hidden and experimental namespace support in the above, which we will work to improve in the future, but theme authors are encouraged to create their own namespaces to avoid naming conflicts.
|
||||
|
||||
|
||||
[^1]: Including theme components in the themes is currently not supported for themes hosted on [The Hugo Themes Site](https://themes.gohugo.io/), but can be really useful if you want to create your own theme based on a theme you find on that site.
|
||||
[^1]: For themes hosted on the [Hugo Themes Showcase](https://themes.gohugo.io/) components need to be added as git submodules that point to the directory `exampleSite/themes`
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -19,10 +19,9 @@ toc: false
|
|||
---
|
||||
|
||||
* [enwrite](https://github.com/zzamboni/enwrite). Enwrite enables evernote-powered, statically generated blogs and websites. Now posting to your blog or updating your website is as easy as writing a new note in Evernote!
|
||||
* [caddy-hugo](https://github.com/hacdias/caddy-hugo). `caddy-hugo` is an add-on for [Caddy](https://caddyserver.com/) that delivers a good UI to edit the content of your Hugo website.
|
||||
* [Lipi](https://github.com/SohanChy/Lipi). Lipi is a native GUI frontend written in Java to manage your Hugo websites.
|
||||
* [Netlify CMS](https://netlifycms.org). Netlify CMS is an open source, serverless solution for managing Git based content in static sites, and it works on any platform that can host static sites. A [Hugo/Netlify CMS starter](https://github.com/netlify-templates/one-click-hugo-cms) is available to get new projects running quickly.
|
||||
* [Hokus CMS](https://www.hokus.io). Hokus CMS is an open source, multiplatform, easy to use, desktop application for Hugo. Build from simple to complex user interfaces for Hugo websites by choosing from a dozen ready-to-use components — all for free, with no vendor lock-in.
|
||||
* [Hokus CMS](https://github.com/julianoappelklein/hokus). Hokus CMS is an open source, multiplatform, easy to use, desktop application for Hugo. Build from simple to complex user interfaces for Hugo websites by choosing from a dozen ready-to-use components — all for free, with no vendor lock-in.
|
||||
|
||||
|
||||
## Commercial Services
|
||||
|
|
|
@ -24,11 +24,11 @@ The following starter kits are developed by active members of the Hugo community
|
|||
{{% /note %}}
|
||||
|
||||
* [Hugo Wrapper][hugow]. Hugo Wrapper is a POSIX-style shell script which acts as a wrapper to download and run Hugo binary for your platform. It can be executed in variety of [Operating Systems][hugow-test] and [Command Shells][hugow-test].
|
||||
* [Victor Hugo][]. Victor Hugo is a Hugo boilerplate for creating truly epic websites using Gulp + Webpack as an asset pipeline. Victor Hugo uses post-css and Babel for CSS and JavaScript, respectively, and is actively maintained.
|
||||
* [Victor Hugo][]. Victor Hugo is a Hugo boilerplate for creating truly epic websites using Webpack as an asset pipeline. Victor Hugo uses post-css and Babel for CSS and JavaScript, respectively, and is actively maintained.
|
||||
* [GOHUGO AMP][]. GoHugo AMP is a starter theme that aims to make it easy to adopt [Google's AMP Project][amp]. The starter kit comes with 40+ shortcodes and partials plus automatic structured data. The project also includes a [separate site with extensive documentation][gohugodocs].
|
||||
* [Blaupause][]. Blaupause is a developer-friendly Hugo starter kit based on Gulp tasks. It comes ES6-ready with several helpers for SVG and fonts and basic structure for HTML, SCSS, and JavaScript.
|
||||
* [hugulp][]. hugulp is a tool to optimize the assets of a Hugo website. The main idea is to recreate the famous Ruby on Rails Asset Pipeline, which minifies, concatenates and fingerprints the assets used in your website.
|
||||
* [Atlas][]. Atlas is a Hugo boilerplate designed to speed up development with support for Netlify, Netlify CMS, Gulp, Linting, SCSS, ES6 & more. It's actively maintained and contributions are always welcome.
|
||||
* [Atlas][]. Atlas is a Hugo boilerplate designed to speed up development with support for Netlify, Hugo Pipes, SCSS & more. It's actively maintained and contributions are always welcome.
|
||||
|
||||
|
||||
[addkit]: https://github.com/gohugoio/hugo/edit/master/docs/content/en/tools/starter-kits.md
|
||||
|
|
|
@ -42,3 +42,15 @@ Also see this Twitter thread:
|
|||
## Can I use the latest Hugo version on Netlify?
|
||||
|
||||
Yes you can! Read [this](/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify).
|
||||
|
||||
## I get "this feature is not available in your current Hugo version"
|
||||
|
||||
If you process `SCSS` or `SASS` to `CSS` in your Hugo project, you need the Hugo `extended` version, or else you may see this error message:
|
||||
|
||||
```bash
|
||||
error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
|
||||
```
|
||||
|
||||
We release two set of binaries for technical reasons. The extended is what you get by default, as an example, when you run `brew install hugo` on `macOS`. On the [release page](https://github.com/gohugoio/hugo/releases), look for archives with `extended` in the name.
|
||||
|
||||
To confirm, run `hugo version` and look for the word `extended`.
|
||||
|
|
|
@ -25,7 +25,7 @@ For information on creating shortcodes and templates that tap into Hugo's file-r
|
|||
The `.File` object contains the following fields:
|
||||
|
||||
.File.Path
|
||||
: the original relative path of the page (e.g., `content/posts/foo.en.md`)
|
||||
: the original relative path of the page, relative to the content dir (e.g., `posts/foo.en.md`)
|
||||
|
||||
.File.LogicalName
|
||||
: the name of the content file that represents a page (e.g., `foo.en.md`)
|
||||
|
|
|
@ -3,7 +3,7 @@ publish = "public"
|
|||
command = "hugo --gc --minify"
|
||||
|
||||
[context.production.environment]
|
||||
HUGO_VERSION = "0.53"
|
||||
HUGO_VERSION = "0.54.0"
|
||||
HUGO_ENV = "production"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
||||
|
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
|
|||
command = "hugo --gc --minify --enableGitInfo"
|
||||
|
||||
[context.split1.environment]
|
||||
HUGO_VERSION = "0.53"
|
||||
HUGO_VERSION = "0.54.0"
|
||||
HUGO_ENV = "production"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.deploy-preview.environment]
|
||||
HUGO_VERSION = "0.53"
|
||||
HUGO_VERSION = "0.54.0"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.branch-deploy.environment]
|
||||
HUGO_VERSION = "0.53"
|
||||
HUGO_VERSION = "0.54.0"
|
||||
|
||||
[context.next.environment]
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
|
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 2.7 MiB |
After Width: | Height: | Size: 65 KiB |
|
@ -5,7 +5,8 @@
|
|||
@import '_anchorforid';
|
||||
@import '_animation';
|
||||
@import '_documentation-styles';
|
||||
@import '_algolia';
|
||||
|
||||
@import 'docsearch.js/dist/cdn/docsearch.min';
|
||||
@import '_carousel';
|
||||
@import '_code';
|
||||
@import '_tabs';
|
||||
|
|
|
@ -3,7 +3,6 @@ import './anchorforid.js'
|
|||
import './clipboardjs.js'
|
||||
import './codeblocks.js'
|
||||
import './docsearch.js'
|
||||
//import './hljs.js'
|
||||
import './lazysizes.js'
|
||||
import './menutoggle.js'
|
||||
import './scrolldir.js'
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
{{/* NOTE: the Site's title, and if there is a page title, that is set too */}}
|
||||
<title>{{ block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1">
|
||||
{{ .Hugo.Generator }}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="mb3 f4">
|
||||
<a href="http://themes.gohugo.io" class="link mid-gray dim">
|
||||
<a href="https://themes.gohugo.io/" class="link mid-gray dim">
|
||||
Design a theme {{ partial "svg/link-ext.svg" (dict "fill" "#333" "size" "14") }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<form id="site-search-form" action="" role="search">
|
||||
<fieldset class="bn ma0 pa0">
|
||||
<label class="clip" for="search-input">Search</label>
|
||||
<input type="search" id="search-input" class="needs-js bg-left bg-transparent bn f5 input-reset lh-solid mt3 mt0-ns pl4 pv2 w5 white" placeholder="Search the Docs" name="search-input" value="" style="background: url('/images/icon-search.png') no-repeat 0 8px /16px 16px;;">
|
||||
<input type="search" id="search-input" class="needs-js bg-left bn f5 input-reset lh-solid mt3 mt0-ns pl4 pv2 w5 white" placeholder="Search the Docs" name="search-input" value="" style="background: transparent url('/images/icon-search.png') no-repeat 0 8px /16px 16px;">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<pre><code class="hljs nohighlight">{{ .Inner }}</code></pre>
|
||||
<pre><code class="nohighlight">{{ .Inner }}</code></pre>
|
||||
|
|
6
themes/gohugoioTheme/src/package-lock.json
generated
|
@ -2690,12 +2690,6 @@
|
|||
"minimalistic-assert": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"highlight.js": {
|
||||
"version": "9.12.0",
|
||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz",
|
||||
"integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=",
|
||||
"dev": true
|
||||
},
|
||||
"hmac-drbg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"docsearch.js": "^2.3.3",
|
||||
"extract-text-webpack-plugin": "^2.1.0",
|
||||
"file-loader": "^0.11.1",
|
||||
"highlight.js": "^9.11.0",
|
||||
"lazysizes": "^3.0.0",
|
||||
"postcss": "^5.2.16",
|
||||
"postcss-cssnext": "^2.10.0",
|
||||
|
|
37
themes/gohugoioTheme/src/readme.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
## Welcome to the SRC folder for the Gohugo Theme.
|
||||
|
||||
The contents of this folder are used to generate CSS and JavaScript. You may never have to touch anything here, unless you want to more deeply customize your styles.
|
||||
|
||||
## Tools
|
||||
|
||||
### npm
|
||||
|
||||
We use [npm](https://www.npmjs.com/) for package management The theme's `.gitignore` file should be kept intact to make sure that all files in the `node_modules` folder are not pushed to the repository.
|
||||
|
||||
### Webpack
|
||||
|
||||
We use Webpack to manage our asset pipeline. Arguably, Webpack is overkill for this use-case, but we're using it here because once it's set up (which we've done for you), it's really easy to use. If you want to use an external script, just add it via Yarn, and reference it in main.js. You'll find instructions in the js/main.js file.
|
||||
|
||||
### PostCSS
|
||||
|
||||
PostCSS is just CSS. You'll find `postcss.config.js` in the css folder. There you'll find that we're using [`postcss-import`](https://github.com/postcss/postcss-import) which allows us import css files directly from the node_modules folder, [`postcss-cssnext`](http://cssnext.io/features/) which gives us the power to use upcoming CSS features today. If you miss Sass you can find PostCss modules for those capabilities, too.
|
||||
|
||||
### Tachyons
|
||||
|
||||
This theme uses the [Tachyons CSS Library](http://tachyons.io/). It's about 15kb gzipped, highly modular, and each class is atomic so you never have to worry about overwriting your styles. It's a great library for themes because you can make most all the style changes you need right in your layouts.
|
||||
|
||||
## How to Use
|
||||
|
||||
You'll find the commands to run in `src/package.json`.
|
||||
|
||||
For development, you'll need Node with npm installed:
|
||||
|
||||
```bash
|
||||
$ cd themes/gohugo-theme/src/
|
||||
$ npm install
|
||||
$ npm start
|
||||
```
|
||||
|
||||
This will process both the postcss and scripts.
|
||||
|
||||
For production, instead of `npm start`, run `npm run build:production,` which will output minified versions of your files.
|
2
themes/gohugoioTheme/static/dist/main.css
vendored
|
@ -3,9 +3,9 @@
|
|||
|
||||
name = "Hugo Theme"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/budparr/gohugo.io/blob/master/LICENSE.md"
|
||||
licenselink = "https://github.com/gohugoio/gohugoioTheme/blob/master/license.md"
|
||||
description = ""
|
||||
homepage = "https://github.com/budparr/gohugo.io"
|
||||
homepage = "https://github.com/gohugoio/gohugoioTheme"
|
||||
tags = ["website"]
|
||||
features = ["", ""]
|
||||
min_version = 0.38
|
||||
|
|
|
@ -89,33 +89,33 @@ module.exports = env => {
|
|||
};
|
||||
|
||||
if (process.env.NODE_ENV == "production") {
|
||||
console.log("now with purge");
|
||||
CONFIG.plugins.push(
|
||||
new CleanWebpackPlugin(["./assets/output"], {
|
||||
root: __dirname,
|
||||
verbose: true,
|
||||
dry: false,
|
||||
allowExternal: true
|
||||
}),
|
||||
new PurgecssPlugin({
|
||||
paths: glob.sync([
|
||||
path.join(__dirname, "layouts/**/*.html")
|
||||
]),
|
||||
extractors: [
|
||||
{
|
||||
extractor: TailwindExtractor,
|
||||
extensions: ["html"]
|
||||
}
|
||||
],
|
||||
fontFace: false,
|
||||
whitelist: [
|
||||
"pagination",
|
||||
"#TableOfContents ul li",
|
||||
"chroma",
|
||||
"expand",
|
||||
"hljs"
|
||||
]
|
||||
})
|
||||
//, Temporarily moving purge to fix themes site.
|
||||
// new PurgecssPlugin({
|
||||
// paths: glob.sync([
|
||||
// path.join(__dirname, "layouts/**/*.html")
|
||||
// ]),
|
||||
// extractors: [
|
||||
// {
|
||||
// extractor: TailwindExtractor,
|
||||
// extensions: ["html"]
|
||||
// }
|
||||
// ],
|
||||
// fontFace: false,
|
||||
// whitelist: [
|
||||
// "pagination",
|
||||
// "#TableOfContents ul li",
|
||||
// "chroma",
|
||||
// "expand",
|
||||
// "hljs"
|
||||
// ]
|
||||
// })
|
||||
);
|
||||
}
|
||||
|
||||
|
|