diff --git a/archetypes/chapter.md b/archetypes/chapter.md index 1d975216f1..36bd987874 100644 --- a/archetypes/chapter.md +++ b/archetypes/chapter.md @@ -1,11 +1,12 @@ --- -title: "Some Chapter title" -weight: 0 -icon: "X. " # HTML code as prefix in the menu +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ .Date }} +weight: 5 +pre: "X. " # HTML code as prefix in the menu +draft: true --- ### Chapter X -# Some Chapter title - -Lorem ipsum +Lorem Ipsum. +Notice `draft` is set to true. \ No newline at end of file diff --git a/archetypes/default.md b/archetypes/default.md index e47481e95a..7d8f53cf8f 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,7 +1,9 @@ --- -title: "Some Title" +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ .Date }} weight: 5 -toc: true +draft: true --- -Lorem Ipsum +Lorem Ipsum. +Notice `draft` is set to true. \ No newline at end of file diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000000..fa8f514b92 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,32 @@ +[Search-placeholder] +other = "Search..." + +[Clear-History] +other = "Clear History" + +[Page] +other = "Page" + +[Next-Pages] +other = "Next Pages" + +[Previous-Pages] +other = "Previous Pages" + +[pagination-on] +other = "on" + +[Attachments-label] +other = "Attachments" + +[title-404] +other = "Error" + +[message-404] +other = "Woops. Looks like this page doesn't exist." + +[Go-to-homepage] +other = "Go to homepage" + +[Edit-this-page] +other = "Edit page" \ No newline at end of file diff --git a/i18n/fr.toml b/i18n/fr.toml new file mode 100644 index 0000000000..9a3839119e --- /dev/null +++ b/i18n/fr.toml @@ -0,0 +1,32 @@ +[Search-placeholder] +other = "Rechercher..." + +[Clear-History] +other = "Supprimer l'historique" + +[Page] +other = "Page" + +[Next-Pages] +other = "Pages suivantes" + +[Previous-Pages] +other = "Pages précédentes" + +[pagination-on] +other = "sur" + +[Attachments-label] +other = "Documents joints" + +[title-404] +other = "Erreur" + +[message-404] +other = "Oups. On dirait que cette page n'existe pas " + +[Go-to-homepage] +other = "Vers la page d'accueil" + +[Edit-this-page] +other = "Modifier la page" \ No newline at end of file diff --git a/i18n/nb.toml b/i18n/nb.toml new file mode 100644 index 0000000000..e9b7b60930 --- /dev/null +++ b/i18n/nb.toml @@ -0,0 +1,32 @@ +[Search-placeholder] +other = "Søk..." + +[Clear-History] +other = "Fjern historikk" + +[Page] +other = "Side" + +[Next-Pages] +other = "Neste" + +[Previous-Pages] +other = "Forrige" + +[pagination-on] +other = "av" + +[Attachments-label] +other = "Vedlegg" + +[title-404] +other = "Feil" + +[message-404] +other = "Ups... Ser ikke ut som denne siden eksisterer." + +[Go-to-homepage] +other = "Gå til hovedsiden" + +[Edit-this-page] +other = "Editer" \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html index ba0ba4c5f9..18de1d167b 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -5,13 +5,14 @@ {{ partial "meta.html" . }} {{ partial "favicon.html" . }} {{ .Scratch.Add "title" "" }}{{ if eq .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}}
- 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 façons de faire : +
++ The site is working. Don't forget to customize this homepage with your own. You typically have 2 choices : +
++{{ end }} +{{ partial "footer.html" . }} \ No newline at end of file diff --git a/layouts/index.json b/layouts/index.json new file mode 100644 index 0000000000..367f3b3185 --- /dev/null +++ b/layouts/index.json @@ -0,0 +1,12 @@ +[{{ range $index, $page := .Site.Pages }} +{{- if ne $page.Type "json" -}} +{{- if and $index (gt $index 0) -}},{{- end }} +{ + "uri": "{{ $page.Permalink }}", + "title": "{{ htmlEscape $page.Title}}", + "tags": [{{ range $tindex, $tag := $page.Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}], + "description": "{{ htmlEscape .Description}}", + "content": {{$page.Plain | jsonify}} +} +{{- end -}} +{{- end -}}] \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index eedba9d357..760197f7ad 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,71 +1,67 @@ - - {{ $isChapter := .Params.chapter | default (eq .Kind "section")}} - {{ if $isChapter }} - - {{ end }} + {{ if .Params.chapter }} + + {{ end }} + - - - {{ if $.Site.Params.autoNav }} - {{ $.Scratch.Set "_sectionpages" (slice) }} - {{ if $.Site.Params.menu }} - {{ range $sname := $.Site.Params.menu }} - {{ $.Scratch.Add "_sectionpages" ($.Site.GetPage "section" $sname) }} - {{ end }} - {{ else }} - {{ range $sname, $spages := .Site.Sections }} - {{ $.Scratch.Add "_sectionpages" ($.Site.GetPage "section" $sname) }} - {{ end }} - {{ $.Scratch.Set "_sectionpages" (sort ($.Scratch.Get "_sectionpages") "Weight") }} - {{ end }} - {{ $.Scratch.Set "_allpages" (slice) }} - {{ range $.Scratch.Get "_sectionpages" }} - {{ if .Content }} - {{ $.Scratch.Add "_allpages" . }} - {{ end }} - {{ range index $.Site.Sections .Section }} - {{ $.Scratch.Add "_allpages" .Page }} - {{ end }} - {{ end }} - {{ end }} +