mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
Add descriptions to features section
This commit is contained in:
@@ -13,7 +13,7 @@ aliases: [/overview/introduction/]
|
|||||||
toc: false
|
toc: false
|
||||||
---
|
---
|
||||||
|
|
||||||
The Hugo docs were completely reworked from the ground up in anticipation of v0.19. There are extensive code block examples throughout the documentation. If this is your first time using Hugo and you've [already installed Hugo on your machine][installed], we recommend the [quick start][].
|
The Hugo docs were completely reworked for the release of Hugo v0.19. If this is your first time using Hugo and you've [already installed Hugo on your machine][installed], we recommend the [quick start][].
|
||||||
|
|
||||||
[installed]: /getting-started/installing/
|
[installed]: /getting-started/installing/
|
||||||
[quick start]: /getting-started/quick-start/
|
[quick start]: /getting-started/quick-start/
|
||||||
@@ -23,7 +23,7 @@ Hugo supports loading data from YAML, JSON, and TOML files located in the `data`
|
|||||||
|
|
||||||
## The Data Folder
|
## The Data Folder
|
||||||
|
|
||||||
The `data` folder is where you can store additional data for Hugo to use when generating your site. Data files aren't used to generate standalone pages - rather they're meant supplemental to the content files. This feature can extend the content in case your frontmatter would grow immensely. Or perhaps your want to show a larger dataset in a template (see example below). In both cases it's a good idea to outsource the data in their own file.
|
The `data` folder is where you can store additional data for Hugo to use when generating your site. Data files aren't used to generate standalone pages - rather they're meant supplemental to the content files. This feature can extend the content in case your front matter would grow immensely. Or perhaps your want to show a larger dataset in a template (see example below). In both cases it's a good idea to outsource the data in their own file.
|
||||||
|
|
||||||
These files must be YAML, JSON or TOML files (using either the `.yml`, `.yaml`, `.json` or `toml` extension). The data will be accessible as a `map` in the `.Site.Data` variable.
|
These files must be YAML, JSON or TOML files (using either the `.yml`, `.yaml`, `.json` or `toml` extension). The data will be accessible as a `map` in the `.Site.Data` variable.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Creating a Theme
|
title: Creating a Theme
|
||||||
linktitle: Creating a Theme
|
linktitle: Creating a Theme
|
||||||
description: Learn to use the `hugo new theme` command and the resulting directory structure to create custom themes that can be dropped into other Hugo sites.
|
description: The `hugo new theme` command will scaffold the beginnings of a new theme for you to get you on your way.
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-01
|
lastmod: 2017-02-01
|
||||||
@@ -15,7 +15,7 @@ wip: true
|
|||||||
---
|
---
|
||||||
|
|
||||||
{{% warning "Use Relative Links" %}}
|
{{% warning "Use Relative Links" %}}
|
||||||
When creating your theme, it is not always safe to assume that the end user of the theme is working from the root directory of the website. This is especially important for assets such as stylesheets. See [relURL](/functions/relurl) and [absURL](/functions/absurl).
|
If you're creating a them with plans to share it with the community, it is not always safe to assume that the end user of the theme is working from the root of their published website. This is especially important for assets such as stylesheets. See [relURL](/functions/relurl) and [absURL](/functions/absurl).
|
||||||
{{% /warning %}}
|
{{% /warning %}}
|
||||||
|
|
||||||
Hugo has the ability to create a new theme in your themes directory for you
|
Hugo has the ability to create a new theme in your themes directory for you
|
||||||
@@ -24,26 +24,25 @@ using the `hugo new` command.
|
|||||||
`hugo new theme [name]`
|
`hugo new theme [name]`
|
||||||
|
|
||||||
This command will initialize all of the files and directories a basic theme
|
This command will initialize all of the files and directories a basic theme
|
||||||
would need. Hugo themes are written in the Go template language. If you are new
|
would need.
|
||||||
to Go, the [Go template primer](/layout/go-templates/) will help you get started.
|
|
||||||
|
|
||||||
## Theme Components
|
## Theme Components
|
||||||
|
|
||||||
A theme consists of templates and static assets such as javascript and css
|
A theme consists of templates and static assets such as javascript and css
|
||||||
files. Themes can also optionally provide [archetypes](/content/archetypes/)
|
files. Themes can also optionally provide [archetypes](/content/archetypes/),
|
||||||
which are archetypal content types used by the `hugo new` command.
|
which are archetypal content types used by the `hugo new` command to scaffold new conte files with preconfigured front matter.
|
||||||
|
|
||||||
|
|
||||||
{{% note "Use the Hugo Generator Tag" %}}
|
{{% note "Use the Hugo Generator Tag" %}}
|
||||||
The [`.Hugo.Generator`](/variables/other/) tag is included in all themes featured in the [Hugo Them Showcase](/http://themes.gohugo.io). We ask that you include the generator tag in all sites and themes you create with Hugo. The generator tag is significant in that it allows the Hugo team to track Hugo's usage and popularity.
|
The [`.Hugo.Generator`](/variables/other/) tag is included in all themes featured in the [Hugo Themes Showcase](http://themes.gohugo.io). We ask that you include the generator tag in all sites and themes you create with Hugo to help the core team track Hugo's usage and popularity.
|
||||||
{{% /note %}}
|
{{% /note %}}
|
||||||
|
|
||||||
## Layouts
|
## Layouts
|
||||||
|
|
||||||
Hugo is built around the concept that things should be as simple as possible.
|
Hugo is built around the concept that things should be as simple as possible.
|
||||||
Fundamentally website content is displayed in two different ways, a single
|
Fundamentally, website content is displayed in two different ways, a single
|
||||||
piece of content and a list of content items. With Hugo a theme layout starts
|
piece of content and a list of content items. With Hugo, a theme layout starts
|
||||||
with the defaults. As additional layouts are defined they are used for the
|
with the defaults. As additional layouts are defined, they are used for the
|
||||||
content type or section they apply to. This keeps layouts simple, but permits
|
content type or section they apply to. This keeps layouts simple, but permits
|
||||||
a large amount of flexibility.
|
a large amount of flexibility.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Installing and Using Themes
|
title: Installing and Using Themes
|
||||||
linktitle: Installing and Using Themes
|
linktitle: Installing and Using Themes
|
||||||
description: Install and use a Hugo theme from the Hugo theme showcase easily through the CLI.
|
description: Install and use a theme from the Hugo theme showcase easily through the CLI.
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-01
|
lastmod: 2017-02-01
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ This technique extracts the day, month and year by specifying ``.Date.Day``, ``.
|
|||||||
|
|
||||||
## Create Multilingual Content
|
## Create Multilingual Content
|
||||||
|
|
||||||
Now you can create markdown content in your languages, in the `content/en` and `content/ja` folders. The frontmatter stays the same on the key side, but the values would be set in each of the languages.
|
Now you can create markdown content in your languages, in the `content/en` and `content/ja` folders. The front matter stays the same on the key side, but the values would be set in each of the languages.
|
||||||
|
|
||||||
## Run Hugo Server or Deploy Commands
|
## Run Hugo Server or Deploy Commands
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
[[feature]]
|
[[feature]]
|
||||||
name = "Unparalleled Speed"
|
name = "Blistering Speed"
|
||||||
description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis dolor maiores officia officiis nemo voluptate hic necessitatibus debitis, vel ad ipsa temporibus aperiam architecto, molestiae, nulla minus corrupti iusto magni."
|
description = "Golang's baked-in concurrency is the backbone of Hugo's templating. Jettison expensive runtime dependencies, and let Go's incomparable I/O primitives do the work for you. For the first time, your rendering speeds can be measured in micro- and milliseconds."
|
||||||
order = 1
|
order = 1
|
||||||
|
|
||||||
[[feature]]
|
[[feature]]
|
||||||
name = "Markdown Without Limits"
|
name = "Markdown Without Limits"
|
||||||
description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis dolor maiores officia officiis nemo voluptate hic necessitatibus debitis, vel ad ipsa temporibus aperiam architecto, molestiae, nulla minus corrupti iusto magni."
|
description = "Hugo natively supports GFM, as well as Asciidoc, reStructuredText, and Org-mode through external helpers. Shortcodes, a minimalist intermediary to your templating and content, keeps your source clean, readable, and infinitely extensible."
|
||||||
order = 2
|
order = 2
|
||||||
|
|
||||||
[[feature]]
|
[[feature]]
|
||||||
name = "Robust Content Management"
|
name = "Robust Content Management"
|
||||||
description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis dolor maiores officia officiis nemo voluptate hic necessitatibus debitis, vel ad ipsa temporibus aperiam architecto, molestiae, nulla minus corrupti iusto magni."
|
description = "You need more than front matter to make static scalable. Hugo offers support for taxonomies, unlimited content types, DRY templating, URL management, menus, archetypes, summaries, and so much more...all *without* the need for plugins."
|
||||||
order = 3
|
order = 3
|
||||||
|
|
||||||
[[feature]]
|
[[feature]]
|
||||||
name = "Cross-platform by Default"
|
name = "Cross-Platform by Default"
|
||||||
description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis dolor maiores officia officiis nemo voluptate hic necessitatibus debitis, vel ad ipsa temporibus aperiam architecto, molestiae, nulla minus corrupti iusto magni."
|
description = "As a single binary, Hugo has equally simple installation on OS X, Linux BSD, Windows, Dragonfly BSD, OpenBSD, Plan 9, and any other platform where the Go compiler tool chain can run. Once you decide you want Hugo, simply `go``get` it."
|
||||||
order = 4
|
order = 4
|
||||||
|
|
||||||
[[feature]]
|
[[feature]]
|
||||||
name = "Multilingual Mode"
|
name = "Multilingual and i18n"
|
||||||
description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis dolor maiores officia officiis nemo voluptate hic necessitatibus debitis, vel ad ipsa temporibus aperiam architecto, molestiae, nulla minus corrupti iusto magni."
|
description = "International and multilingual sites are often difficult in our new static world. Hugo provides full i18n support for multilinguage sites with the same straightforward and extraordinarily fast experience Hugo users love in their single-language sites."
|
||||||
order = 5
|
order = 5
|
||||||
|
|
||||||
[[feature]]
|
[[feature]]
|
||||||
name = "A Passionate Community"
|
name = "A Passionate Community"
|
||||||
description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis dolor maiores officia officiis nemo voluptate hic necessitatibus debitis, vel ad ipsa temporibus aperiam architecto, molestiae, nulla minus corrupti iusto magni."
|
description = "The gratification of an ultra-fast feedback loop doesn't stop at the templating layer. Our community grows stronger and larger every day. Just one visit to our [forums](https://discuss.gohugo.io) and you'll quickly realize you never need to build a Hugo site alone."
|
||||||
order = 6
|
order = 6
|
||||||
@@ -25,7 +25,6 @@
|
|||||||
<h2>Focus on your content and design.</h2>
|
<h2>Focus on your content and design.</h2>
|
||||||
<hr class="hr">
|
<hr class="hr">
|
||||||
<p>Forget databases, security updates, and cofee breaks spent waiting for your site to rebuild.</p>
|
<p>Forget databases, security updates, and cofee breaks spent waiting for your site to rebuild.</p>
|
||||||
<!-- <p>Focus on content. Focus on design.</p> -->
|
|
||||||
<p>Golang's speed combined with markdown's elegant simplicity mean Hugo is the first static site generator fast enough to keep up with your creativity.</p>
|
<p>Golang's speed combined with markdown's elegant simplicity mean Hugo is the first static site generator fast enough to keep up with your creativity.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -47,7 +46,8 @@
|
|||||||
<div class="icon-github-wrapper">
|
<div class="icon-github-wrapper">
|
||||||
<i class="icon-github"></i>
|
<i class="icon-github"></i>
|
||||||
</div>
|
</div>
|
||||||
<div>Hugo is <a href="https://github.com/spf13/hugo/">open source</a> and completely free.</div>
|
<div>Hugo is <a href="https://github.com/spf13/hugo/">open source</a>, completely free, and built with <i class="icon-love"></i> by <a href="http://spf13.com/">spf13</a> and <a href="https://github.com/spf13/hugo/contributors">friends.</a> We welcome all contributions.</div>
|
||||||
|
<div>New to Go? We've got you covered. Help us with <a href="{{ "contribute/documentation/" | relURL}}"> the docs</a> or <a href="{{ "contribute/themes" | relURL }}"> themes</a>.</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{{ range sort $.Site.Data.homepagefeatures.feature "order" }}
|
{{ range sort $.Site.Data.homepagefeatures.feature "order" }}
|
||||||
<div class="feature">
|
<div class="homepage-feature" id="{{ .name | urlize }}">
|
||||||
<h3>{{.name}}</h3>
|
<h3>{{.name}}</h3>
|
||||||
<div class="feature-content">
|
<div class="homepage-feature-content">
|
||||||
{{.description}}
|
{{ .description | markdownify }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -30,6 +30,10 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display:block;
|
display:block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin-top:1em;
|
||||||
|
@include MQ(M){
|
||||||
|
margin-top:0px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@include MQ(M) {
|
@include MQ(M) {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ ul.animated {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
width: 85%;
|
width: 85%;
|
||||||
.feature {
|
.homepage-feature {
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
max-width: $L * .31;
|
max-width: $L * .31;
|
||||||
h3 {
|
h3 {
|
||||||
@@ -159,7 +159,7 @@ ul.animated {
|
|||||||
border-bottom: 1px solid white;
|
border-bottom: 1px solid white;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
.feature-content {
|
.homepage-feature-content {
|
||||||
color: lighten($base-font-color, 30%);
|
color: lighten($base-font-color, 30%);
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
@@ -167,6 +167,12 @@ ul.animated {
|
|||||||
p {
|
p {
|
||||||
color: lighten($base-font-color, 30%);
|
color: lighten($base-font-color, 30%);
|
||||||
}
|
}
|
||||||
|
//corrects odd spacing in "Cross-platform" block in "What Makes Hugo Special" features row....
|
||||||
|
code {
|
||||||
|
&:first-child {
|
||||||
|
margin-right:.25em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -363,9 +369,12 @@ svg {
|
|||||||
i.icon-github {
|
i.icon-github {
|
||||||
font-size: 62px;
|
font-size: 62px;
|
||||||
@include MQ(M){
|
@include MQ(M){
|
||||||
font-size: 80px;
|
font-size: 90px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
i.icon-love {
|
||||||
|
color:red;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-js {
|
.no-js {
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user