Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
funkwhale
funkwhale.audio
Commits
1897d080
Verified
Commit
1897d080
authored
Feb 14, 2022
by
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
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
1897d080
...
...
@@ -46,6 +46,7 @@ help:
html
:
"
$(PELICAN)
"
"
$(INPUTDIR)
"
-o
"
$(OUTPUTDIR)
"
-s
"
$(CONFFILE)
"
$(PELICANOPTS)
./scripts/create_default_pages.sh
clean
:
[
!
-d
"
$(OUTPUTDIR)
"
]
||
rm
-rf
"
$(OUTPUTDIR)
"
...
...
pelicanconf.py
View file @
1897d080
AUTHOR
=
"Funkwhale Collective"
SITENAME
=
"Funkwhale"
SITEURL
=
"
http://localhost:8000
"
SITEURL
=
""
PATH
=
"content"
OUTPUT_PATH
=
"public/"
...
...
@@ -41,6 +41,11 @@ THEME = "theme"
PAGE_PATHS
=
[
""
]
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_SAVE_AS
=
"{slug}/index.html"
...
...
scripts/create_default_pages.sh
0 → 100755
View file @
1897d080
#!/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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment