Skip to content
Snippets Groups Projects
Commit 7a5853e4 authored by Éloïs's avatar Éloïs
Browse files

tmp: try ci pages

parent 38d3b006
No related branches found
No related tags found
No related merge requests found
Pipeline #9906 passed
image: python:3.7-alpine
pages:
stage: deploy
script:
- apk update && apk add make
- pip install -r requirements.txt
- make publish
artifacts:
paths:
- public/
only:
- master
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true
}
\ No newline at end of file
Makefile 0 → 100644
PY?=python3
PELICAN?=pelican
PELICANOPTS=
BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/public
CONFFILE=$(BASEDIR)/pelicanconf.py
PUBLISHCONF=$(BASEDIR)/publishconf.py
DEBUG ?= 0
ifeq ($(DEBUG), 1)
PELICANOPTS += -D
endif
RELATIVE ?= 0
ifeq ($(RELATIVE), 1)
PELICANOPTS += --relative-urls
endif
help:
@echo 'Makefile for a pelican Web site '
@echo ' '
@echo 'Usage: '
@echo ' make html (re)generate the web site '
@echo ' make clean remove the generated files '
@echo ' make regenerate regenerate files upon modification '
@echo ' make publish generate using production settings '
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
@echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 '
@echo ' make devserver [PORT=8000] serve and regenerate together '
@echo ' make ssh_upload upload the web site via SSH '
@echo ' make rsync_upload upload the web site via rsync+ssh '
@echo ' '
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html '
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
@echo ' '
html:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
clean:
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
regenerate:
$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
serve:
ifdef PORT
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT)
else
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
endif
serve-global:
ifdef SERVER
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b $(SERVER)
else
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b 0.0.0.0
endif
devserver:
ifdef PORT
$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT)
else
$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
endif
publish:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
.PHONY: html help clean regenerate serve serve-global devserver publish
...@@ -87,12 +87,12 @@ ...@@ -87,12 +87,12 @@
{% endif %} {% endif %}
{% if tag and TAG_FEED_ATOM %} {% if tag and TAG_FEED_ATOM %}
<link href="{{ SITEURL }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" type="application/atom+xml" rel="alternate" <link href="{{ SITEURL }}/{{ TAG_FEED_ATOM|format(slug=tag.slug) }}" type="application/atom+xml" rel="alternate"
title="{{ SITENAME }} {{ tag }} ATOM Feed"/> title="{{ SITENAME }} {{ tag }} ATOM Feed"/>
{% endif %} {% endif %}
{% if category and CATEGORY_FEED_ATOM %} {% if category and CATEGORY_FEED_ATOM %}
<link href="{{ SITEURL }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" type="application/atom+xml" rel="alternate" <link href="{{ SITEURL }}/{{ CATEGORY_FEED_ATOM|format(slug=category.slug) }}" type="application/atom+xml" rel="alternate"
title="{{ SITENAME }} {{ category }} ATOM Feed"/> title="{{ SITENAME }} {{ category }} ATOM Feed"/>
{% endif %} {% endif %}
......
...@@ -40,7 +40,9 @@ PYGMENTS_STYLE = 'default' ...@@ -40,7 +40,9 @@ PYGMENTS_STYLE = 'default'
PATH_METADATA = 'pages/(?P<path>.*)\..*' PATH_METADATA = 'pages/(?P<path>.*)\..*'
JINJA_EXTENSIONS = ['jinja2.ext.i18n'] JINJA_ENVIRONMENT = {
'extensions': ['jinja2.ext.i18n'],
}
I18N_SUBSITES = { I18N_SUBSITES = {
} }
......
...@@ -4,7 +4,7 @@ from __future__ import unicode_literals ...@@ -4,7 +4,7 @@ from __future__ import unicode_literals
# AUTHOR = u'Duniter' # AUTHOR = u'Duniter'
SITENAME = u'Duniter' SITENAME = u'Duniter'
SITEURL = u'https://duniter.org/en' SITEURL = u'https://librelois.duniter.io/website_en/'
PATH = 'content' PATH = 'content'
THEME = "pelican-themes/pelican-bootstrap3" THEME = "pelican-themes/pelican-bootstrap3"
...@@ -24,7 +24,8 @@ SITELOGO_SIZE = 36 ...@@ -24,7 +24,8 @@ SITELOGO_SIZE = 36
DEFAULT_LANG = u'fr' DEFAULT_LANG = u'fr'
PLUGIN_PATHS = ['pelican-plugins/'] PLUGIN_PATHS = ['pelican-plugins/']
PLUGINS = ['i18n_subsites', 'tipue_search', 'pelican-page-hierarchy', 'plantuml'] PLUGINS = ['i18n_subsites', 'tipue_search', 'pelican-page-hierarchy']
#PLUGINS = ['i18n_subsites', 'tipue_search', 'pelican-page-hierarchy, 'plantuml']
MARKDOWN = { MARKDOWN = {
'extension_configs': { 'extension_configs': {
...@@ -40,7 +41,9 @@ PYGMENTS_STYLE = 'default' ...@@ -40,7 +41,9 @@ PYGMENTS_STYLE = 'default'
PATH_METADATA = 'pages/(?P<path>.*)\..*' PATH_METADATA = 'pages/(?P<path>.*)\..*'
JINJA_EXTENSIONS = ['jinja2.ext.i18n'] JINJA_ENVIRONMENT = {
'extensions': ['jinja2.ext.i18n'],
}
I18N_SUBSITES = { I18N_SUBSITES = {
} }
...@@ -82,7 +85,7 @@ SOCIAL = (('Forum', 'https://forum.duniter.org', 'comment'), ...@@ -82,7 +85,7 @@ SOCIAL = (('Forum', 'https://forum.duniter.org', 'comment'),
('Gitlab', 'https://git.duniter.org/'), ('Gitlab', 'https://git.duniter.org/'),
('GitHub', 'https://github.com/duniter'), ('GitHub', 'https://github.com/duniter'),
('Diaspora', 'https://framasphere.org/people/1949ee70f6bc0134e6b32a0000053625', 'asterisk'), ('Diaspora', 'https://framasphere.org/people/1949ee70f6bc0134e6b32a0000053625', 'asterisk'),
('RSS', '/feeds/all.atom.xml'), #('RSS', '/feeds/all.atom.xml'),
('ğchange', 'https://www.gchange.fr', 'balance-scale'), ('ğchange', 'https://www.gchange.fr', 'balance-scale'),
('ğannonce', 'https://gannonce.duniter.org', 'bullhorn'),) ('ğannonce', 'https://gannonce.duniter.org', 'bullhorn'),)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment