From e9597c72c70d5cf97a8d0738670d4d275fd47e83 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sun, 21 Oct 2018 21:00:29 +0100 Subject: [PATCH] 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 --- archetypes/docs.md | 25 +++++++++++++++++++++++++ exampleSite/content/tutorial/_index.md | 6 ------ exampleSite/content/tutorial/example.md | 6 ------ 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 archetypes/docs.md diff --git a/archetypes/docs.md b/archetypes/docs.md new file mode 100644 index 00000000..4dfe5926 --- /dev/null +++ b/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 ++++ diff --git a/exampleSite/content/tutorial/_index.md b/exampleSite/content/tutorial/_index.md index 00b97b0d..ced5a1f8 100644 --- a/exampleSite/content/tutorial/_index.md +++ b/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: diff --git a/exampleSite/content/tutorial/example.md b/exampleSite/content/tutorial/example.md index 7d51255c..72d995c1 100644 --- a/exampleSite/content/tutorial/example.md +++ b/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: