Compare commits

..

No commits in common. "6a520b937e8f5966726e0bc8bac5111cec1ded87" and "411418190c92dec8d3d6d0ca11a348354a8ffdc7" have entirely different histories.

7 changed files with 11 additions and 25 deletions

View File

@ -1,16 +1,6 @@
# blog
My blog built with Hugo (static website generator) and Bulma (tiny yet powerful CSS framework).
## Content and choices
It contains a theme coded specifically for the blog, with example taken from Hugo documentation. The purpose of not taking a great existing theme is to learn new webthings (because I really suck at web development). Also I wanted to learn a bit about Bulma, a tiny CSS framework without a line of JavaScript.
Hugo is really powerful yet pretty light and really fast. I do like the way templating is used to achieve very elegant tricks. In the past we would have used databases and dynamic languages like PHP for the same result.
I think that using Wordpress for a little static blog is no longer relevant and I am really enthousiastic about projects like Hugo. Additionnally, the community seems very friendly. Other static CMS such as Ghost have an economic model that I don't like (eg you have to pay for plugins) and Grav is great but not so artisanal. The learning curve is pretty high and you're encouraged to use an existing theme with the PHP admin interface.
With Hugo, I really have the sensation of minimizing the ressources I use while totally understanding what I am doing (even if I am doing it badly). Only exception would be the pagination which uses an obscure internal template for ease.
My blog built with Hugo.
## Building

View File

@ -9,7 +9,6 @@ languageName: Français
watch: true
paginate: 5
summaryLength: 50
# All pages under posts section will have this link structure
permalinks:
posts: /:sections/:title/

View File

@ -4,7 +4,7 @@
<body>
{{- partial "navbar.html" . -}}
{{- partial "header.html" . -}}
<div class="content">
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "about.html" . -}}

View File

@ -1,3 +1,3 @@
<aside>
<aside id="about">
blablabla je suis Quentin ajouter une image
</aside>

View File

@ -1,8 +1,5 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ $style := resources.Get "css/bulma.min.css" }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
<title>
{{ .Site.Title }}
</title>

View File

@ -1,14 +1,14 @@
{{ define "main" }}
<aside>
<aside id="meta">
<div>
<section>
<time class="post-date" datetime="{{ .Date.Format `2006-01-02T15:04:05Z07:00` | safeHTML }}">
Article publié le {{ .Date.Day }} {{ index $.Site.Data.months_fr (printf "%d" .Date.Month) }} {{ .Date.Year }} (dernière modification le {{ .Lastmod.Day }} {{ index $.Site.Data.months_fr (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Year }})
</time>
<h4>{{ .FuzzyWordCount }} mots </h4>
<h4 id="wordcount"> {{ .FuzzyWordCount }} mots </h4>
</section>
{{ with .Params.categories }}
<ul>
<ul id="categories">
{{ range . }}
<li><a href="{{ "categories" | absURL }}/{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}
@ -21,7 +21,7 @@ If the current blog post belongs to a case, we will add a side menu
with all other blog posts belonging to that case, emphasis to the current.
-->
{{ with .CurrentSection.Params.Title }}
<aside class="menu">
<aside class="menu" id="case">
<p class="menu-label">
Dans le dossier « {{ . }} »...
</p>
@ -38,15 +38,15 @@ with all other blog posts belonging to that case, emphasis to the current.
</ul>
</aside>
{{ end }}
<section>
<h1>{{ .Title }}</h1>
<section id="main">
<h1 id="title">{{ .Title }}</h1>
<div>
<article>
<article id="content">
{{ .Content }}
</article>
</div>
</section>
<aside>
<aside id="prev_next">
<div>
{{ with .PrevInSection }}
<a class="previous" href="{{ .Permalink }}"> {{ .Title }}</a>