From 578067c5abc6983475347ae15816ecbc31a0bc9e Mon Sep 17 00:00:00 2001 From: vjeantet Date: Sat, 26 Sep 2020 12:22:46 +0200 Subject: docs : all examples are yaml --- archetypes/default.md | 26 +++++----- .../00-adding-content/page-slide/_index.md | 60 +++++++++++----------- .../01-homepage/_index.md | 10 ++-- .../02-navigation-search/menu/_index.md | 18 +++---- 4 files changed, 56 insertions(+), 58 deletions(-) diff --git a/archetypes/default.md b/archetypes/default.md index e539ccf..fdf72a6 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,18 +1,18 @@ -+++ -title= "{{ replace .TranslationBaseName "-" " " | title }}" -date= {{ .Date }} -description = "" -draft = true +--- +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ .Date }} +description: "" +draft: true -subpage = false +subpage: false -hide_header=false -hide_nav=false -hide_breadcrumb=false -hide_toc=false -hide_footer=false -hide_nextpage=false -+++ +hide: +- header +- nav +- breadcrumb +- footer +- nextpage +--- Lorem Ipsum. Notice `draft` is set to true. diff --git a/exampleSite/content/content-and-customization/00-adding-content/page-slide/_index.md b/exampleSite/content/content-and-customization/00-adding-content/page-slide/_index.md index c5f2df6..4e2cdcd 100644 --- a/exampleSite/content/content-and-customization/00-adding-content/page-slide/_index.md +++ b/exampleSite/content/content-and-customization/00-adding-content/page-slide/_index.md @@ -16,10 +16,10 @@ A basic .md file can be rendered as a reveal.js presentation full screen. To tell Hugo to consider a page as a slidedeck, just add a `type="slide"`in then frontmatter of your page. -```toml -+++ -type="slide" -+++ +```yaml +--- +type: "slide" +--- ``` @@ -39,19 +39,19 @@ Please read the [{{%icon book%}} doc from hakimel](https://github.com/hakimel/re In the frontmatter of your page file, set **type** and **revealOptions** params Your content will be served as a fullscreen revealjs presentation and revealOptions will be used to ajust its behaviour. -```toml - +++ - title = "Test slide" - type="slide" - - theme = "league" - [revealOptions] - transition= 'concave' - controls= true - progress= true - history= true - center= true - +++ +```yaml +--- +title: "Test slide" +type: slide + +theme: "league" +revealOptions: + center: true + controls: true + history: false + progress: true + transition: concave +--- ``` [read more about reveal options here](https://github.com/hakimel/reveal.js/#configuration) @@ -80,20 +80,18 @@ By using a combination of horizontal and vertical slides you can customize the n For example, a very simple slideshow presentation can be created as follows ```md -+++ - -title = "test" -date = "2017-04-24T18:36:24+02:00" -type="slide" - -theme = "league" -[revealOptions] -transition= 'concave' -controls= true -progress= true -history= true -center= true -+++ +--- +title: "test" +type: "slide" + +theme: "league" +revealOptions: + center: true + controls: true + history: false + progress: true + transition: concave +--- # In the morning diff --git a/exampleSite/content/content-and-customization/01-homepage/_index.md b/exampleSite/content/content-and-customization/01-homepage/_index.md index 296d498..5282244 100644 --- a/exampleSite/content/content-and-customization/01-homepage/_index.md +++ b/exampleSite/content/content-and-customization/01-homepage/_index.md @@ -31,11 +31,11 @@ set `type="raw"` in your home page frontmatter : only your content will be rende Remember that hugo allows you to write your content with HTML when markdown if not enough. very usefull for a landing page ! Example -```toml -+++ -title="Homepage" -type="raw" -+++ +```yaml +--- +title: Homepage +type: raw +---
Hello
diff --git a/exampleSite/content/content-and-customization/02-navigation-search/menu/_index.md b/exampleSite/content/content-and-customization/02-navigation-search/menu/_index.md index 2e1a91a..a80b8bc 100644 --- a/exampleSite/content/content-and-customization/02-navigation-search/menu/_index.md +++ b/exampleSite/content/content-and-customization/02-navigation-search/menu/_index.md @@ -21,27 +21,27 @@ Reminder : [subpages]({{%relref "content-and-customization/00-adding-content#sub Bellow are all frontmatters options used to render a menu entry.\ Example from the current "Getting start" section. -```toml -+++ +```yaml +--- # Menu label -title = "Getting started" +title: "Getting started" # Hide this page from menu -hidden = false +hidden: false # Prefix menu label with a text, an html... -pre = "" +pre: "" # Suffix menu label with a text, an html... -post = "👋" +post: "👋" # Display this before the menu entry -head = "
" +head: "
" # Keep this menu opened by default -alwaysopen = true +alwaysopen: true -+++ +--- ``` -- cgit v1.2.3