Verified Commit 1897d080 authored by Georg Krause's avatar Georg Krause
Browse files

Make sure a default page is available in each language

parent e10a8e73
Pipeline #19169 passed with stages
in 5 minutes and 20 seconds
...@@ -46,6 +46,7 @@ help: ...@@ -46,6 +46,7 @@ help:
html: html:
"$(PELICAN)" "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS) "$(PELICAN)" "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)
./scripts/create_default_pages.sh
clean: clean:
[ ! -d "$(OUTPUTDIR)" ] || rm -rf "$(OUTPUTDIR)" [ ! -d "$(OUTPUTDIR)" ] || rm -rf "$(OUTPUTDIR)"
......
AUTHOR = "Funkwhale Collective" AUTHOR = "Funkwhale Collective"
SITENAME = "Funkwhale" SITENAME = "Funkwhale"
SITEURL = "http://localhost:8000" SITEURL = ""
PATH = "content" PATH = "content"
OUTPUT_PATH = "public/" OUTPUT_PATH = "public/"
...@@ -41,6 +41,11 @@ THEME = "theme" ...@@ -41,6 +41,11 @@ THEME = "theme"
PAGE_PATHS = [""] PAGE_PATHS = [""]
ARTICLE_PATHS = ["articles"] ARTICLE_PATHS = ["articles"]
PAGE_LANG_URL = "{slug}"
# We write all pages in their language and have a rule in the makefile to
# use the english one as fallback if there is no translated version for a
# language
PAGE_LANG_SAVE_AS = "{slug}/{lang}.html"
PAGE_URL = "{slug}" PAGE_URL = "{slug}"
PAGE_SAVE_AS = "{slug}/index.html" PAGE_SAVE_AS = "{slug}/index.html"
......
#!/bin/bash
for f in $(find public -name en.html); do
newfile=${f/en.html/index.html}
if [ ! -f "$newfile" ]; then
mv $f $newfile
fi
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment