# Proposed Source Organization for Hugo Docs Concept

**URL:** <https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506>\
**Category:** dev\
**Created:** [November 8, 2016, 12:45am UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506 "2016-11-08T00:45:47Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdwatters](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rdwatters/32/2848_2.png) [@rdwatters](https://discourse.gohugo.io/u/rdwatters)\
**Post date:** [November 8, 2016, 12:45am UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/1 "2016-11-08T00:45:47Z")

</div>

@bep @digitalcraftsman @spf13 @moorereason

I cloned the docs today and spent some time listing out and reorganizing the content/source in a way that I think might be a little bit more scalable and easy to manage. I ended up writing about 6 pages of notes as well, which are not included in this post.

This is an _extremely_ rough draft, but I’d like some thoughts. In addition to this new organization, I’d be willing to put together everything else that would go with a full-fledged content management strategy, including, but not limited to, standardized front matter, content standards (eg, heading structure, input/output code blocks, taxonomies), more detailed instructions on how to contribute to the docs, etc.

I also have some ideas regarding shortcodes and perhaps sample source that can be referenced in the docs to make it easier for beginners to grock. This is a huge overhaul of the docs, so I’m not going to pretend that I can get this done in a week. Instead, I’d like some feedback with the goal of finishing the scaffolding (that is IA, not necessarily presentation or templates) for the new docs by the first or second week of December.

I’m curious as to how the site is currently being hosted. I’d like to use Wercker or Netlify (that is, if this actually takes off and the maintainers like it) so that I can build some image resizing, etc, in to make doc updates quicker, which will hopefully eventuate in a richer experiences for learners.

**Here is what I have so far for organizing `content/`. This should provide some insight as well into what a new nav might look like:**

- About Hugo
  - Features
    - Introduction to Hugo
    - Aliases
    - Builders
    - Taxonomy Support
    - Development
      - LiveReload
      - Fastest SSG

    - Pagination
    - Theming
    - Etc…

  - Release notes
  - Roadmap
  - License

- Getting Started
  - Installation (the “tutorials” for each install would move to this section, which is much more intuitive)
    - OSX
    - Linux
    - Windows
    - Download Hugo
    - Install from Source

  - Using the Hugo Docs
    - Sample source (essentially a very basic sample site source org that could be referenced throughout)
    - Sample Source Explained
      - Sections (posts, pages)
      - Data
      - layouts
      - static
      - etc…

  - Configuration

- Project Organization
  - Source Organization in Hugo (Intro)

- Content
  - Supported formats
  - Front Matter
  - Site Sections
  - Types and Layouts
  - Archetypes
    - Creating files from command line (Generators)

  - Content Summaries
  - Extending Markdown
  - Multilingual Mode

- Templating
  - Hugo Templating Introduction
    - Golang Primer

  - Page Types
    - single
    - list/node
    - homepage
    - rss
    - sitemap
    - 404

  - Ace Templating
  - Amber Templating
  - Template Blocks
  - Template Partials
  - Template Functions
  - Template Variables
    - Site/global variables
    - List/node variables
    - Page Variables
    - Scratch

  - Homepage Template
  - List Page Templates
    - Cascade
    - Ordering/sorting/weight
    - Etc…

  - Single Page Templates
    - Cascade
    - Etc…

  - Content/Template views
  - Taxonomies
    - Terms List
    - Taxonomy List

  - Shortcodes
    - Shortcode Types
      - Syntax highlighting (built-in)
      - Rest of built-ins, etc…

  - Data Templates
    - Local files
    - Data-driven content

  - Template Debugging

- Themes
  - Introduction to Themes
  - Installing and Using Themes
  - Customizing a Theme
  - Creating a Theme (pulled from tutorial as well)
  - Themes Showcase

- Troubleshooting
  - FAQs
    - `hugo new` aborts with cryptic EOF error
    - Categories with accented characters inaccessible
    - CSS files will not load

  - File an Issue on GitHub

- Developer Tools
  - Hugo Command Line Reference
  - Editor Plugins

- Deployments and Hosting
  - Hosting on GitHub
  - Hosting on Gitlab
  - Hosting on Bitbucket
  - Hosting and Deployment on Netlify
  - Frontends
    - rango
    - enwrite
    - caddy-hugo
    - hugopit
    - lipi
    - etc

  - Commercial Services
    - Algolia
    - [Appernetic.io](http://Appernetic.io)
    - [Netlify.com](http://Netlify.com)
    - [Forestry.io](http://Forestry.io)
    - etc

- Migrations
  - Migrating from Jekyll (formerly in tutorials)
  - Migration tools
    - JekyllToHugo
    - ConvertToHugo
    - ghosttoHugo
    - Octohug
    - wordpress-to-hugo-exporter
    - tumblr-importr
    - tumblr2hugomarkdown
    - drupal2hugo
    - hugojoomla
    - blogimport
    - contentful2hugo
    - etc

- Site Showcase (Possibly “Built with Hugo?”)
- Community
  - How to contribute (formerly in tutorials)
  - Mailing List
  - Discussion Forums

- News & Articles

You’ll notice a few major changes. Don’t worry—if you see a missing sub-page or subsection of a page, it’s probably included in the "etc"s in the above list. That said, I think it’s worthwhile to get rid of the “extras” section and the “tutorials” section since some _really_ good content gets lost in it’s current location. You’ll also notice that I don’t have a landing-page-style homepage like the current site. I don’t think it’s necessary to have an entirely different layout since most people want to get straight to the docs. That said, the index.html could include the “features” section mentioned above to make the About Hugo section that much smaller.

In my experience, website sections like “Extras,” “Resources,” etc tend to become attics and dumping grounds. For example, all references to working with data files are currently in “Extras,” which makes them less discoverable. Of course, I don’t have access to the site’s GA (content grouping should be a part of the new docs), so a lot of my decisions are based on assumptions rather than data, which _I’m going to say right now is inherently faulty and subject to bias._

Any and all feedback is welcome. I’ll probably start tweaking this in my own repo and will keep the community updated as I make progress over the next month. Let me know the following:

1. If you have any requests in terms of front-end frameworks as well (eg, bootstrap, Foundation), let me know: I’ve used them all. I’d rather focus on cleaning up the docs and the information architecture than making them pretty…and that might mean less generous browser support (as in, skipping IE altogether…or maybe just 11).
2. I can’t decide if shortcodes should live under “templating” or “extending markdown” since both seem like good locations in their own way…

---

<div class="post-metadata">

**Author:** ![sairam](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sairam/32/2198_2.png) [@sairam](https://discourse.gohugo.io/u/sairam)\
**Post date:** [November 8, 2016, 4:12am UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/2 "2016-11-08T04:12:48Z")

</div>

I think the Extras section should contain any 3rd party plugins which supplement and complement Hugo like fingerprinting asset/static files. This will help users apply the best practices. (which are not currently under Deployments)

Also, it might be nice to link some work arounds like Google AMP generator, Facebook feeds etc., from [this forum](https://discuss.gohugo.io) into the documentation.

`Hosting on S3 / FTP` might be a good section to add under Deployments/Hosting

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 8, 2016, 8:20am UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/3 "2016-11-08T08:20:55Z")

</div>

Thanks for doing this, the order makes more sense – in that it lists what most users need first. My big gripe about the doc isn’t the info it doesn’t have, but that the info most people need are so hard to spot – so we get many repeated questions here on the forum. That is also a presentation thing, but better organization is a good start.

---

<div class="post-metadata">

**Author:** ![rdwatters](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rdwatters/32/2848_2.png) [@rdwatters](https://discourse.gohugo.io/u/rdwatters)\
**Post date:** [November 8, 2016, 3:56pm UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/4 "2016-11-08T15:56:18Z")

</div>

@bep This would be the new source organization—and it is still not finazlied—but I intend on going a step further and doing heavy rewriting to the actual content: not that it’s all that bad now, but I’d like to give each section the following:

1. Introduction
2. Quick Reference (since the examples might get tedious for more seasoned Hugoers)
3. Input/output examples (code blocks, probably with a “Copy” button)

I would also make new archetypes.

Visually, I could use the Codyhouse template already semi-built-out here:  
[https://github.com/spf13/hugo/issues/1725](https://github.com/spf13/hugo/issues/1725)

But I’m sure I will up make considerable modifications since content should come before form…

Once I have the basic scaffolding together, I’ll publish it to netlify and invite you and the other maintainers to the repo…

---

<div class="post-metadata">

**Author:** ![digitalcraftsman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/digitalcraftsman/32/4142_2.png) [@digitalcraftsman](https://discourse.gohugo.io/u/digitalcraftsman)\
**Post date:** [November 8, 2016, 8:54pm UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/5 "2016-11-08T20:54:50Z")

</div>

Thanks Ryan for taking the time to create this proposal and it’s great to benefit from your professional expertise 🙂

Your organization makes a lot of sense and I like the idea to replace the homepage with new layout. This page should prominently feature the search with some kind of form and maybe we could add cards to highlight the most used content sections. With this combination users can either find things faster based on the categorization or dive into the documentation.

> [@bep](#):
>
> My big gripe about the doc isn’t the info it doesn’t have, but that the info most people need are so hard to spot – so we get many repeated questions here on the forum.

From a longterm perspective this reorganization will create a better experience for new users while browsing the docs.

---

<div class="post-metadata">

**Author:** ![moorereason](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/moorereason/32/592_2.png) [@moorereason](https://discourse.gohugo.io/u/moorereason)\
**Post date:** [November 11, 2016, 10:17pm UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/6 "2016-11-11T22:17:37Z")

</div>

@rdwatters,

Looks like a great plan. Go for it!

Regarding a new theme: my main complaint about the [Codyhouse theme](https://github.com/sjardim/docs.gohugo.io) is that it’s [unreadable](https://backchannel.com/how-the-web-became-unreadable-a781ddc711b6#.kseb0sbez). A [Grav theme](https://learn.getgrav.org/) would have similar issues that need to be addressed.

The cleanest theme I’ve seen so far is [DocuApi](http://themes.gohugo.io/docuapi/) ported by bep. I’m curious what the DocuApi theme would look like with TOML, YAML, & JSON config examples on the side, but I haven’t had time to play with it.

---

<div class="post-metadata">

**Author:** ![digitalcraftsman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/digitalcraftsman/32/4142_2.png) [@digitalcraftsman](https://discourse.gohugo.io/u/digitalcraftsman)\
**Post date:** [November 12, 2016, 12:26pm UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/7 "2016-11-12T12:26:20Z")

</div>

I agree that the contrast in the Grav theme could be optimized.

The DocuApi theme is great for documenting an API; usually such a documentation doesn’t have to display a lot of paragraphs. The problem I see is that the code examples, e.g. for endpoints of an API, use a lot of space in the 3-column layout on desktop / 2-column layout on mobile devices (where the sidebar is hidden).

Especially on mobile devices, like on my tablet, the layout doesn’t leave very much space for Hugo’s documentation which is rather text-heavy. Our docs feature some code examples but a lot of space wouldn’t be used in the right column if we display paragraphs.

I rather prefer a single column layout as we have it right now where text and code examples a ordered vertically. The theme itself is good but might not be suited for every use case.

But this are just my two cents.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 12, 2016, 2:35pm UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/8 "2016-11-12T14:35:46Z")

</div>

Re. the theme discussion – if a theme is “hard to read”, there is a fix for that: It is called CSS. Fix it.

---

<div class="post-metadata">

**Author:** ![digitalcraftsman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/digitalcraftsman/32/4142_2.png) [@digitalcraftsman](https://discourse.gohugo.io/u/digitalcraftsman)\
**Post date:** [November 12, 2016, 2:40pm UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/9 "2016-11-12T14:40:25Z")

</div>

> [@bep](#):
>
> if a theme is “hard to read”, there is a fix for that: It is called CSS. Fix it

That would be the way to “optimize” a theme. Changing colors for a better contrast, fonts and font-sizes can be done rather quickly.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 12, 2016, 3:13pm UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/10 "2016-11-12T15:13:55Z")

</div>

In general, we talk too much about this when we should really do. I agree about your last post about vertical code samples – so I suggest we go with a theme and make it happen – and make the needed adjustments. It would be cool if someone could make a code example shortcode (JS driven?) so we could easily show TOML, YAML etc. versions of config sections etc.

---

<div class="post-metadata">

**Author:** ![rdwatters](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rdwatters/32/2848_2.png) [@rdwatters](https://discourse.gohugo.io/u/rdwatters)\
**Post date:** [November 12, 2016, 7:08pm UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/11 "2016-11-12T19:08:51Z")

</div>

> [@bep](#):
>
> It would be cool if someone could make a code example shortcode (JS driven?) so we could easily show TOML, YAML etc. versions of config sections etc.

I was thinking the same thing. [See the theme I’m porting over from a project at work for an example.](https://ryans-hugo-theme.netlify.com/theme-docs/#code-blocks)

[Here it is on another dummy/dev site with different styling](https://ryanwatters.io/posts/markdown-extensions-in-javascript/).

Here is the source for the shortcode itself:

[https://github.com/rdwatters/ryans-hugo-theme/blob/master/layouts/shortcodes/code.html](https://github.com/rdwatters/ryans-hugo-theme/blob/master/layouts/shortcodes/code.html)

But I think I can make it simpler for the Hugo docs by having one less param needed from the content author.

I also have a download shortcode, which could come in handy for larger files like the sample configs. You can see a sort of sample of how this would work in the [editor I built for the above theme I’m porting over](https://ryans-hugo-theme.netlify.com/editor/), although you’ll need to fill out the fields (don’t worry, just throw in some dummy text). It would look the same as the “copied” button in code blocks but instead download the sample `config.toml` similar to what we currently have [in the docs](http://gohugo.io/overview/configuration/).

I agree that color is important since it relates to accessibility, which should always take precedence over things looking “pretty.” I really like the DocuApi theme a lot, but I don’t think it works for what I have in mind with some of this stuff. @bep makes a strong point. I will keep you posted.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 12, 2016, 11:24pm UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/12 "2016-11-12T23:24:44Z")

</div>

But as to the docs reorg, I would suggest you wait until

[https://github.com/spf13/hugo/pull/2649](https://github.com/spf13/hugo/pull/2649)

lands …

---

<div class="post-metadata">

**Author:** ![rdwatters](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rdwatters/32/2848_2.png) [@rdwatters](https://discourse.gohugo.io/u/rdwatters)\
**Post date:** [November 13, 2016, 5:27am UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/13 "2016-11-13T05:27:31Z")

</div>

Agreed…somewhat. There is enough to do that this is still going to take me a few months. It’s important to set realistic expectations.

---

<div class="post-metadata">

**Author:** ![Jura](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jura/32/13581_2.png) [@Jura](https://discourse.gohugo.io/u/Jura)\
**Post date:** [April 28, 2017, 6:19am UTC](https://discourse.gohugo.io/t/proposed-source-organization-for-hugo-docs-concept/4506/14 "2017-04-28T06:19:34Z")

</div>

With respect and appreciation: is there a timeline for this project? I’m partly asking because I see several issues for this project that are broad in scope (like [creating new standards for theme submissions](https://github.com/rdwatters/hugo-docs-concept/issues/41)).

Speaking as a regular user who still often references the documentation (both sites), I’d prefer a focus on merging so we users don’t have to read up both websites (the official and expanded) when stuck with something.
