diff --git a/.gitignore b/.gitignore index 9381b76c29..64297518e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store public/ +exampleSite/public diff --git a/README.md b/README.md index b4cf8532dd..5c5606aaa5 100644 --- a/README.md +++ b/README.md @@ -2,52 +2,48 @@ This repository contains a theme for [Hugo](https://gohugo.io/), based on great [Grav Learn Theme](http://learn.getgrav.org/). -Visit the [theme documentation](https://matcornic.github.io/hugo-learn-doc/basics/what-is-this-hugo-theme/) to see what is going on. It is actually built with this theme. +Visit the [theme documentation](https://learn.netlify.com/en/) to see what is going on. It is actually built with this theme. + +## Main features + +- Automatic Search +- Multilingual mode +- Unlimited menu levels +- Automatic next/prev buttons to navigate through menu entries +- Image resizing, shadow… +- Attachments files +- List child pages +- Mermaid diagram (flowchart, sequence, gantt) +- Customizable look and feel and themes variants +- Buttons, Tip/Note/Info/Warning boxes, Expand ## Installation + Navigate to your themes folder in your Hugo site and use the following commands: + ``` $ cd themes $ git clone https://github.com/matcornic/hugo-theme-learn.git ``` -Check that your Hugo version is between `0.19` and `0.21` with `hugo version`. - -> From `0.22`, Hugo team introduced a long awaited feature: [nested sections](https://github.com/gohugoio/hugo/issues/465). As Hugo team deleted some functions on which this theme was based on, **this theme fails with current Hugo version**. A complete rewrite is needed and is [currently under construction](https://github.com/matcornic/hugo-theme-learn/issues/51). Be aware that this new version will possibly make breaking changes. - -> Until the v2 is not out yet, feel free to check [Docdock](https://github.com/vjeantet/hugo-theme-docdock), a great fork of hugo-learn-theme by [@vjeantet](https://github.com/vjeantet) that works and embraces latest features of Hugo! +Check that your Hugo version is minimum `0.25` with `hugo version`. ![Overview](https://github.com/matcornic/hugo-theme-learn/raw/master/images/tn.png) ## Usage -- [Visit the documentation](https://matcornic.github.io/hugo-learn-doc/basics/what-is-this-hugo-theme/) +- [Visit the documentation](https://learn.netlify.com/en/) -# Main functionalities +## Download old versions (prior to 2.0.0) -- Handle two levels of documentation -- Tip/Note/Info and Warning boxes -- Resize images -- Preview of original image size -- Add shadow or border on images -- Automatic table of contents -- Create buttons (typically used to provide a link to a demo) -- Search using `lunr` index -- Automatic next/prev buttons to navigate through pages +If you need old version for compatibility purpose, either download [theme source code from releases](https://github.com/matcornic/hugo-theme-learn/releases) or use the right git tag. For example, with `1.1.0` -# TODO - -- [Handling more than 2 levels in documentation](https://github.com/matcornic/hugo-theme-learn/issues/11) -- [Handling videos](https://github.com/matcornic/hugo-theme-learn/issues/13) -- [Add optional button to create doc issue (like github)](https://github.com/matcornic/hugo-theme-learn/issues/14) - -# Troubleshooting - -Changes have been made for automatically creating previous and next arrows. These changes restructured the theme and you might have compatibility problems when updating to the latest version of the theme. Please read [PR#36](https://github.com/matcornic/hugo-theme-learn/pull/36) to update your documentation with latest guidelines. - -If you don't want to update your documentation, use the git tag `1.0.0` +- Direct download way: https://github.com/matcornic/hugo-theme-learn/archive/1.1.0.zip +- Git way: ```shell cd themes/hugo-theme-learn -git checkout tags/1.0.0 +git checkout tags/1.1.0 ``` + +For both solutions, the documentation is available at https://github.com/matcornic/hugo-theme-learn/releases/download/1.1.0/hugo-learn-doc-1.1.0.zip diff --git a/archetypes/chapter.md b/archetypes/chapter.md index 1d975216f1..240b6524f4 100644 --- a/archetypes/chapter.md +++ b/archetypes/chapter.md @@ -1,11 +1,13 @@ ---- -title: "Some Chapter title" -weight: 0 -icon: "X. " # HTML code as prefix in the menu ---- ++++ +title = "{{ replace .TranslationBaseName "-" " " | title }}" +date = {{ .Date }} +weight = 5 +chapter = true +pre = "X. " ++++ ### Chapter X # Some Chapter title -Lorem ipsum +Lorem Ipsum. \ No newline at end of file diff --git a/archetypes/default.md b/archetypes/default.md index e47481e95a..c89c2e40de 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,7 +1,7 @@ ---- -title: "Some Title" -weight: 5 -toc: true ---- ++++ +title = "{{ replace .TranslationBaseName "-" " " | title }}" +date = {{ .Date }} +weight = 5 ++++ -Lorem Ipsum +Lorem Ipsum. \ No newline at end of file diff --git a/exampleSite/LICENSE.md b/exampleSite/LICENSE.md new file mode 100644 index 0000000000..973626de8a --- /dev/null +++ b/exampleSite/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2016 MATHIEU CORNIC + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/exampleSite/README.md b/exampleSite/README.md new file mode 100644 index 0000000000..c861e7563c --- /dev/null +++ b/exampleSite/README.md @@ -0,0 +1,39 @@ +- récriture doc -> TODO + - créer une section Showcase +- Menus déroulants icone -> TODO + +- créer des jolis thèmes de base (avec des noms ou au moins de meilleures couleurs) -> DOING + - Thème blue : OK + - Thème red: OK + - Theme green: OK +- Passer a Wercker -> OK +- corriger le multilangue pour la recherche et les autres ressources statiques : OK +- Section "MORE" -> OK +- ajouter les childs -> OK +- ajouter les attachments -> OK +- refaire la possibilité d'overrider le style/script/etc -> OK +- sticky bar -> OK +- ajouter Travis pour tester le thème quotidiennement avec les nouvelles versions de Hugo -> OK +- #54 -> OK +- corriger slider menu qui ne fonctionne plus -> OK +- Update font awesome -> OK +- internationalisation -> OK + - Messages: OK + - Ajouter un bouton pour changer de langue : OK +- netlify -> OK +- home page -> OK +- réintégrer la doc dans le même repo -> OK +- récupérer les shortcodes utiles -> OK + - expand : OK + - mermaid : OK +- chapter -> OK +- recherche (avec pointage à la première occurence sur la page) -> OK +- visited links -> OK +- disable Search -> OK +- vérifier que ça fonctionne avec une base url -> OK +- tester les affichages de page enfant -> OK +- comprendre l'histoire de pagination -> OK +- améliorer les couleurs de surlignement de highlightjs -> OK +- créer les archetypes -> OK + -> créé ceux de base -> OK + -> vérifier la possibilité de générer automatiquement le bon weight -> OK \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml new file mode 100644 index 0000000000..51f6b73d39 --- /dev/null +++ b/exampleSite/config.toml @@ -0,0 +1,73 @@ +baseURL = "/" +languageCode = "en-US" +defaultContentLanguage = "en" + +title = "Hugo Learn Documentation" +theme = "hugo-theme-learn" +themesdir = "../.." +metaDataFormat = "yaml" +defaultContentLanguageInSubdir= true + +[params] + editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/" + description = "Documentation for Hugo Learn Theme" + author = "Mathieu Cornic" + showVisitedLinks = true + +[outputs] +home = [ "HTML", "RSS", "JSON"] + +[Languages] +[Languages.en] +title = "Documentation for Hugo Learn Theme" +weight = 1 +languageName = "English" + +[[Languages.en.menu.shortcuts]] +name = " Github repo" +identifier = "ds" +url = "https://github.com/matcornic/hugo-theme-learn" +weight = 10 + +[[Languages.en.menu.shortcuts]] +name = " Showcases" +url = "showcase" +weight = 11 + +[[Languages.en.menu.shortcuts]] +name = " Hugo Documentation" +identifier = "hugodoc" +url = "https://gohugo.io/" +weight = 20 + +[[Languages.en.menu.shortcuts]] +name = " Credits" +url = "/credits" +weight = 30 + +[Languages.fr] +title = "Documentation du thème Hugo Learn" +weight = 2 +languageName = "Français" + +[[Languages.fr.menu.shortcuts]] +name = " Repo Github" +identifier = "ds" +url = "https://github.com/matcornic/hugo-theme-learn" +weight = 10 + +[[Languages.fr.menu.shortcuts]] +name = " Vitrine" +url = "/showcase" +weight = 11 + +[[Languages.fr.menu.shortcuts]] +name = " Documentation Hugo" +identifier = "hugodoc" +url = "https://gohugo.io/" +weight = 20 + +[[Languages.fr.menu.shortcuts]] +name = " Crédits" +url = "/credits" +weight = 30 \ No newline at end of file diff --git a/exampleSite/content/_index.en.md b/exampleSite/content/_index.en.md new file mode 100644 index 0000000000..822792e7bb --- /dev/null +++ b/exampleSite/content/_index.en.md @@ -0,0 +1,41 @@ +--- +title: "Learn Theme for Hugo" +--- + +# Hugo learn theme + +[Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) is a theme for [Hugo](https://gohugo.io/), a fast and modern static website engine written in Go. Where Hugo is often used for blogs, this multilingual-ready theme is **fully designed for documentation**. + +This theme is a partial porting of the [Learn theme](http://learn.getgrav.org/) of [Grav](https://getgrav.org/), a modern flat-file CMS written in PHP. + +{{% notice tip %}}Learn theme works with a _page tree structure_ to organize content : All contents are pages, which belong to other pages. [read more about this]({{%relref "cont/pages/_index.md"%}}) +{{% /notice %}} + +## Main features + +* [Automatic Search]({{%relref "basics/configuration/_index.md" %}}) +* [Multilingual mode]({{%relref "cont/i18n/_index.md" %}}) +* **Unlimited menu levels** +* **Automatic next/prev buttons to navigate through menu entries** +* [Image resizing, shadow...]({{%relref "cont/markdown.en.md#images" %}}) +* [Attachments files]({{%relref "shortcodes/attachments.en.md" %}}) +* [List child pages]({{%relref "shortcodes/children/_index.md" %}}) +* [Mermaid diagram]({{%relref "shortcodes/mermaid.en.md" %}}) (flowchart, sequence, gantt) +* [Customizable look and feel and themes variants]({{%relref "basics/configuration/_index.md"%}}) +* [Buttons]({{%relref "shortcodes/button.en.md" %}}), [Tip/Note/Info/Warning boxes]({{%relref "shortcodes/notice.en.md" %}}), [Expand]({{%relref "shortcodes/expand.en.md" %}}) + +![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow) + +## Contribute to this documentation +Feel free to update this content, just click the **Edit this page** link displayed on top right of each page, and pullrequest it + +{{% notice info %}} +Your modification will be deployed automatically when merged. +{{% /notice %}} + +## Documentation website +This current documentation has been statically generated with Hugo with a simple command : `hugo -t hugo-theme-learn` -- source code is [available here at GitHub](https://github.com/matcornic/hugo-theme-learn) + +{{% notice note %}} +Automatically published and hosted thanks to [Netlify](https://www.netlify.com/). Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/) +{{% /notice %}} \ No newline at end of file diff --git a/exampleSite/content/_index.fr.md b/exampleSite/content/_index.fr.md new file mode 100644 index 0000000000..5e642ebd48 --- /dev/null +++ b/exampleSite/content/_index.fr.md @@ -0,0 +1,43 @@ +--- +title: "Learn Theme for Hugo" +--- + +# Thème Hugo learn + +[Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) est un thème pour [Hugo](https://gohugo.io/), un générateur de site statique, rapide et modern, écrit en Go. Tandis que Hugo est souvent utilisé pour des blogs, ce thème multi-langue est **entièrement conçu pour la documentation**. + +Ce thème est un portage partiel du [thème Learn](http://learn.getgrav.org/) de [Grav](https://getgrav.org/), un CMS modern écrit en PHP. + +{{% notice tip %}}Le thème Learn fonctionne grâce à la structure de page aborescentes pour organiser le contenu: tous les contenus sont des pages qui appartiennent à d'autres pages. [Plus d'infos]({{%relref "cont/pages/_index.md"%}}) +{{% /notice %}} + +## Fonctionnalité principales + +* [Recherche automatique]({{%relref "basics/configuration/_index.md" %}}) +* [Mode multi-langue]({{%relref "cont/i18n/_index.md" %}}) +* **Nombre de niveau infini dans le menu** +* **Boutons suivant/précédent automatiquement générés pour naviguer entre les items du menu** +* [Taille d'image, ombres...]({{%relref "cont/markdown.fr.md#images" %}}) +* [Fichiers joints]({{%relref "shortcodes/attachments.fr.md" %}}) +* [Lister les pages filles]({{%relref "shortcodes/children/_index.md" %}}) +* [Diagrammes Mermaid]({{%relref "shortcodes/mermaid.fr.md" %}}) (flowchart, sequence, gantt) +* [Style configurable and variantes de couleurs]({{%relref "basics/configuration/_index.md"%}}) +* [Boutons]({{%relref "shortcodes/button.fr.md" %}}), [Messages Astuce/Note/Info/Attention]({{%relref "shortcodes/notice.fr.md" %}}), [Expand]({{%relref "shortcodes/expand.fr.md" %}}) + +![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow) + +## Contribuer à cette documentation + +N'hésitez pas à mettre à jour ce contenu en cliquant sur le lien **Modifier cette page** en haut de chaque page, et créer la Pull Request associée. + +{{% notice info %}} +Votre modification sera déployée automatiquement quand elle sera mergée. +{{% /notice %}} + +## Site de documentation + +Cette documentation statique a été générée avec Hugo avec une simple commande : `hugo -t hugo-theme-learn` -- le code source est [disponible sur Github](https://github.com/matcornic/hugo-theme-learn) + +{{% notice note %}} +Le site est auomatiquement publié et hébergé par [Netlify](https://www.netlify.com/). Plus d'infos sur le [déploiement de site Hugo avec Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)(En anglais) +{{% /notice %}} diff --git a/exampleSite/content/basics/_index.en.md b/exampleSite/content/basics/_index.en.md new file mode 100755 index 0000000000..56e2968e25 --- /dev/null +++ b/exampleSite/content/basics/_index.en.md @@ -0,0 +1,12 @@ +--- +title: Basics +weight: 5 +pre: "1. " +chapter: true +--- + +### Chapter 1 + +# Basics + +Discover what this Hugo theme is all about and the core-concepts behind it. diff --git a/exampleSite/content/basics/_index.fr.md b/exampleSite/content/basics/_index.fr.md new file mode 100644 index 0000000000..386bf19ac8 --- /dev/null +++ b/exampleSite/content/basics/_index.fr.md @@ -0,0 +1,12 @@ +--- +title: Démarrage +weight: 5 +pre: "1. " +chapter: true +--- + +### Chapitre 1 + +# Démarrage + +Découvrez comment utiliser ce thème Hugo et apprenez en les concepts diff --git a/exampleSite/content/basics/configuration/_index.en.md b/exampleSite/content/basics/configuration/_index.en.md new file mode 100644 index 0000000000..d4ed0e7b88 --- /dev/null +++ b/exampleSite/content/basics/configuration/_index.en.md @@ -0,0 +1,246 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Configuration +weight: 20 +--- + +## Global site parameters + +On top of [Hugo global configuration](https://gohugo.io/overview/configuration/), **Hugo-theme-learn** lets you define the following parameters in your `config.toml` (here, values are default). + +Note that some of these parameters are explained in details in other sections of this documentation. + +```toml +[params] + # Prefix URL to edit current page. Will display an "Edit this page" button on top right hand corner of every page. + # Useful to give opportunity to people to create merge request for your doc. + # See the config.toml file from this documentation site to have an example. + editURL = "" + # Author of the site, will be used in meta information + author = "" + # Description of the site, will be used in meta information + description = "" + # Shows a checkmark for visited pages on the menu + showVisitedLinks = false + # Disable search function. It will hide search bar + disableSearch = false + # Javascript and CSS cache are automatically busted when new version of site is generated. + # Set this to true to disable this behavior (some proxies don't handle well this optimization) + disableAssetsBusting = false + # Set this to true to disable copy-to-clipboard button for inline code. + disableInlineCopyToClipBoard = false + # A title for shortcuts in menu is set by default. Set this to true to disable it. + disableShortcutsTitle = false + # When using mulitlingual website, disable the switch language button. + disableLanguageSwitchingButton = false + # Order sections in menu by "weight" or "title". Default to "weight" + ordersectionsby = "weight" + # Change default color scheme with a variant one. Can be "red", "blue", "green". + themeVariant = "" +``` + +## Activate search + +If not already present, add the follow lines in the same `config.toml` file. + +```toml +[outputs] +home = [ "HTML", "RSS", "JSON"] +``` + +Learn theme uses the last improvement available in hugo version 20+ to generate a json index file ready to be consumed by lunr.js javascript search engine. + +> Hugo generate lunrjs index.json at the root of public folder. +> When you build the site with hugo server, hugo generates it internally and of course it don’t show up in the filesystem + + +## Style customization + +**Hugo-theme-learn** has been built to be as configurable as possible by defining multiple [partials](https://gohugo.io/templates/partials/) + +In `themes/hugo-theme-learn/layouts/partials/`, you will find all the partials defined for this theme. If you need to overwrite something, don't change the code directly. Instead [follow this page](https://gohugo.io/themes/customizing/). You'd create a new partial in the `layouts/partials` folder of your local project. This partial will have the priority. + +This theme defines the following partials : + +- *header*: the header of the content page (contains the breadcrumbs). _Not meant to be overwritten_ +- *custom-header*: custom headers in page. Meant to be overwritten when adding CSS imports. Don't forget to include `style` HTML tag directive in your file +- *footer*: the footer of the content page (contains the arrows). _Not meant to be overwritten_ +- *custom-footer*: custom footer in page. Meant to be overwritten when adding Javacript. Don't forget to include `javascript` HTML tag directive in your file +- *favicon*: the favicon +- *logo*: the logo, on top left hand corner. +- *meta*: HTML meta tags, if you want to change default behavior +- *menu*: left menu. _Not meant to be overwritten_ +- *menu-footer*: footer of the the left menu +- *search*: search box +- *toc*: table of contents + +### Change the logo + +Create a new file in `layouts/partials/` named `logo.html`. Then write any HTML you want. +You could use an `img` HTML tag and reference an image created under the *static* folder, or you could paste a SVG definition ! + +{{% notice note %}} +The size of the logo will adapt automatically +{{% /notice %}} + +### Change the favicon + +If your favicon is a png, just drop off your image in your local `static/images/` folder and names it `favicon.png` + +If you need to change this default behavior, create a new file in `layouts/partials/` named `favicon.html`. Then write something like this: + +```html + +``` + +### Change default colors {#theme-variant} + +**Hugo Learn theme** let you choose between 3 native color scheme variants, but feel free to add one yourself ! Default color scheme is based on [Grav Learn Theme](https://learn.getgrav.org/). + +#### Red variant + +```toml +[params] + # Change default color scheme with a variant one. Can be "red", "blue", "green". + themeVariant = "red" +``` + +![Red variant](/basics/configuration/images/red-variant.png?width=60%) + +#### Blue variant + +```toml +[params] + # Change default color scheme with a variant one. Can be "red", "blue", "green". + themeVariant = "blue" +``` + +![Blue variant](/basics/configuration/images/blue-variant.png?width=60%) + +#### Green variant + +```toml +[params] + # Change default color scheme with a variant one. Can be "red", "blue", "green". + themeVariant = "green" +``` + +![Green variant](/basics/configuration/images/green-variant.png?width=60%) + +#### 'Yours‘ variant + +First, create a new CSS file in your local `static/css` folder prefixed by `theme` (e.g. with _mine_ theme `static/css/theme-mine.css`). Copy the following content and modify colors in CSS variables. + +```css + +:root{ + + --MAIN-TEXT-color:#323232; /* Color of text by default */ + --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ + --MAIN-LINK-color:#1C90F3; /* Color of links */ + --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */ + --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */ + + --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */ + --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */ + + --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */ + --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */ + --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */ + + --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */ + --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */ + --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ + --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ + --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ + --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ + + --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */ + --MENU-SECTION-HR-color: #20272b; /* Color of
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
+``` + +## Emphasis + +### Bold +For emphasizing a snippet of text with a heavier font-weight. + +The following snippet of text is **rendered as bold text**. + +```markdown +**rendered as bold text** +``` +renders to: + +**rendered as bold text** + +and this HTML + +```html +rendered as bold text +``` + +### Italics +For emphasizing a snippet of text with italics. + +The following snippet of text is _rendered as italicized text_. + +```markdown +_rendered as italicized text_ +``` + +renders to: + +_rendered as italicized text_ + +and this HTML: + +```html +rendered as italicized text +``` + + +### strikethrough +In GFM (GitHub flavored Markdown) you can do strikethroughs. + +```markdown +~~Strike through this text.~~ +``` +Which renders to: + +~~Strike through this text.~~ + +HTML: + +```html +++``` + +Blockquotes can also be nested: + +```markdown +> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. +Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. +>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor +odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. +``` + +Renders to: + +> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. +Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. +>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor +odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. + + +## Notices + +{{% notice note %}} +The old mechanism for notices overriding the block quote syntax (`>>>`) has been deprecated. Notices are now handled via a dedicated plugin called [Markdown Notices](https://github.com/getgrav/grav-plugin-markdown-notices) +{{% /notice %}} + + +## Lists + +### Unordered +A list of items in which the order of the items does not explicitly matter. + +You may use any of the following symbols to denote bullets for each list item: + +```markdown +* valid bullet +- valid bullet ++ valid bullet +``` + +For example + +```markdown ++ Lorem ipsum dolor sit amet ++ Consectetur adipiscing elit ++ Integer molestie lorem at massa ++ Facilisis in pretium nisl aliquet ++ Nulla volutpat aliquam velit + - Phasellus iaculis neque + - Purus sodales ultricies + - Vestibulum laoreet porttitor sem + - Ac tristique libero volutpat at ++ Faucibus porta lacus fringilla vel ++ Aenean sit amet erat nunc ++ Eget porttitor lorem +``` +Renders to: + ++ Lorem ipsum dolor sit amet ++ Consectetur adipiscing elit ++ Integer molestie lorem at massa ++ Facilisis in pretium nisl aliquet ++ Nulla volutpat aliquam velit + - Phasellus iaculis neque + - Purus sodales ultricies + - Vestibulum laoreet porttitor sem + - Ac tristique libero volutpat at ++ Faucibus porta lacus fringilla vel ++ Aenean sit amet erat nunc ++ Eget porttitor lorem + +And this HTML + +```html +Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
+
In this example, <section></section>
should be wrapped with code.
+ // Some comments + line 1 of code + line 2 of code + line 3 of code ++ +Renders to: + + // Some comments + line 1 of code + line 2 of code + line 3 of code + +HTML: + +```html +
+
+ // Some comments
+ line 1 of code
+ line 2 of code
+ line 3 of code
+
+
+```
+
+
+### Block code "fences"
+
+Use "fences" ```` ``` ```` to block in multiple lines of code.
+
++``` markup +Sample text here... +``` ++ + +``` +Sample text here... +``` + +HTML: + +```html +
+ Sample text here...
+
+```
+
+### Syntax highlighting
+
+GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code:
+
++```js +grunt.initConfig({ + assemble: { + options: { + assets: 'docs/assets', + data: 'src/data/*.{json,yml}', + helpers: 'src/custom-helpers.js', + partials: ['src/partials/**/*.{hbs,md}'] + }, + pages: { + options: { + layout: 'default.hbs' + }, + files: { + './': ['src/templates/pages/index.hbs'] + } + } + } +}; +``` ++ +Renders to: + +```js +grunt.initConfig({ + assemble: { + options: { + assets: 'docs/assets', + data: 'src/data/*.{json,yml}', + helpers: 'src/custom-helpers.js', + partials: ['src/partials/**/*.{hbs,md}'] + }, + pages: { + options: { + layout: 'default.hbs' + }, + files: { + './': ['src/templates/pages/index.hbs'] + } + } + } +}; +``` + +## Tables +Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned. + + +```markdown +| Option | Description | +| ------ | ----------- | +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | +``` + +Renders to: + +| Option | Description | +| ------ | ----------- | +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | + +And this HTML: + +```html +
Option | +Description | +
---|---|
data | +path to data files to supply the data that will be passed into templates. | +
engine | +engine to be used for processing templates. Handlebars is the default. | +
ext | +extension to be used for dest files. | +
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
+``` + +## Emphasis + +### Bold +For emphasizing a snippet of text with a heavier font-weight. + +The following snippet of text is **rendered as bold text**. + +```markdown +**rendered as bold text** +``` +renders to: + +**rendered as bold text** + +and this HTML + +```html +rendered as bold text +``` + +### Italics +For emphasizing a snippet of text with italics. + +The following snippet of text is _rendered as italicized text_. + +```markdown +_rendered as italicized text_ +``` + +renders to: + +_rendered as italicized text_ + +and this HTML: + +```html +rendered as italicized text +``` + + +### strikethrough +In GFM (GitHub flavored Markdown) you can do strikethroughs. + +```markdown +~~Strike through this text.~~ +``` +Which renders to: + +~~Strike through this text.~~ + +HTML: + +```html +++``` + +Blockquotes can also be nested: + +```markdown +> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. +Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. +>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor +odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. +``` + +Renders to: + +> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. +Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. +>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor +odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. + + +## Notices + +{{% notice note %}} +The old mechanism for notices overriding the block quote syntax (`>>>`) has been deprecated. Notices are now handled via a dedicated plugin called [Markdown Notices](https://github.com/getgrav/grav-plugin-markdown-notices) +{{% /notice %}} + + +## Lists + +### Unordered +A list of items in which the order of the items does not explicitly matter. + +You may use any of the following symbols to denote bullets for each list item: + +```markdown +* valid bullet +- valid bullet ++ valid bullet +``` + +For example + +```markdown ++ Lorem ipsum dolor sit amet ++ Consectetur adipiscing elit ++ Integer molestie lorem at massa ++ Facilisis in pretium nisl aliquet ++ Nulla volutpat aliquam velit + - Phasellus iaculis neque + - Purus sodales ultricies + - Vestibulum laoreet porttitor sem + - Ac tristique libero volutpat at ++ Faucibus porta lacus fringilla vel ++ Aenean sit amet erat nunc ++ Eget porttitor lorem +``` +Renders to: + ++ Lorem ipsum dolor sit amet ++ Consectetur adipiscing elit ++ Integer molestie lorem at massa ++ Facilisis in pretium nisl aliquet ++ Nulla volutpat aliquam velit + - Phasellus iaculis neque + - Purus sodales ultricies + - Vestibulum laoreet porttitor sem + - Ac tristique libero volutpat at ++ Faucibus porta lacus fringilla vel ++ Aenean sit amet erat nunc ++ Eget porttitor lorem + +And this HTML + +```html +Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
+
In this example, <section></section>
should be wrapped with code.
+ // Some comments + line 1 of code + line 2 of code + line 3 of code ++ +Renders to: + + // Some comments + line 1 of code + line 2 of code + line 3 of code + +HTML: + +```html +
+
+ // Some comments
+ line 1 of code
+ line 2 of code
+ line 3 of code
+
+
+```
+
+
+### Block code "fences"
+
+Use "fences" ```` ``` ```` to block in multiple lines of code.
+
++``` markup +Sample text here... +``` ++ + +``` +Sample text here... +``` + +HTML: + +```html +
+ Sample text here...
+
+```
+
+### Syntax highlighting
+
+GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code:
+
++```js +grunt.initConfig({ + assemble: { + options: { + assets: 'docs/assets', + data: 'src/data/*.{json,yml}', + helpers: 'src/custom-helpers.js', + partials: ['src/partials/**/*.{hbs,md}'] + }, + pages: { + options: { + layout: 'default.hbs' + }, + files: { + './': ['src/templates/pages/index.hbs'] + } + } + } +}; +``` ++ +Renders to: + +```js +grunt.initConfig({ + assemble: { + options: { + assets: 'docs/assets', + data: 'src/data/*.{json,yml}', + helpers: 'src/custom-helpers.js', + partials: ['src/partials/**/*.{hbs,md}'] + }, + pages: { + options: { + layout: 'default.hbs' + }, + files: { + './': ['src/templates/pages/index.hbs'] + } + } + } +}; +``` + +## Tables +Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned. + + +```markdown +| Option | Description | +| ------ | ----------- | +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | +``` + +Renders to: + +| Option | Description | +| ------ | ----------- | +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | + +And this HTML: + +```html +
Option | +Description | +
---|---|
data | +path to data files to supply the data that will be passed into templates. | +
engine | +engine to be used for processing templates. Handlebars is the default. | +
ext | +extension to be used for dest files. | +
-
Woops. Looks like this page doesn't exist.
+{{T "message-404"}}
- +- The site is working, change the URL in your browser to get to any custom page. But, don't forget to overwrite this index.html with your own. You typically have 3 choices : -
-<meta http-equiv="refresh" content="0; url=http://example.com/"/>
-
+ Le site fonctionne. Ne pas oublier de personaliser cette page avec votre propre contenu. 2 manières de faire : +
++ The site is working. Don't forget to customize this homepage with your own. You typically have 2 choices : +
+