Convert docdock theme from submodule to native files and fix Hugo compatibility
This commit is contained in:
54
themes/docdock/exampleSite/content/create-page/_index.md
Normal file
54
themes/docdock/exampleSite/content/create-page/_index.md
Normal file
@@ -0,0 +1,54 @@
|
||||
+++
|
||||
title = "Create Page"
|
||||
description = ""
|
||||
date = "2017-04-24T18:36:24+02:00"
|
||||
creatordisplayname = "Valere JEANTET"
|
||||
creatoremail = "valere.jeantet@gmail.com"
|
||||
lastmodifierdisplayname = "Valere JEANTET"
|
||||
lastmodifieremail = "valere.jeantet@gmail.com"
|
||||
tags = ["tag1","tag2"]
|
||||
weight = 10
|
||||
pre ="<i class='fa fa-edit' ></i> "
|
||||
|
||||
+++
|
||||
|
||||
|
||||
Hugo-theme-docdock defines two types of pages. _Default_ and _Slide_.
|
||||
|
||||
* **Default** is the common page like the current one you are reading.
|
||||
* **Slide** is a page that use the full screen to display its markdown content as a [reveals.js presentation](http://lab.hakim.se/reveal-js/).
|
||||
* **HomePage** is a special content that will be displayed as home page content.
|
||||
|
||||
To tell Hugo-theme-docdock to consider a page as a slide, just add a `type="slide"`in then frontmatter of your file. [{{%icon circle-arrow-right%}}read more on page as slide]({{%relref "page-slide.md"%}})
|
||||
|
||||
|
||||
Hugo-theme-docdock provides archetypes to help you create this kind of pages.
|
||||
|
||||
|
||||
## Front Matter
|
||||
Each Hugo page has to define a Front Matter in yaml, toml or json.
|
||||
|
||||
Hugo-theme-docdock uses the following parameters on top of the existing ones :
|
||||
|
||||
+++
|
||||
# Type of content, set "slide" to display it fullscreen with reveal.js
|
||||
type="page"
|
||||
|
||||
# Creator's Display name
|
||||
creatordisplayname = "Valere JEANTET"
|
||||
# Creator's Email
|
||||
creatoremail = "valere.jeantet@gmail.com"
|
||||
# LastModifier's Display name
|
||||
lastmodifierdisplayname = "Valere JEANTET"
|
||||
# LastModifier's Email
|
||||
lastmodifieremail = "valere.jeantet@gmail.com"
|
||||
+++
|
||||
|
||||
|
||||
## Ordering
|
||||
|
||||
Hugo provides a flexible way to handle order for your pages.
|
||||
|
||||
The simplest way is to use `weight` parameter in the front matter of your page.
|
||||
|
||||
[{{%icon circle-arrow-right%}}Read more on content organization]({{%relref "content-organisation/_index.md"%}})
|
||||
@@ -0,0 +1,8 @@
|
||||
+++
|
||||
title = "Home page"
|
||||
description = ""
|
||||
date = "2017-04-28T18:36:24+02:00"
|
||||
tags = ["tag1","tag2"]
|
||||
+++
|
||||
|
||||
To tell Hugo-theme-docdock to consider a page as homepage's content, just create a content file named `_index.md` in content folder.
|
||||
48
themes/docdock/exampleSite/content/create-page/myslide.md
Normal file
48
themes/docdock/exampleSite/content/create-page/myslide.md
Normal file
@@ -0,0 +1,48 @@
|
||||
+++
|
||||
title = "My Slide ! fullscreen"
|
||||
date = "2017-04-24T18:36:24+02:00"
|
||||
type="slide"
|
||||
hidden=true
|
||||
|
||||
theme = "league"
|
||||
[revealOptions]
|
||||
transition= 'concave'
|
||||
controls= true
|
||||
progress= true
|
||||
history= false
|
||||
center= true
|
||||
+++
|
||||
|
||||
# In the morning
|
||||
|
||||
___
|
||||
|
||||
## Getting up
|
||||
|
||||
- Turn off alarm
|
||||
- Get out of bed
|
||||
|
||||
___
|
||||
|
||||
## Breakfast
|
||||
|
||||
- Eat eggs
|
||||
- Drink coffee
|
||||
|
||||
---
|
||||
|
||||
# In the evening
|
||||
|
||||
___
|
||||
|
||||
## Dinner
|
||||
|
||||
- Eat spaghetti
|
||||
- Drink wine
|
||||
|
||||
___
|
||||
|
||||
## Going to sleep
|
||||
|
||||
- Get in bed
|
||||
- Count sheep
|
||||
@@ -0,0 +1,28 @@
|
||||
+++
|
||||
title = "About images"
|
||||
date = "2017-04-24T18:36:24+02:00"
|
||||
+++
|
||||
|
||||
Images have a similar syntax to links but include a preceding exclamation point.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Resizing image
|
||||
|
||||
Add HTTP parameters `width` and/or `height` to the link image to resize the image. Values are CSS values (default is `auto`).
|
||||
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
## Add CSS classes
|
||||
|
||||
Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow` and `border` are available but you could define other ones.
|
||||
|
||||

|
||||
|
||||

|
||||
114
themes/docdock/exampleSite/content/create-page/page-slide.md
Normal file
114
themes/docdock/exampleSite/content/create-page/page-slide.md
Normal file
@@ -0,0 +1,114 @@
|
||||
+++
|
||||
title = "Present a Slide"
|
||||
description = ""
|
||||
date = "2017-04-24T18:36:24+02:00"
|
||||
+++
|
||||
|
||||
A basic md content page can be rendered as a reveal.js presentation full screen.
|
||||
|
||||
{{%alert info%}}You can, also, **embed presentation in a page** as a small box, using the [revealjs]({{% relref "shortcodes/revealjs.md"%}}) shortcode in your md file.{{%/alert%}}
|
||||
|
||||
|
||||
## Formating
|
||||
Use your common Markdown syntax you use in Hugo, don't forget, you can put html tags too.
|
||||
|
||||
{{%notice info %}} Special syntax (in html comment) is available for adding attributes to Markdown elements. This is useful for fragments, amongst other things.
|
||||
{{%/notice%}}
|
||||
|
||||
Please read the [{{%icon book%}} doc from hakimel](https://github.com/hakimel/reveal.js/#instructions)
|
||||
|
||||
|
||||
## Options
|
||||
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.
|
||||
|
||||
+++
|
||||
title = "Test slide"
|
||||
type="slide"
|
||||
|
||||
theme = "league"
|
||||
[revealOptions]
|
||||
transition= 'concave'
|
||||
controls= true
|
||||
progress= true
|
||||
history= true
|
||||
center= true
|
||||
+++
|
||||
|
||||
[read more about reveal options here](https://github.com/hakimel/reveal.js/#configuration)
|
||||
|
||||
|
||||
## Slide Delimiters
|
||||
When creating the content for your slideshow presentation within content markdown file you need to be able to distinguish between one slide and the next. This is achieved very simply using a convention within Markdown that indicates the start of each new slide.
|
||||
|
||||
As both horizontal and vertical slides are supported by reveal.js each has it's own unique delimiter.
|
||||
|
||||
To denote the start of a horizontal slide simply add the following delimiter (dashes) in your Markdown:
|
||||
|
||||
---
|
||||
|
||||
|
||||
To denote the start of a vertical slide simply add the following delimiter (underscores) in your Markdown:
|
||||
|
||||
___
|
||||
|
||||
By using a combination of horizontal and vertical slides you can customize the navigation within your slideshow presentation. Typically vertical slides are used to present information below a top-level horizontal slide.
|
||||
|
||||
|
||||
|
||||
For example, a very simple slideshow presentation can be created as follows
|
||||
|
||||
```
|
||||
+++
|
||||
|
||||
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
|
||||
+++
|
||||
|
||||
# In the morning
|
||||
|
||||
___
|
||||
|
||||
## Getting up
|
||||
|
||||
- Turn off alarm
|
||||
- Get out of bed
|
||||
|
||||
___
|
||||
|
||||
## Breakfast
|
||||
|
||||
- Eat eggs
|
||||
- Drink coffee
|
||||
|
||||
---
|
||||
|
||||
# In the evening
|
||||
|
||||
___
|
||||
|
||||
## Dinner
|
||||
|
||||
- Eat spaghetti
|
||||
- Drink wine
|
||||
|
||||
___
|
||||
|
||||
## Going to sleep
|
||||
|
||||
- Get in bed
|
||||
- Count sheep
|
||||
|
||||
```
|
||||
|
||||
[{{%icon expand%}}click here to view this page rendered]({{%relref "myslide.md"%}})
|
||||
Reference in New Issue
Block a user