mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
Update local file templates page
This commit is contained in:
@@ -90,9 +90,9 @@ You can then reference the partial template:
|
||||
|
||||
## Alternatives
|
||||
|
||||
A few alternatives exist to [Disqus](https://disqus.com/):
|
||||
There are a few alternatives to commenting on static sites for those who do not want to use Hugo's built-in Disqus support:
|
||||
|
||||
* [Discourse](http://www.discourse.org)
|
||||
* [Static Man](https://staticman.net/)
|
||||
* [IntenseDebate](http://intensedebate.com/)
|
||||
* [Livefyre](http://livefyre.com/)
|
||||
* [Muut](http://muut.com/)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Using the Hugo Docs
|
||||
linktitle: Using the Hugo Docs
|
||||
description: The Hugo docs are optimized for consistency. Code samples and tutorials pull from a single example site, and content is grouped together to make learning Hugo easier and even more fun.
|
||||
description: The Hugo docs are optimized for consistency. Whenever possible, code samples and tutorials pull from a single example site. Doc content is grouped together to make learning Hugo easier and even more fun.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-02-01
|
||||
|
||||
@@ -21,11 +21,9 @@ With Hugo's [`readDir` function][], you can traverse your website's files on you
|
||||
|
||||
## Using _readDir_
|
||||
|
||||
The `readDir` function returns an array of [`os.FileInfo`](https://golang.org/pkg/os/#FileInfo). It takes a single, string argument: a path. This path can be to any directory of your website (as found on your server's filesystem).
|
||||
The `readDir` function returns an array of [`os.FileInfo`](https://golang.org/pkg/os/#FileInfo). It takes the file's `path` as a single string argument. This path can be to any directory of your website (i.e. as found on your server's file system).
|
||||
|
||||
Whether the path is absolute or relative makes no difference,
|
||||
because—at least for `readDir`—the root of your website (typically `./public/`)
|
||||
in effect becomes both:
|
||||
Whether the path is absolute or relative makes no difference, because—at least for `readDir`—the root of your website (typically `./public/`) in effect becomes both:
|
||||
|
||||
1. The filesystem root; and
|
||||
1. The current working directory.
|
||||
@@ -38,11 +36,9 @@ So, let's create a new shortcode using `readDir`:
|
||||
|
||||
For the files in any given directory, this shortcode usefully lists the files' basenames and sizes and also creates a link to each of them.
|
||||
|
||||
This shortcode [has already been included in this very website][].
|
||||
So, let's list some of its CSS files. (If you click on their names, you can reveal the contents.)
|
||||
This shortcode [has already been included in this very website][]. So, let's list some of its CSS files. (If you click on their names, you can reveal the contents.)
|
||||
|
||||
{{< directoryindex path="/static/css" pathURL="/css" >}}
|
||||
<br />
|
||||
{{< directoryindex path="/static/css" pathURL="/css" >}}
|
||||
|
||||
This is the call that rendered the above output:
|
||||
|
||||
|
||||
+3
-3
@@ -1,4 +1,6 @@
|
||||
# Hugo Docs Strategy Statement (Draft)
|
||||
# Hugo Docs Strategy, Tactics, and Requirements
|
||||
|
||||
> **Note:** Before any of my fellow content strategists banish me to content strategy hell, know that I *know* this is a *very schlocky* version of the documentation required for a real content strategy.
|
||||
|
||||
**Updated 2017-02-21**
|
||||
|
||||
@@ -17,8 +19,6 @@
|
||||
- [Analytics/Metrics](#analyticsmetrics)
|
||||
- [Visual Design](#visual-design)
|
||||
|
||||
This is a *very* schlocky version of the documentation I'd put together in my professional life. That said, I think the following pieces are still important and should provide some insight as to how I've approached reworking the Hugo documentation over the last three months.
|
||||
|
||||
## Assumptions
|
||||
|
||||
> **Note**: These assumptions are empirical; i.e. the result of me spending a large (and potentially unhealthy) amount of time on the [Hugo Discussion Forum](https://discuss.gohugo.io). Google analytics *may* provide more quantitative insight into actual Hugo docs usage. I should also mention that these are *assumptions* and not *criticisms*. I **LOVE** Hugo.
|
||||
|
||||
Reference in New Issue
Block a user