v0.5 : switch to Pelican #1
16 changed files with 132 additions and 90 deletions
[config][wip] Switching to Pelican static site engine
commit
2b1b805f94
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,5 @@
|
|||
*.swp
|
||||
public
|
||||
output
|
||||
publish
|
||||
theme
|
||||
|
|
38
Makefile
38
Makefile
|
@ -1,12 +1,42 @@
|
|||
PUBLISH_DIR=public
|
||||
PELICAN=pipenv run pelican
|
||||
|
||||
BASEDIR=$(CURDIR)
|
||||
INPUTDIR=$(BASEDIR)/content
|
||||
OUTPUTDIR=$(BASEDIR)/output
|
||||
PUBLISHDIR=$(BASEDIR)/publish
|
||||
CONFFILE=$(BASEDIR)/pelicanconf.py
|
||||
PUBLISHCONF=$(BASEDIR)/publishconf.py
|
||||
|
||||
SSH_HOST=tardis.lithio.fr
|
||||
SSH_PORT=2222
|
||||
SSH_USER=rain
|
||||
SSH_TARGET_DIR=/data/1/home/rain/web/mindlair.fr
|
||||
|
||||
generate:
|
||||
$(PELICAN) "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)
|
||||
|
||||
clean:
|
||||
[ ! -d "$(OUTPUTDIR)" ] || rm -rf "$(OUTPUTDIR)"
|
||||
|
||||
regenerate:
|
||||
$(PELICAN) -r "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)
|
||||
|
||||
serve:
|
||||
$(PELICAN) -l "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)
|
||||
|
||||
serve-global:
|
||||
$(PELICAN) -l "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS) -b $(SERVER)
|
||||
|
||||
devserver:
|
||||
$(PELICAN) -lr "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)
|
||||
|
||||
devserver-global:
|
||||
$(PELICAN) -lr "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS) -b 0.0.0.0
|
||||
|
||||
build:
|
||||
zola build
|
||||
$(PELICAN) "$(INPUTDIR)" -o "$(PUBLISHDIR)" -s "$(PUBLISHCONF)" $(PELICANOPTS)
|
||||
|
||||
publish: build
|
||||
rsync -Prvzc --delete ${PUBLISH_DIR}/* "$(SSH_HOST):$(SSH_TARGET_DIR)"
|
||||
rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete --include tags --cvs-exclude "$(PUBLISHDIR)"/ "$(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)"
|
||||
|
||||
.PHONY: publish build
|
||||
.PHONY: generate clean regenerate serve serve-global devserver derserver-global build publish
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
+++
|
||||
title = "Bienvenu !"
|
||||
+++
|
||||
|
||||
|
||||
Bienvenu sur mon coin de l'Internet.
|
||||
|
||||
Je maintiens [mon blog](https://blog.mindlair.fr) et aussi un [Shaarli](https://links.mindlair.fr) pour partager mes lectures.
|
||||
|
||||
|
16
content/index.md
Normal file
16
content/index.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
title: Une tanière
|
||||
date: 2025-07-11
|
||||
save_as: index.html
|
||||
category:
|
||||
template: landing
|
||||
|
||||
Bienvenu sur Mindlair, ma tanière sur Internet, où j'amasse tout ce que je souhaite partager.
|
||||
|
||||
Touche à tout bonne à rien, je passe ma vie avec les gens et à filer des coups de main. Si je m'intéresse à mille choses, la politique occupe le plus clair de mon temps.
|
||||
|
||||
--
|
||||
|
||||
Bienvenu sur mon coin de l'Internet.
|
||||
|
||||
Je maintiens [mon blog](https://blog.mindlair.fr) et aussi un [Shaarli](https://links.mindlair.fr) pour partager mes lectures.
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
+++
|
||||
title = "contact"
|
||||
slug = "contact"
|
||||
+++
|
||||
title: Contact
|
||||
slug: contact
|
||||
date:2025-10-05
|
||||
status: published
|
||||
tags: contact
|
||||
|
||||
## Email
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
46
pelicanconf.py
Normal file
46
pelicanconf.py
Normal file
|
@ -0,0 +1,46 @@
|
|||
from datetime import datetime
|
||||
|
||||
AUTHOR = 'Irrlicht'
|
||||
SITENAME = 'Mindlair'
|
||||
SITEURL = ""
|
||||
PAGE_URL = "{slug}.html"
|
||||
PAGE_SAVE_AS = "{slug}.html"
|
||||
|
||||
CUSTOM_CSS = "/static/assets/css/custom.css"
|
||||
|
||||
PATH = "content"
|
||||
|
||||
STATIC_PATHS = ["static"]
|
||||
|
||||
TIMEZONE = 'Europe/Paris'
|
||||
NOW = datetime.now()
|
||||
|
||||
DEFAULT_LANG = 'fr'
|
||||
|
||||
# Feed generation is usually not desired when developing
|
||||
FEED_ALL_ATOM = None
|
||||
CATEGORY_FEED_ATOM = None
|
||||
TRANSLATION_FEED_ATOM = None
|
||||
AUTHOR_FEED_ATOM = None
|
||||
AUTHOR_FEED_RSS = None
|
||||
|
||||
DISPLAY_PAGES_ON_MENU = True
|
||||
|
||||
THEME="theme"
|
||||
|
||||
DEFAULT_PAGINATION = False
|
||||
|
||||
LINKS = [
|
||||
{
|
||||
"name": "Blog — Débordement contenu ",
|
||||
"description": "Mon blog, espace principal d'expression où je pose mes textes en tout genre",
|
||||
"url":"https://blog.mindlair.fr",
|
||||
"logo":"assets/images/blog_logo.svg"
|
||||
},
|
||||
{
|
||||
"name": "Shaarli — Liens",
|
||||
"description":"Partage de ressources variées : articles, podcasts, videos,…",
|
||||
"url":"https://links.mindlair.fr",
|
||||
"logo":"assets/images/bookmark.svg"
|
||||
}
|
||||
]
|
19
publishconf.py
Normal file
19
publishconf.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# This file is only used if you use `make publish` or
|
||||
# explicitly specify it as your config file.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append(os.curdir)
|
||||
from pelicanconf import *
|
||||
|
||||
PATH=publish
|
||||
|
||||
# If your site is available via HTTPS, make sure SITEURL begins with https://
|
||||
SITEURL = "https://mindlair.fr"
|
||||
RELATIVE_URLS = False
|
||||
|
||||
FEED_ALL_ATOM = "feeds/all.atom.xml"
|
||||
CATEGORY_FEED_ATOM = "feeds/{slug}.atom.xml"
|
||||
|
||||
DELETE_OUTPUT_DIRECTORY = True
|
|
@ -1,44 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
{% extends base.html %}
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Mindlair</title>
|
||||
<link rel="icon" href="/favicon.svg" sizes="16x16 32x32 48x48 192x192" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" type="image/svg+xml" sizes="60x60 72x72 76x76 114x114 120x120 144x144 152x152 167x167 180x180 1024x1024">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="author" content="Irrlicht">
|
||||
<meta property="og:locale" content="fr">
|
||||
<meta property="og:site_name" content="Mindlair">
|
||||
<meta property="og:title" content="Mindlair">
|
||||
{% block head_css %}
|
||||
{{ super() }}
|
||||
<link href="/assets/css/main.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="banner">
|
||||
<div class="banner-title">
|
||||
<span>MINDLAIR</span>
|
||||
</div>
|
||||
</header>
|
||||
<menu>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="/">accueil</a></li>
|
||||
<li><a href="contact">contact</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</menu>
|
||||
<div class="content">
|
||||
{% block content %} {% endblock content %}
|
||||
</div>
|
||||
<footer>
|
||||
<hr>
|
||||
<div class="left">
|
||||
{{ now() | date(format="%Y") }} — <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> — By Irrlicht
|
||||
</div>
|
||||
<div class="right">
|
||||
Généré avec <a href="https://getzola.org">Zola</a>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,32 +1,4 @@
|
|||
{% extends "base.html" %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
|
||||
{% block content %}
|
||||
<h1>A den</h1>
|
||||
|
||||
<p>
|
||||
Bienvenu sur Mindlair, ma tanière sur Internet, où j'amasse tout ce que je souhaite partager.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Touche à tout bonne à rien, je passe ma vie avec les gens et à filer des coups de main. Si je m'intéresse à mille choses, la politique occupe le plus clair de mon temps.
|
||||
</p>
|
||||
|
||||
<h2>Ce que j'édite</h2>
|
||||
|
||||
<div class="column">
|
||||
<div class="row">
|
||||
{% set links = load_data(path="content/links.json") %}
|
||||
{% for link in links %}
|
||||
<a class="card" href="{{ link.url }}" title="blog">
|
||||
<div class="description">
|
||||
<h3>{{ link.name }}</h3>
|
||||
<p>
|
||||
{{ link.description }}
|
||||
</p>
|
||||
</div>
|
||||
<img src="{{ get_url(path=link.logo) }}" class="logo">
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
3
todo.md
Normal file
3
todo.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
- Make index work as expected: should be flexible and display presentation of website and list of links. Not list of articles, this site isn't a blog, the blog is elsewhere.
|
||||
- make menu work as expected.
|
||||
- logo for links on landing page.
|
Loading…
Add table
Add a link
Reference in a new issue