Skip to content

Commit

Permalink
Break Change! Documentation type change to layout
Browse files Browse the repository at this point in the history
  • Loading branch information
harrymkt committed Dec 5, 2024
1 parent 7bb431b commit 9da29c2
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 66 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This theme is distributed under the terms of the [MIT License](https://github.co
## Features
- Multilingual support with i18n; Hugo supports built-in advance multilingual feature, this theme only adds templates for it.
- Customizable extrahead, extrafooter, head, header, footer, with partials, and extrahead, with blocks.
- Documentation site; build accessible documentation sites by using built-in template specifically designed for documentation. You can set the type of the section you want to document in the section's frontmadder as well as in each post.
- Documentation site; build accessible documentation sites by using built-in template specifically designed for documentation. You set the layout of the section you want to document as well as in each page of that related document.
- Content variables during build, such as `%title%`. See the demo page for documentation
- Sort pages by the way you like and for specific sections, which is by default not supported. This uses the sort partial.
- Copy code blocks; add code blocks which can then be copied using buttons and display the code language if available, helped by JavaScript.
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Documentation
type: doc
layout: doc
---
# Documentation
Please note that these documentations are not localize in every language that this theme provides.
2 changes: 1 addition & 1 deletion demo/content/docs/author-taxonomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Author Management Via Taxonomy"
weight: 400
keywords: [documentation,content,partial,author,writing]
type: doc
layout: doc
---
# %title%
You can have taxonomy based author management system. Create each author section in content/authors/author_name/_index.md, and looks like this:
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Blocks"
weight: 300
keywords: [documentation,title,writing,shortcode,misc,blocks]
type: doc
layout: doc
---
# Blocks
Sometimes partial files are not enough. Or will they be cluttered. Blocks come in. You can define blocks to display content in position the block is defined in the base template. Here are available blocks that you can use:
Expand Down
12 changes: 6 additions & 6 deletions demo/content/docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Documentation Site"
weight: 1000
keywords: [doc, params, writing, content, misc, title]
type: doc
layout: doc
---
# Documentation Site
Hguinav supports built-in documentation template that allows you to create list base documentation pages. Each section, starting at content/, you can create a subsection documentation. You can also look the docs folder of this theme demo.
Expand All @@ -14,7 +14,7 @@ First, create first documentation section in content folder, and add _index.md t
```yaml
---
title: "Your Documentation Main Section's Title"
type: doc
layout: doc
---
Further content for the main documentation section goes here
```
Expand All @@ -26,12 +26,12 @@ You can write documentation as you normally would do, for example:
---
title: "Page1"
weight: 1
type: doc
layout: doc
---
Hello!
```

Note that you also need to set type to `doc` on every page.
Note that you also need to set `layout` to `doc` on every page.

## Sections
You can also have subsections inside the main one.
Expand All @@ -42,7 +42,7 @@ In the test folder, we will add _index.md with the following content.
```yaml
---
title: "Testing"
type: doc
layout: doc
weight: 1
---
```
Expand All @@ -53,7 +53,7 @@ After that, you can write a short description related to that subsection. Do not
```yaml
---
title: "Testing"
type: doc
layout: doc
weight: 1
---
I am a test section, so you know displaying in first.
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/params/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Params
type: doc
layout: doc
weight: 5
---
Control your site or page by these custom variables and frontmadders.
2 changes: 1 addition & 1 deletion demo/content/docs/params/config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Config Params
type: doc
layout: doc
weight: 100
keywords: [doc,documentation,variable,writing,partial]
---
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/params/frontmadder.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Frontmadder Params
type: doc
layout: doc
weight: 200
keywords: [documentation,variable,writing,partial,audio,general,title]
---
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/partials/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Partials
type: doc
layout: doc
weight: 10
---
Partials live in the layouts/partials and are so called custom functions. To modify any of them you can copy to your layouts/partials directory.
2 changes: 1 addition & 1 deletion demo/content/docs/partials/content.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Content Partial
type: doc
layout: doc
weight: 100
keywords: [variable,config,content,write,params]
---
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/partials/general.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: General Partials
type: doc
layout: doc
weight: 1
keywords: [writing, config, doc, params, content,base,related]
---
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/partials/menu.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Menu Partial
type: doc
layout: doc
weight: 400
keywords: [documentation,menu]
---
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/partials/related.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Related Partial
type: doc
layout: doc
weight: 300
keywords: [documentation,config,writing,partial]
---
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/partials/title.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Title Partial
type: doc
layout: doc
weight: 200
keywords: [variable,config,content,writing]
---
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/shortcodes/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Shortcodes
type: doc
layout: doc
weight: 40
---
Shortcodes live in the layouts/shortcodes and are so called custom functions that you can use in your content file. To modify any of them you can copy to your layouts/partials directory.
2 changes: 1 addition & 1 deletion demo/content/docs/shortcodes/audio.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Audio Shortcode
type: doc
layout: doc
weight: 100
keywords: [doc,content,shortcode,audio]
---
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/shortcodes/tab.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Tab Shortcode
type: doc
layout: doc
weight: 200
keywords: [doc,content,shortcode,tab]
---
Expand Down
2 changes: 1 addition & 1 deletion demo/content/docs/writing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Writing
type: doc
layout: doc
weight: 200
keywords: [content,variable,writing,config]
---
Expand Down
File renamed without changes.
43 changes: 0 additions & 43 deletions layouts/doc/single.html

This file was deleted.

0 comments on commit 9da29c2

Please sign in to comment.