Update doc contribute guidelines

This commit is contained in:
Ryan Watters
2017-03-07 15:28:39 -06:00
parent da06842ede
commit 3a3828d7e9
6 changed files with 27 additions and 31 deletions
+1
View File
@@ -11,6 +11,7 @@ workson: []
hugoversion: ""
aliases: []
relatedfuncs: []
toc: false
deprecated: false
z_notesforauthors: "Go to gohugo.io/contribute/documentation for more info on using this archetype."
---
+2 -1
View File
@@ -80,7 +80,8 @@ watch = true
ghrepo = "https://github.com/spf13/hugo/"
## GitHub Docs Repository Base URL (include trailing slash)
### https://github.com/spf13/hugo/tree/master/docs
ghdocsrepo = "https://github.com/rdwatters/hugo-docs-concept/tree/master/"
ghdocsrepo = "https://github.com/rdwatters/hugo-docs-concept/edit/master/"
### Edit content repo
## Github Wiki for Documentation
ghdocswiki = ""
## Github Wiki for Development
+7 -13
View File
@@ -126,7 +126,7 @@ We also appreciate the addition of the remaining fields, specially `sourcelink`
We need to create the thumbnail of your website. Give your thumbnail a name like `my-hugo-site-name.png`. Save it under [`docs/static/images/showcase/`][].
{{% warning "Showcase Image Size" %}}
It's important that the image you use for your showcase submission has the required dimensions of 600px × 400px or the site will not render appropriately. Be sure to optimize your image as a matter of best practice. If you're looking for a quick online optimization tool, check out [Compressor](https://compressor.io/).
It's important that the image you use for your showcase submission has the required dimensions of 600px × 400px or the site will not render appropriately. Be sure to optimize your image as a matter of best practice. [Compressor](https://compressor.io/) offers a simple drag-and-drop GUI for optimizing your images.
{{% /warning %}}
### Adding a New Tutorial
@@ -183,8 +183,8 @@ A whole bunch of coding going on up in here! Boo-yah!
These are the arguments passed into `code`
`file`
: the only ***required*** argument. `file` is needed for styling but also plays an important role in helping users create a mental model around Hugo's directory structure. Visually, this will be displayed as text in the top bar of the text-editor. Always end the value with an extension. For example, instead of `./public/section/`, use `public/section/index.html`. The file extension is used to display the icon.
***`file`***
: the only *required* argument. `file` is needed for styling but also plays an important role in helping users create a mental model around Hugo's directory structure. Visually, this will be displayed as text in the top bar of the text-editor. Always end the value with an extension. For example, instead of `./public/section/`, use `public/section/index.html`. The file extension is used to display the icon.
`download`
: if omitted, this will have no effect on the rendered shortcode. When a value is added to `download`, it's used as the filename for a downloadable version of the code block.
@@ -296,7 +296,7 @@ Which will render as follows on the Hugo docs:
> Without the threat of punishment, there is no joy in flight. - [Kobo Abe][abe]
{{% note "Blockquotes `!=` Admonitions" %}}
Previous versions of Hugo documentation used blockquotes to draw attention to text. [This is *not* the intended semantic use of the `<blockquote>` element](http://html5doctor.com/cite-and-blockquote-reloaded/). Use blockquotes when quoting. To note or warn your user of specific information, use the admonition shortcodes that follow.
Previous versions of Hugo documentation used blockquotes to draw attention to text. This is *not* the [intended semantic use of `<blockquote>`](http://html5doctor.com/cite-and-blockquote-reloaded/). Use blockquotes when quoting. To note or warn your user of specific information, use the admonition shortcodes that follow.
{{% /note %}}
## Admonitions
@@ -376,7 +376,7 @@ It's more important to contribute *some* documentation than no documentation at
The Hugo docs are not especially prescriptive in terms of grammar and usage. We encourage everyone to contribute regardless of your writing style. That said, here are a few gotchas when writing your documentation that, if observed, will create a more consistent documentation experience for the Hugo community:
1. *Front matter* and *file system* are two words; *Homepage* is one word.
3. Add a `godocref` value to the front matter of content files whenever possible. We want to promote Hugo *and* Golang by demonstrating the inseparable wedding of the two. {{< emo ":star:" >}}
3. Add a `godocref` value to the front matter of content files whenever possible. We want to promote Hugo *and* Golang by demonstrating the inseparable wedding of the two.
## Ask for Code Examples
@@ -386,9 +386,9 @@ Sometimes you want to contribute to the docs but don't have enough time to provi
needsexamples: true
```
## ~~Please Help! Examples Needed!~~ (WIP)
## Places to Start
The preceding `needsexamples` is used to generate the following list of pages flagged for needing example. The edit link will take you directly to the edit URL for the file in GitHub:
The preceding `needsexamples` is used to generate the following list of pages flagged for needing example. Links will take you directly to the edit URL for the file within the GitHub GUI:
{{< needsexamples >}}
@@ -396,12 +396,6 @@ The preceding `needsexamples` is used to generate the following list of pages fl
Similar to [contributing to Hugo development](/contribute/contribute-to-hugo-development), the Hugo team expects you to create a separate branch/fork when you make your generous contributions to the Hugo docs.
{{% /note %}}
## Be Mindful of Aliases
Use aliases sparingly. The following table shows a list of all the aliases currently being used in the Hugo Docs. Check here first for potential conflicts if you need to use an alias:
{{< allaliases >}}
[abe]: https://en.wikipedia.org/wiki/K%C5%8Db%C5%8D_Abe
[archetypes]: /content-management/archetypes/
[archsource]: https://github.com/spf13/hugo/tree/master/docs/archetypes
+3 -3
View File
@@ -1,7 +1,7 @@
<ul class="utils-list">
{{range where .Site.Pages "Section" "functions"}}
{{ if .Params.needsexamples }}
<li><a href="{{.Permalink}}">{{.Title}}</a></li>
{{ end }}
{{ if .Params.needsexamples }}
<li><a href="{{.Site.Params.ghdocsrepo}}content/{{.File.Path}}" target="_blank">{{.Title}} <i class="icon-pencil"></i></a></li>
{{ end }}
{{ end }}
</ul>
+13 -13
View File
@@ -129,19 +129,19 @@ aside {
}
//For example, used in the "Pages Needing Code Examples" section of "Contribute to the Hugo docs"
.body-copy {
.utils-list {
list-style: none;
margin-left: 0px;
padding-left: 0px;
li {
list-style: none;
display: inline;
margin-left: 0px;
padding-left: 0px;
}
}
}
// .body-copy {
// .utils-list {
// list-style: none;
// margin-left: 0px;
// padding-left: 0px;
// li {
// list-style: none;
// display: inline;
// margin-left: 0px;
// padding-left: 0px;
// }
// }
// }
//for Hugo's native support of Github-flavored task list synax
.body-copy {
+1 -1
View File
File diff suppressed because one or more lines are too long