From 4c21f9098cce31f6816a43d56f758cacd0cdf13c Mon Sep 17 00:00:00 2001 From: Romain de Laage Date: Mon, 21 Nov 2022 15:34:24 +0100 Subject: [PATCH] Begin demo hugo theme --- .hugo_build.lock | 0 archetypes/default.md | 6 ++++ config.yaml | 4 +++ content/_index.md | 1 + content/posts/example1/index.md | 9 ++++++ content/posts/example2/index.md | 8 +++++ index.html | 30 ------------------- themes/poc/layouts/_default/baseof.html | 13 ++++++++ themes/poc/layouts/_default/index.html | 10 +++++++ themes/poc/layouts/_default/single.html | 10 +++++++ themes/poc/layouts/partials/fedicomment.html | 4 +++ themes/poc/layouts/partials/head.html | 7 +++++ .../poc/static/fedicomment.css | 0 .../poc/static/fedicomment.js | 0 main.css => themes/poc/static/main.css | 0 15 files changed, 72 insertions(+), 30 deletions(-) create mode 100644 .hugo_build.lock create mode 100644 archetypes/default.md create mode 100644 config.yaml create mode 100644 content/_index.md create mode 100644 content/posts/example1/index.md create mode 100644 content/posts/example2/index.md delete mode 100644 index.html create mode 100644 themes/poc/layouts/_default/baseof.html create mode 100644 themes/poc/layouts/_default/index.html create mode 100644 themes/poc/layouts/_default/single.html create mode 100644 themes/poc/layouts/partials/fedicomment.html create mode 100644 themes/poc/layouts/partials/head.html rename fedicomment.css => themes/poc/static/fedicomment.css (100%) rename fedicomment.js => themes/poc/static/fedicomment.js (100%) rename main.css => themes/poc/static/main.css (100%) diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..5bde24e --- /dev/null +++ b/config.yaml @@ -0,0 +1,4 @@ +baseURL: 'http://example.org/' +languageCode: 'en-us' +title: 'My New Hugo Site' +theme: 'poc' diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..cd08755 --- /dev/null +++ b/content/_index.md @@ -0,0 +1 @@ +Hello world! diff --git a/content/posts/example1/index.md b/content/posts/example1/index.md new file mode 100644 index 0000000..5726b89 --- /dev/null +++ b/content/posts/example1/index.md @@ -0,0 +1,9 @@ +--- +title: Example article 1 +date: 2022-11-21 +postid: 109357906602593256 +--- + +# Example 1 + +test diff --git a/content/posts/example2/index.md b/content/posts/example2/index.md new file mode 100644 index 0000000..4dbc9e2 --- /dev/null +++ b/content/posts/example2/index.md @@ -0,0 +1,8 @@ +--- +title: Example article 2 +date: 2022-11-21 +--- + +# Example 2 + +test diff --git a/index.html b/index.html deleted file mode 100644 index e7c2a5f..0000000 --- a/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - Fedicomment demo - - -

Les Connards Pro™, capter les données des cons–

-
- –sommateurs. Les données des consommateurs. Cet épisode inédit des Connards Professionnels™ vous invite à découvrir le monde merveilleux du capitalisme de surveillance, où l’on donne ce qui nous est le plus personnel : notre attention. - -

Le retour des Connards Pros™ avec des épisodes inédits !

- - Afin de fêter leur retour, le Framablog souhaite publier, chaque semaine pendant un mois, un des épisodes inédits de ce travail… de connards, il faut bien le dire ! - - Le Guide du Connard Professionnel est un livre-BD scénarisé par Pouhiou et dessiné par Gee, placé dans le domaine public volontaire. Nos comparses viennent d’ailleurs de le publier en un joli livre, qui se télécharge librement mais s’achète aussi dans sa version papier si vous voulez soutenir les auteurs. - - L'article utilisé en exemple ici provient du Framablog et a été plublié le 17 novembre 2022. - - Les réponses viennent de Mastodon, depuis le pouet d'annonce de l'article. -
-
-
Your browser must support JS to view comments
-
- - - diff --git a/themes/poc/layouts/_default/baseof.html b/themes/poc/layouts/_default/baseof.html new file mode 100644 index 0000000..02f1816 --- /dev/null +++ b/themes/poc/layouts/_default/baseof.html @@ -0,0 +1,13 @@ + + + {{- partial "head.html" . -}} + +
+

{{ .Site.Title }}

+
+ {{- block "main" . }}{{- end }} + + + diff --git a/themes/poc/layouts/_default/index.html b/themes/poc/layouts/_default/index.html new file mode 100644 index 0000000..9f548a8 --- /dev/null +++ b/themes/poc/layouts/_default/index.html @@ -0,0 +1,10 @@ +{{ define "main" }} + {{ .Content }} + +{{ end }} diff --git a/themes/poc/layouts/_default/single.html b/themes/poc/layouts/_default/single.html new file mode 100644 index 0000000..6800d59 --- /dev/null +++ b/themes/poc/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{ define "main" }} +
+

{{ if .Params.Title }}

+{{ .Content }} +{{ end }} +
+{{ if .Params.postid }} +{{ partial "fedicomment.html" . }} +{{ end }} +{{ end }} diff --git a/themes/poc/layouts/partials/fedicomment.html b/themes/poc/layouts/partials/fedicomment.html new file mode 100644 index 0000000..8eabd83 --- /dev/null +++ b/themes/poc/layouts/partials/fedicomment.html @@ -0,0 +1,4 @@ +
+
Your browser must support JS to view comments
+
+ diff --git a/themes/poc/layouts/partials/head.html b/themes/poc/layouts/partials/head.html new file mode 100644 index 0000000..386f19e --- /dev/null +++ b/themes/poc/layouts/partials/head.html @@ -0,0 +1,7 @@ + + {{ .Site.Title }} + + + + + diff --git a/fedicomment.css b/themes/poc/static/fedicomment.css similarity index 100% rename from fedicomment.css rename to themes/poc/static/fedicomment.css diff --git a/fedicomment.js b/themes/poc/static/fedicomment.js similarity index 100% rename from fedicomment.js rename to themes/poc/static/fedicomment.js diff --git a/main.css b/themes/poc/static/main.css similarity index 100% rename from main.css rename to themes/poc/static/main.css