Преглед изворни кода

feat(archetype): add `hugo new` template for docs/tutorial layout

- To use: `hugo new --kind docs tutorial/hello.md`
- Remove [header] from exampleSite docs since it's deprecated for docs
George Cushen пре 6 година
родитељ
комит
e9597c72c7
3 измењених фајлова са 25 додато и 12 уклоњено
  1. 25 0
      archetypes/docs.md
  2. 0 6
      exampleSite/content/tutorial/_index.md
  3. 0 6
      exampleSite/content/tutorial/example.md

+ 25 - 0
archetypes/docs.md

@@ -0,0 +1,25 @@
++++
+title = "{{ replace .Name "-" " " | title }}"
+date = {{ .Date }}
+draft = false
+type = "docs"  # Do not modify.
+
+# Show table of contents? true/false
+toc = true
+
+# Add menu entry to sidebar.
+
+# Uncomment to customize menu title, e.g. to abbreviate page title.
+# linktitle = "Example"
+
+# Substitute `tutorial` with the name of your tutorials folder.
+[menu.tutorial]
+  # Define a parent ID if this page is a parent.
+  name = "YourParentID"
+  
+  # Reference a parent ID if this page is a child.
+  # parent = "YourParentID"
+  
+  # Order that this page appears in the menu.
+  weight = 1
++++

+ 0 - 6
exampleSite/content/tutorial/_index.md

@@ -12,12 +12,6 @@ type = "docs"  # Do not modify.
 [menu.tutorial]
   name = "Overview"
   weight = 1
-
-# Featured image.
-# Uncomment below lines to use.
-# [header]
-# image = "headers/getting-started.png"
-# caption = "Image credit: [**Academic**](https://github.com/gcushen/hugo-academic/)"
 +++
 
 This feature can be used for publishing content such as:

+ 0 - 6
exampleSite/content/tutorial/example.md

@@ -13,12 +13,6 @@ linktitle = "Example Page"
 [menu.tutorial]
   parent = "Example Topic"
   weight = 1
-
-# Featured image.
-# Uncomment below lines to use.
-# [header]
-# image = "headers/getting-started.png"
-# caption = "Image credit: [**Academic**](https://github.com/gcushen/hugo-academic/)"
 +++
 
 In this tutorial, I'll share my top 10 tips for getting started with Academic: