Use a theme and let content alone

master
Quentin Duchemin 2021-05-18 16:22:28 +02:00
parent b1a86c4567
commit 514d1b99e3
Signed by: Chosto
GPG Key ID: 0547178FEEDE7D6B
20 changed files with 80 additions and 55 deletions

View File

@ -8,7 +8,7 @@ languageCode: fr-fr
languageName: Français languageName: Français
watch: true watch: true
paginate: 5 paginate: 5
summaryLength: 50
# All pages under posts section will have this link structure # All pages under posts section will have this link structure
permalinks: permalinks:
posts: /:sections/:title/ posts: /:sections/:title/
@ -27,3 +27,6 @@ privacy:
disable: true disable: true
youtube: youtube:
disable: true disable: true
theme:
- chosto

View File

@ -1,6 +0,0 @@
---
title: "Notifications"
date: 2021-05-18T14:00:32+02:00
draft: true
---

View File

@ -1,6 +0,0 @@
---
title: "Peurs"
date: 2021-05-18T13:49:36+02:00
draft: true
---

View File

@ -1,6 +0,0 @@
---
title: "Peurs"
date: 2021-05-18T13:49:20+02:00
draft: true
---

View File

@ -1,5 +1,7 @@
--- ---
title: Smartphone title: Smartphone
subtitle: Que faire de notre addiction ?
code: ST
categories: categories:
- Technologie - Technologie
- Réflexions - Réflexions
@ -7,3 +9,5 @@ tags:
- smartphone - smartphone
- addiction - addiction
--- ---
Ce dossier réfléchit à...

View File

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
{{ block "title" . }}
{{ .Site.Title }}
{{ end }}
</title>
</head>
<body>
<!-- Code that all your templates share, like a header -->
{{ block "main" . }}
<!-- The part of the page that begins to differ between templates -->
{{ end }}
{{ block "footer" . }}
<!-- More shared code, perhaps a footer but that can be overridden if need be in -->
{{ end }}
</body>
</html>

View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2021 Quentin Duchemin
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.

View File

@ -3,4 +3,3 @@ title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }} date: {{ .Date }}
draft: true draft: true
--- ---

View File

@ -0,0 +1,8 @@
---
title: "{{ replace .Name "-" " " | title }}"
subtitle:
code:
categories:
tags:
---
<!-- We use sections to define "cases", i.e. serie of articles about a topic -->

View File

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -1,9 +1,6 @@
{{ define "main" }} {{ define "main" }}
<main> <main>
<article> <article>
<header>
<h1>{{.Title}}</h1>
</header>
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md --> <!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
{{ .Content }} {{ .Content }}
</article> </article>

View File

@ -1,11 +1,5 @@
{{ define "main" }} {{ define "main" }}
<main> <main>
<header>
<h1>{{.Title}}</h1>
{{ with .Params.subtitle }}
<span>{{.}}</span>
{{ end }}
</header>
<div> <div>
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md --> <!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{ .Content }} {{ .Content }}

View File

@ -0,0 +1,3 @@
<footer>
Quentin Duchemin
</footer>

View File

@ -0,0 +1,6 @@
<head>
<meta charset="utf-8">
<title>
{{ .Site.Title }}
</title>
</head>

View File

@ -0,0 +1,6 @@
<header>
<h1>{{ .Title }}</h1>
{{ with .Params.subtitle }}
<h2>{{ . }}</h2>
{{ end }}
</header>

View File

@ -0,0 +1,12 @@
name = "Chosto"
license = "MIT"
licenselink = "https://git.chosto.me/Chosto/blog/themes/chosto/LICENSE"
description = "Theme used for blog.chosto.me"
homepage = "https://git.chosto.me/Chosto/blog/themes/chosto"
tags = []
features = []
min_version = "0.41.0"
[author]
name = "Quentin Duchemin"
homepage = "blog.chosto.me"