mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Squashed 'docs/' changes from 81847981f..d88477eb3
d88477eb3 Fix some more redirect alias loops 209735670 Update features.md d4ec6ef87 Remove redirect loop from functions/default ce14da435 Fix the AlternativeOutputFormats/OutputFormats examples f64a22469 Update cond.md 357a70a32 Remove redirect loop from templates/404 4ad7b01ba Remove some aliases that were causing infinite redirect loops fd378e66a Fix alias redirect loop ec3629f6f Revert "Set code background to white" ffc56b880 Revert "Make inline code gray" 2a964e261 Make inline code gray 44069e09c Set code background to white d39c790d0 Linked my own blog2md migration script 3e55267be Release 0.46 7b6cfdd8b releaser: Prepare repository for 0.47-DEV d4cb54806 releaser: Add release notes to /docs for release of 0.46 6518ac7e7 releaser: Bump versions for release of 0.46 e54334d5c Merge commit '766085c2dc6fc95ac30fda2a9ebde2355fc12554' git-subtree-dir: docs git-subtree-split: d88477eb3a1959e2764d6025f5aa7a57a4a611e7
This commit is contained in:
parent
766085c2dc
commit
3a44bf182f
20 changed files with 305 additions and 21 deletions
239
alias.txt
Normal file
239
alias.txt
Normal file
|
@ -0,0 +1,239 @@
|
|||
content/en/tools/frontends.md:aliases: []
|
||||
content/en/tools/search.md:aliases: []
|
||||
content/en/tools/migrations.md:aliases: [/developer-tools/migrations/,/developer-tools/migrated/]
|
||||
content/en/tools/editors.md:aliases: []
|
||||
content/en/tools/starter-kits.md:aliases: [/developer-tools/migrations/,/developer-tools/migrated/]
|
||||
content/en/tools/other.md:aliases: []
|
||||
content/en/tools/_index.md:aliases: [/tools/]
|
||||
content/en/about/license.md:aliases: [/meta/license]
|
||||
content/en/about/benefits.md:aliases: []
|
||||
content/en/about/hugo-and-gdpr.md:aliases: [/privacy/,/gdpr/]
|
||||
content/en/about/features.md:* Redirects via [aliases][]
|
||||
content/en/about/features.md:[aliases]: /content-management/urls/#aliases
|
||||
content/en/about/what-is-hugo.md:aliases: [/overview/introduction/,/about/why-i-built-hugo/]
|
||||
content/en/about/new-in-032/index.md:aliases: []
|
||||
content/en/about/_index.md:aliases: [/about-hugo/,/docs/]
|
||||
content/en/troubleshooting/build-performance.md:aliases: []
|
||||
content/en/troubleshooting/faq.md:aliases: [/faq/]
|
||||
content/en/troubleshooting/_index.md:aliases: [/troubleshooting/faqs/,/faqs/]
|
||||
content/en/hosting-and-deployment/hosting-on-firebase.md:aliases: []
|
||||
content/en/hosting-and-deployment/hosting-on-github.md:aliases: [/tutorials/github-pages-blog/]
|
||||
content/en/hosting-and-deployment/hosting-on-netlify.md:aliases: []
|
||||
content/en/hosting-and-deployment/deployment-with-nanobox.md:aliases: [/tutorials/deployment-with-nanobox/]
|
||||
content/en/hosting-and-deployment/deployment-with-wercker.md:aliases: [/tutorials/automated-deployments/]
|
||||
content/en/hosting-and-deployment/deployment-with-rsync.md:aliases: [/tutorials/deployment-with-rsync/]
|
||||
content/en/hosting-and-deployment/hosting-on-keycdn.md:aliases: []
|
||||
content/en/hosting-and-deployment/hosting-on-gitlab.md:aliases: [/tutorials/hosting-on-gitlab/]
|
||||
content/en/hosting-and-deployment/_index.md:aliases: []
|
||||
content/en/hosting-and-deployment/hosting-on-bitbucket.md:aliases: [/tutorials/hosting-on-bitbucket/]
|
||||
content/en/hugo-pipes/introduction.md:aliases: [/assets/]
|
||||
content/en/hugo-pipes/introduction.md:### Method aliases
|
||||
content/en/hugo-pipes/introduction.md:Non-transformation methods deprived of such aliases are `resources.Get`, `resources.FromString`, `resources.ExecuteAsTemplate` and `resources.Concat`.
|
||||
content/en/getting-started/directory-structure.md:aliases: [/overview/source-directory/]
|
||||
content/en/getting-started/usage.md:aliases: [/overview/usage/,/extras/livereload/,/doc/usage/,/usage/]
|
||||
content/en/getting-started/quick-start.md:aliases: [/quickstart/,/overview/quickstart/]
|
||||
content/en/getting-started/installing.md:aliases: [/tutorials/installing-on-windows/,/tutorials/installing-on-mac/,/overview/installing/,/getting-started/install,/install/]
|
||||
content/en/getting-started/configuration.md:aliases: [/overview/source-directory/,/overview/configuration/]
|
||||
content/en/getting-started/configuration.md:In the list to the right, values starting with ":" are date handlers with a special meaning (see below). The others are just names of date parameters (case insensitive) in your front matter configuration. Also note that Hugo have some built-in aliases to the above: `lastmod` => `modified`, `publishDate` => `pubdate`, `published` and `expiryDate` => `unpublishdate`. With that, as an example, using `pubDate` as a date in front matter, will, by default, be assigned to `.PublishDate`.
|
||||
content/en/getting-started/_index.md:aliases: [/overview/introduction/]
|
||||
content/en/news/0.18-relnotes/index.md:aliases: [/0-18/]
|
||||
content/en/news/0.19-relnotes/index.md:aliases: [/0-19/]
|
||||
content/en/news/0.20.3-relnotes/index.md:aliases: [/0-20-3/]
|
||||
content/en/news/0.20.2-relnotes/index.md:aliases: [/0-20-2/]
|
||||
content/en/news/0.24.1-relnotes/index.md:aliases: [/0-24-1/]
|
||||
content/en/news/0.20.4-relnotes/index.md:aliases: [/0-20-4/]
|
||||
content/en/news/0.20.5-relnotes/index.md:aliases: [/0-20-5/]
|
||||
content/en/news/0.21-relnotes/index.md:aliases: [/0-21/]
|
||||
content/en/news/0.20-relnotes/index.md:aliases: [/0-20/]
|
||||
content/en/news/0.25.1-relnotes/index.md:aliases: [/0-25-1/]
|
||||
content/en/news/0.10-relnotes/index.md:- Support for unicode URLs, aliases and indexes
|
||||
content/en/news/http2-server-push-in-hugo.md:aliases: []
|
||||
content/en/news/http2-server-push-in-hugo.md:The template above creates 301 redirects for your [aliases](/content-management/urls/#aliases), so you will probably want to turn off aliases in your `config.toml`: `disableAliases = true`.
|
||||
content/en/news/0.20.1-relnotes/index.md:aliases: [/0-20-1/]
|
||||
content/en/news/0.25-relnotes/index.md:aliases: [/0-25/]
|
||||
content/en/news/0.24-relnotes/index.md:aliases: [/0-24/]
|
||||
content/en/news/0.16-relnotes/index.md:aliases: [/0-16/]
|
||||
content/en/news/0.17-relnotes/index.md:aliases: [/0-17/]
|
||||
content/en/news/0.20.7-relnotes/index.md:aliases: [/0-20-7/]
|
||||
content/en/news/0.20.6-relnotes/index.md:aliases: [/0-20-6/]
|
||||
content/en/news/0.22-relnotes/index.md:aliases: [/0-22/]
|
||||
content/en/news/0.22-relnotes/index.md:* Add `noindex` tag to HTML generated by Hugo aliases [d5ab7f08](https://github.com/gohugoio/hugo/commit/d5ab7f087d967b30e7de7d789e6ad3091b42f1f7) [@onedrawingperday](https://github.com/onedrawingperday)
|
||||
content/en/news/0.23-relnotes/index.md:aliases: [/0-23/]
|
||||
content/en/news/0.22.1-relnotes/index.md:aliases: [/0-22-1/]
|
||||
content/en/news/_index.md:aliases: [/release-notes/]
|
||||
content/en/variables/taxonomy.md:aliases: []
|
||||
content/en/variables/site.md:aliases: [/variables/site-variables/]
|
||||
content/en/variables/menus.md:aliases: [/variables/menu/]
|
||||
content/en/variables/git.md:aliases: [/extras/gitinfo/]
|
||||
content/en/variables/files.md:aliases: [/variables/file-variables/]
|
||||
content/en/variables/page.md:aliases: []
|
||||
content/en/variables/shortcodes.md:aliases: []
|
||||
content/en/variables/sitemap.md:aliases: []
|
||||
content/en/variables/_index.md:aliases: [/templates/variables/]
|
||||
content/en/variables/hugo.md:aliases: []
|
||||
content/en/contribute/themes.md:aliases: [/contribute/theme/]
|
||||
content/en/contribute/documentation.md:aliases: [/contribute/docs/]
|
||||
content/en/contribute/development.md:aliases: [/contribute/development/]
|
||||
content/en/contribute/development.md:Now we'll create an [alias in Bash](http://tldp.org/LDP/abs/html/aliases.html) so that typing `git` actually runs `Hub`:
|
||||
content/en/contribute/_index.md:aliases: [/tutorials/how-to-contribute-to-hugo/,/community/contributing/]
|
||||
content/en/documentation.md:aliases: []
|
||||
content/en/functions/countrunes.md:aliases: [/functions/countrunes/]
|
||||
content/en/functions/ref.md:aliases: []
|
||||
content/en/functions/safeHTMLAttr.md:aliases: []
|
||||
content/en/functions/echoparam.md:aliases: []
|
||||
content/en/functions/urls.Parse.md:aliases: []
|
||||
content/en/functions/ismenucurrent.md:aliases: []
|
||||
content/en/functions/last.md:aliases: []
|
||||
content/en/functions/countwords.md:aliases: [/functions/countwords/]
|
||||
content/en/functions/i18n.md:aliases: []
|
||||
content/en/functions/pluralize.md:aliases: []
|
||||
content/en/functions/htmlEscape.md:aliases: []
|
||||
content/en/functions/default.md:aliases: []
|
||||
content/en/functions/lower.md:aliases: []
|
||||
content/en/functions/lang.Merge.md:aliases: []
|
||||
content/en/functions/intersect.md:aliases: []
|
||||
content/en/functions/jsonify.md:aliases: []
|
||||
content/en/functions/lt.md:aliases: []
|
||||
content/en/functions/shuffle.md:aliases: []
|
||||
content/en/functions/replacere.md:aliases: []
|
||||
content/en/functions/uniq.md:aliases: []
|
||||
content/en/functions/sha.md:aliases: []
|
||||
content/en/functions/split.md:aliases: []
|
||||
content/en/functions/getenv.md:aliases: []
|
||||
content/en/functions/first.md:aliases: []
|
||||
content/en/functions/strings.TrimRight.md:aliases: []
|
||||
content/en/functions/hasmenucurrent.md:aliases: []
|
||||
content/en/functions/querify.md:aliases: []
|
||||
content/en/functions/strings.TrimSuffix.md:aliases: []
|
||||
content/en/functions/get.md:aliases: []
|
||||
content/en/functions/int.md:aliases: []
|
||||
content/en/functions/slicestr.md:aliases: []
|
||||
content/en/functions/singularize.md:aliases: []
|
||||
content/en/functions/strings.RuneCount.md:aliases: []
|
||||
content/en/functions/replace.md:aliases: []
|
||||
content/en/functions/haschildren.md:aliases: []
|
||||
content/en/functions/title.md:aliases: []
|
||||
content/en/functions/seq.md:aliases: []
|
||||
content/en/functions/union.md:aliases: []
|
||||
content/en/functions/md5.md:aliases: []
|
||||
content/en/functions/apply.md:aliases: []
|
||||
content/en/functions/GetPage.md:aliases: []
|
||||
content/en/functions/ge.md:aliases: []
|
||||
content/en/functions/readfile.md:aliases: []
|
||||
content/en/functions/index-function.md:aliases: [/functions/index/]
|
||||
content/en/functions/string.md:aliases: []
|
||||
content/en/functions/dict.md:aliases: []
|
||||
content/en/functions/math.md:aliases: []
|
||||
content/en/functions/NumFmt.md:aliases: []
|
||||
content/en/functions/readdir.md:aliases: []
|
||||
content/en/functions/hasPrefix.md:aliases: []
|
||||
content/en/functions/le.md:aliases: []
|
||||
content/en/functions/safeURL.md:aliases: []
|
||||
content/en/functions/absurl.md:aliases: []
|
||||
content/en/functions/base64.md:aliases: []
|
||||
content/en/functions/unix.md:aliases: []
|
||||
content/en/functions/safeCSS.md:aliases: []
|
||||
content/en/functions/render.md:aliases: []
|
||||
content/en/functions/abslangurl.md:aliases: []
|
||||
content/en/functions/partialCached.md:aliases: []
|
||||
content/en/functions/strings.TrimPrefix.md:aliases: []
|
||||
content/en/functions/slice.md:aliases: []
|
||||
content/en/functions/ne.md:aliases: []
|
||||
content/en/functions/time.md:aliases: []
|
||||
content/en/functions/strings.TrimLeft.md:aliases: []
|
||||
content/en/functions/delimit.md:aliases: []
|
||||
content/en/functions/relLangURL.md:aliases: []
|
||||
content/en/functions/in.md:aliases: []
|
||||
content/en/functions/format.md:aliases: []
|
||||
content/en/functions/param.md:aliases: []
|
||||
content/en/functions/now.md:aliases: []
|
||||
content/en/functions/findRe.md:aliases: []
|
||||
content/en/functions/eq.md:aliases: []
|
||||
content/en/functions/errorf.md:aliases: []
|
||||
content/en/functions/relurl.md:aliases: []
|
||||
content/en/functions/after.md:aliases: []
|
||||
content/en/functions/scratch.md:aliases: [/extras/scratch/,/doc/scratch/]
|
||||
content/en/functions/substr.md:aliases: []
|
||||
content/en/functions/plainify.md:aliases: []
|
||||
content/en/functions/humanize.md:aliases: []
|
||||
content/en/functions/adddate.md:aliases: []
|
||||
content/en/functions/fileExists.md:aliases: []
|
||||
content/en/functions/upper.md:aliases: []
|
||||
content/en/functions/sort.md:aliases: []
|
||||
content/en/functions/len.md:aliases: []
|
||||
content/en/functions/safeJS.md:aliases: []
|
||||
content/en/functions/htmlUnescape.md:aliases: []
|
||||
content/en/functions/float.md:aliases: []
|
||||
content/en/functions/markdownify.md:aliases: []
|
||||
content/en/functions/_index.md:aliases: [/layout/functions/,/templates/functions]
|
||||
content/en/functions/gt.md:aliases: []
|
||||
content/en/functions/range.md:aliases: []
|
||||
content/en/functions/relref.md:aliases: []
|
||||
content/en/functions/isset.md:aliases: []
|
||||
content/en/content-management/organization/index.md:aliases: [/content/sections/]
|
||||
content/en/content-management/formats.md:aliases: [/content/markdown-extras/,/content/supported-formats/,/doc/supported-formats/,/tutorials/mathjax/]
|
||||
content/en/content-management/authors.md:aliases: [/content/archetypes/]
|
||||
content/en/content-management/front-matter.md:aliases: [/content/front-matter/]
|
||||
content/en/content-management/front-matter.md:aliases
|
||||
content/en/content-management/front-matter.md:: an array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details.
|
||||
content/en/content-management/front-matter.md:[aliases]: /content-management/urls/#aliases/
|
||||
content/en/content-management/taxonomies.md:aliases: [/taxonomies/overview/,/taxonomies/usage/,/indexes/overview/,/doc/indexes/,/extras/indexes]
|
||||
content/en/content-management/static-files.md:aliases: [/static-files]
|
||||
content/en/content-management/summaries.md:aliases: [/content/summaries/,/content-management/content-summaries/]
|
||||
content/en/content-management/comments.md:aliases: [/extras/comments/]
|
||||
content/en/content-management/menus.md:aliases: [/extras/menus/]
|
||||
content/en/content-management/urls.md:description: Hugo supports permalinks, aliases, link canonicalization, and multiple options for handling relative vs absolute URLs.
|
||||
content/en/content-management/urls.md:keywords: [aliases,redirects,permalinks,urls]
|
||||
content/en/content-management/urls.md:aliases: [/extras/permalinks/,/extras/aliases/,/extras/urls/,/doc/redirects/,/doc/alias/,/doc/aliases/]
|
||||
content/en/content-management/urls.md:Luckily, redirects can be handled easily with **aliases** in Hugo.
|
||||
content/en/content-management/urls.md:Let's assume you create a new piece of content at `content/posts/my-awesome-blog-post.md`. The content is a revision of your previous post at `content/posts/my-original-url.md`. You can create an `aliases` field in the front matter of your new `my-awesome-blog-post.md` where you can add previous paths. The following examples show how to create this field in TOML and YAML front matter, respectively.
|
||||
content/en/content-management/urls.md:aliases = [
|
||||
content/en/content-management/urls.md:aliases:
|
||||
content/en/content-management/urls.md:Now when you visit any of the locations specified in aliases---i.e., *assuming the same site domain*---you'll be redirected to the page they are specified on. For example, a visitor to `example.com/posts/my-original-url/` will be immediately redirected to `example.com/posts/my-awesome-post/`.
|
||||
content/en/content-management/urls.md:On [multilingual sites][multilingual], each translation of a post can have unique aliases. To use the same alias across multiple languages, prefix it with the language code.
|
||||
content/en/content-management/urls.md:aliases:
|
||||
content/en/content-management/urls.md:When aliases are specified, Hugo creates a directory to match the alias entry. Inside the directory, Hugo creates an `.html` file specifying the canonical URL for the page and the new redirect target.
|
||||
content/en/content-management/urls.md:aliases: [/posts/my-old-url/]
|
||||
content/en/content-management/urls.md:1. Hugo makes no assumptions about aliases. They also do not change based
|
||||
content/en/content-management/sections.md:aliases: [/content/sections/]
|
||||
content/en/content-management/related.md:aliases: [/content/related/,/related/]
|
||||
content/en/content-management/archetypes.md:aliases: [/content/archetypes/]
|
||||
content/en/content-management/toc.md:aliases: [/extras/toc/]
|
||||
content/en/content-management/cross-references.md:aliases: [/extras/crossreferences/]
|
||||
content/en/content-management/multilingual.md:aliases: [/content/multilingual/,/tutorials/create-a-multilingual-site/]
|
||||
content/en/content-management/shortcodes.md:aliases: [/extras/shortcodes/]
|
||||
content/en/content-management/types.md:aliases: [/content/types]
|
||||
content/en/content-management/syntax-highlighting.md:aliases: [/extras/highlighting/,/extras/highlight/,/tools/syntax-highlighting/]
|
||||
content/en/content-management/syntax-highlighting.md:The full list of Chroma lexers and their aliases (which is the identifier used in the `hightlight` template func or when doing highlighting in code fences):
|
||||
content/en/content-management/_index.md:aliases: [/content/,/content/organization]
|
||||
content/en/templates/taxonomy-templates.md:aliases: [/taxonomies/displaying/,/templates/terms/,/indexes/displaying/,/taxonomies/templates/,/indexes/ordering/, /templates/taxonomies/, /templates/taxonomy/]
|
||||
content/en/templates/sitemap-template.md:aliases: [/layout/sitemap/,/templates/sitemap/]
|
||||
content/en/templates/lookup-order.md:aliases: [/templates/lookup/]
|
||||
content/en/templates/base.md:aliases: [/templates/blocks/,/templates/base-templates-and-blocks/]
|
||||
content/en/templates/alternatives.md:aliases: [/templates/ace/,/templates/amber/]
|
||||
content/en/templates/views.md:aliases: []
|
||||
content/en/templates/shortcode-templates.md:aliases: []
|
||||
content/en/templates/robots.md:aliases: [/extras/robots-txt/]
|
||||
content/en/templates/section-templates.md:aliases: [/templates/sections/]
|
||||
content/en/templates/pagination.md:aliases: [/extras/pagination,/doc/pagination/]
|
||||
content/en/templates/homepage.md:aliases: [/layout/homepage/,/templates/homepage-template/]
|
||||
content/en/templates/introduction.md:aliases: [/layouts/introduction/,/layout/introduction/, /templates/go-templates/]
|
||||
content/en/templates/template-debugging.md:aliases: []
|
||||
content/en/templates/menu-templates.md:aliases: [/templates/menus/]
|
||||
content/en/templates/lists.md:aliases: [/templates/list/,/layout/indexes/]
|
||||
content/en/templates/ordering-and-grouping.md:aliases: [/templates/ordering/,/templates/grouping/]
|
||||
content/en/templates/partials.md:aliases: [/templates/partial/,/layout/chrome/,/extras/analytics/]
|
||||
content/en/templates/data-templates.md:aliases: [/extras/datafiles/,/extras/datadrivencontent/,/doc/datafiles/]
|
||||
content/en/templates/single-page-templates.md:aliases: [/layout/content/]
|
||||
content/en/templates/404.md:aliases: []
|
||||
content/en/templates/files.md:aliases: [/extras/localfiles/,/templates/local-files/]
|
||||
content/en/templates/internal.md:aliases: []
|
||||
content/en/templates/output-formats.md:aliases: [/templates/outputs/,/extras/output-formats/,/content-management/custom-outputs/]
|
||||
content/en/templates/output-formats.md:: used in situations only relevant for `HTML`-type formats; e.g., page aliases.
|
||||
content/en/templates/_index.md:aliases: [/templates/overview/,/templates/content]
|
||||
content/en/maintenance/_index.md:aliases: []
|
||||
content/en/showcase/1password-support/index.md:aliases: [/showcase/1password/]
|
||||
content/en/themes/creating.md:aliases: [/themes/creation/,/tutorials/creating-a-new-theme/]
|
||||
content/en/themes/theme-components.md:aliases: [/themes/customize/,/themes/customizing/]
|
||||
content/en/themes/installing-and-using-themes.md:aliases: [/themes/usage/,/themes/installing/]
|
||||
content/en/themes/_index.md:aliases: [/themes/overview/]
|
|
@ -69,7 +69,7 @@ twitter = "GoHugoIO"
|
|||
[params]
|
||||
description = "The world’s fastest framework for building websites"
|
||||
## Used for views in rendered HTML (i.e., rather than using the .Hugo variable)
|
||||
release = "0.45.1"
|
||||
release = "0.46"
|
||||
## Setting this to true will add a "noindex" to *EVERY* page on the site
|
||||
removefromexternalsearch = false
|
||||
## Gh repo for site footer (include trailing slash)
|
||||
|
|
|
@ -12,7 +12,6 @@ menu:
|
|||
weight: 20
|
||||
sections_weight: 20
|
||||
draft: false
|
||||
aliases: [/about/features]
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ menu:
|
|||
weight: 150
|
||||
weight: 150 #rem
|
||||
draft: false
|
||||
aliases: [/content/multilingual/,/content-management/multilingual/,/tutorials/create-a-multilingual-site/]
|
||||
aliases: [/content/multilingual/,/tutorials/create-a-multilingual-site/]
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ menu:
|
|||
weight: 130
|
||||
weight: 130 #rem
|
||||
draft: false
|
||||
aliases: [/extras/toc/,/content-management/toc/]
|
||||
aliases: [/extras/toc/]
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ menu:
|
|||
docs:
|
||||
parent: "functions"
|
||||
signature: ["cond CONTROL VAR1 VAR2"]
|
||||
aliases: [/functions/cond/]
|
||||
hugoversion: 0.27
|
||||
relatedfuncs: [default]
|
||||
toc: false
|
||||
|
@ -29,4 +28,4 @@ Would emit "goose" if the `$geese` array has exactly 1 item, or "geese" otherwis
|
|||
Whenever you use a `cond` function, *both* variable expressions are *always* evaluated. This means that a usage like `cond false (div 1 0) 27` will throw an error because `div 1 0` will be evaluated *even though the condition is false*.
|
||||
|
||||
In other words, the `cond` function does *not* provide [short-circuit evaluation](https://en.wikipedia.org/wiki/Short-circuit_evaluation) and does *not* work like a normal [ternary operator](https://en.wikipedia.org/wiki/%3F:) that will pass over the first expression if the condition returns `false`.
|
||||
{{% /warning %}}
|
||||
{{% /warning %}}
|
||||
|
|
|
@ -15,7 +15,6 @@ workson: []
|
|||
hugoversion:
|
||||
relatedfuncs: []
|
||||
deprecated: false
|
||||
aliases: [/functions/countrunes/]
|
||||
---
|
||||
|
||||
In contrast with `countwords` function, which counts every word in a string, the `countrunes` function determines the number of runes in the content and excludes any whitespace. This has specific utility if you are dealing with CJK-like languages.
|
||||
|
|
|
@ -15,7 +15,6 @@ workson: []
|
|||
hugoversion:
|
||||
relatedfuncs: [countrunes]
|
||||
deprecated: false
|
||||
aliases: [/functions/countwords/]
|
||||
---
|
||||
|
||||
The template function works similar to the [.WordCount page variable][pagevars].
|
||||
|
|
|
@ -18,7 +18,7 @@ hugoversion:
|
|||
relatedfuncs: []
|
||||
deprecated: false
|
||||
draft: false
|
||||
aliases: [/functions/default/]
|
||||
aliases: []
|
||||
needsexamples: false
|
||||
---
|
||||
|
||||
|
|
BIN
content/en/news/0.46-relnotes/featured-hugo-46-poster.png
Normal file
BIN
content/en/news/0.46-relnotes/featured-hugo-46-poster.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 67 KiB |
49
content/en/news/0.46-relnotes/index.md
Normal file
49
content/en/news/0.46-relnotes/index.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
|
||||
---
|
||||
date: 2018-08-01
|
||||
title: "The Summer of Hugo"
|
||||
description: "Hugo 0.46: Full SCSS/SASS import inheritance support, rework of Hugo Pipes vs. multilingual, and more …"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
**Hugo 0.46** is the closing credits to **The Summer of Hugo**. While most people have been relaxing on the beach, Hugo has been really busy:
|
||||
|
||||
* **0.42, June 12, 2018**: [Theme Composition and Inheritance!](https://gohugo.io/news/0.42-relnotes/)
|
||||
* **0.43, July 9, 2018**: [Hugo Pipes!](https://gohugo.io/news/0.43-relnotes/)
|
||||
|
||||
This was followed by some more technical follow-up releases. And today, when July has turned into August, we come with another one. It's not a big release. But with the big interest in **Hugo Pipes**, we felt that it was important to get this out there sooner rather than later.
|
||||
|
||||
There are two main items in this release:
|
||||
|
||||
1. We have added a custom SCSS/SASS import resolver that respects Hugo's project/themes filesystem hierarchy anywhere in `/assets`. Using the LibSass' resolver alone only made this work for the entry folder.
|
||||
2. Resources fetched via `resources.Get` and similar are now language agnostic. The thought behind the original implementation was maximum flexibility with support for `assetDir` per language. In practice, this was a bad idea, as it made some CSS imports hard to get working in multilingual setups, and you got duplication of identical content for no good reason, with added processing time.
|
||||
|
||||
This release represents **12 contributions by 2 contributors** to the main Hugo code base.
|
||||
|
||||
A special thanks in this release goes to [@onedrawingperday](https://github.com/onedrawingperday) for his excellent work maintaining the fast-growing [Themes Site](https://themes.gohugo.io/).
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **5 contributions by 3 contributors**.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 27596+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 442+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 245+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
|
||||
* Resources fetched via `resources.Get` and similar are now considered global across languages. If you need, as an example, to create a CSS per language, you need to set the path yourself.
|
||||
|
||||
## Enhancements
|
||||
|
||||
* Add `templates.Exists` template function. This can be used to check if a template, e.g. a partial, exists in the project or any of the themes in use. [0ba19c57](https://github.com/gohugoio/hugo/commit/0ba19c57f180c33b41c64335ea1d1c89335d34c0) [@bep](https://github.com/bep) [#5010](https://github.com/gohugoio/hugo/issues/5010)
|
||||
* Remove superflous loop [0afa2897](https://github.com/gohugoio/hugo/commit/0afa2897a0cf90f4348929ef432202efddc183a0) [@bep](https://github.com/bep)
|
||||
* Update Chroma [b5d13ca1](https://github.com/gohugoio/hugo/commit/b5d13ca16bf106c1bc29c2a5295cd231d1bf13fd) [@bep](https://github.com/bep) [#5019](https://github.com/gohugoio/hugo/issues/5019)
|
||||
* Make resources fetched via `resources.Get` and similar language agnostic [6b02f5c0](https://github.com/gohugoio/hugo/commit/6b02f5c0f4e0ba1730aebc5a590a111548233bd5) [@bep](https://github.com/bep) [#5017](https://github.com/gohugoio/hugo/issues/5017)
|
||||
* Improve SCSS project vs themes import resolution [f219ac09](https://github.com/gohugoio/hugo/commit/f219ac09f6b7e26d84599401512233d77c1bdb4c) [@bep](https://github.com/bep) [#5008](https://github.com/gohugoio/hugo/issues/5008)
|
||||
* Improve _ prefix handling in SCSS imports [88e447c4](https://github.com/gohugoio/hugo/commit/88e447c449608523d87c517396bde31a62f392b6) [@bep](https://github.com/bep) [#5008](https://github.com/gohugoio/hugo/issues/5008)
|
||||
|
||||
## Fixes
|
||||
* Fix file paths for uncached transformed images [b718d743](https://github.com/gohugoio/hugo/commit/b718d743b7a2eff3bea74ced57147825294a629f) [@RJacksonm1](https://github.com/RJacksonm1) [#5012](https://github.com/gohugoio/hugo/issues/5012)
|
||||
* Fix image cache eviction for sites with subdir in baseURL [786f7230](https://github.com/gohugoio/hugo/commit/786f72302f65580ca8d1df2132a7756584539ea0) [@bep](https://github.com/bep) [#5006](https://github.com/gohugoio/hugo/issues/5006)
|
|
@ -13,7 +13,7 @@ menu:
|
|||
weight: 120
|
||||
weight: 120 #rem
|
||||
draft: false
|
||||
aliases: [/templates/404/]
|
||||
aliases: []
|
||||
toc: false
|
||||
---
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ menu:
|
|||
weight: 10
|
||||
sections_weight: 10
|
||||
draft: false
|
||||
aliases: [/templates/introduction/,/layouts/introduction/,/layout/introduction/, /templates/go-templates/]
|
||||
aliases: [/layouts/introduction/,/layout/introduction/, /templates/go-templates/]
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ menu:
|
|||
weight: 150
|
||||
sections_weight: 150
|
||||
draft: false
|
||||
aliases: [/templates/rss/]
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
@ -100,7 +99,7 @@ In your `header.html` template, you can specify your RSS feed in your `<head></h
|
|||
|
||||
```go-html-template
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
```
|
||||
|
||||
|
@ -108,7 +107,7 @@ If you only want the RSS link, you can query the formats:
|
|||
|
||||
```go-html-template
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
{{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
```
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ menu:
|
|||
weight: 01
|
||||
sections_weight: 01
|
||||
draft: false
|
||||
aliases: [/tools/]
|
||||
---
|
||||
|
||||
One of Hugo's greatest strengths is it's passionate---and always evolving---developer community. With the exception of the `highlight` shortcode mentioned in [Syntax Highlighting][syntax], the tools and other projects featured in this section are offerings from both commercial services and open-source projects, many of which are developed by Hugo developers just like you.
|
||||
|
|
|
@ -47,6 +47,7 @@ Alternatively, you can use the new [Jekyll import command](/commands/hugo_import
|
|||
## WordPress
|
||||
|
||||
- [wordpress-to-hugo-exporter](https://github.com/SchumacherFM/wordpress-to-hugo-exporter) - A one-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Hugo. (Note: If you have trouble using this plugin, you can [export your site for Jekyll](https://wordpress.org/plugins/jekyll-exporter/) and use Hugo's built in Jekyll converter listed above.)
|
||||
- [blog2md](https://github.com/palaniraja/blog2md) - Works with [exported xml](https://en.support.wordpress.com/export/) file of your free YOUR-TLD.wordpress.com website. It also saves approved comments to `YOUR-POST-NAME-comments.md` file along with posts.
|
||||
|
||||
## Tumblr
|
||||
|
||||
|
@ -66,6 +67,7 @@ Alternatively, you can use the new [Jekyll import command](/commands/hugo_import
|
|||
|
||||
- [blogimport](https://github.com/natefinch/blogimport) - A tool to import from Blogger posts to Hugo.
|
||||
- [blogger-to-hugo](https://bitbucket.org/petraszd/blogger-to-hugo) - Another tool to import Blogger posts to Hugo. It also downloads embedded images so they will be stored locally.
|
||||
- [blog2md](https://github.com/palaniraja/blog2md) - Works with [exported xml](https://support.google.com/blogger/answer/41387?hl=en) file of your YOUR-TLD.blogspot.com website. It also saves comments to `YOUR-POST-NAME-comments.md` file along with posts.
|
||||
|
||||
## Contentful
|
||||
|
||||
|
@ -74,4 +76,4 @@ Alternatively, you can use the new [Jekyll import command](/commands/hugo_import
|
|||
|
||||
## BlogML
|
||||
|
||||
- [BlogML2Hugo](https://github.com/jijiechen/BlogML2Hugo) - A tool that helps you convert BlogML xml file to Hugo markdown files. Users need to take care of links to attachments and images by themselves. This helps the blogs that export BlogML files (e.g. BlogEngine.NET) tramsform to hugo sites easily.
|
||||
- [BlogML2Hugo](https://github.com/jijiechen/BlogML2Hugo) - A tool that helps you convert BlogML xml file to Hugo markdown files. Users need to take care of links to attachments and images by themselves. This helps the blogs that export BlogML files (e.g. BlogEngine.NET) tramsform to hugo sites easily.
|
||||
|
|
|
@ -15,7 +15,7 @@ menu:
|
|||
weight: 20
|
||||
weight: 20
|
||||
sections_weight: 20
|
||||
aliases: [/variables/page/]
|
||||
aliases: []
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ publish = "public"
|
|||
command = "hugo"
|
||||
|
||||
[context.production.environment]
|
||||
HUGO_VERSION = "0.45.1"
|
||||
HUGO_VERSION = "0.46"
|
||||
HUGO_ENV = "production"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
||||
|
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
|
|||
command = "hugo --enableGitInfo"
|
||||
|
||||
[context.split1.environment]
|
||||
HUGO_VERSION = "0.45.1"
|
||||
HUGO_VERSION = "0.46"
|
||||
HUGO_ENV = "production"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "hugo --buildFuture -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.deploy-preview.environment]
|
||||
HUGO_VERSION = "0.45.1"
|
||||
HUGO_VERSION = "0.46"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "hugo -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.branch-deploy.environment]
|
||||
HUGO_VERSION = "0.45.1"
|
||||
HUGO_VERSION = "0.46"
|
||||
|
||||
[context.next.environment]
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Loading…
Reference in a new issue