feat: configure Forgejo static pages to publish site
This commit is contained in:
parent
5c43ac41cb
commit
ac2659cd3d
|
|
@ -0,0 +1,4 @@
|
|||
site_name: frog-collective.com
|
||||
build_command: nox -r -s build
|
||||
build_directory: build
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
Options -Indexes -MultiViews
|
||||
|
||||
# Rewrite urls depending on the Accept-Language header if present, except for
|
||||
# assets.
|
||||
RewriteEngine on
|
||||
|
||||
RewriteRule \.(css|js|jpg|png|gif|woff|woff2)$ - [NC,L]
|
||||
|
||||
RewriteCond %{HTTP:Accept-Language} ^(fr) [NC]
|
||||
RewriteCond %{REQUEST_URI} !^/(fr|en)/
|
||||
RewriteRule (.*) /fr/$1 [L,R=301]
|
||||
|
||||
RewriteCond %{REQUEST_URI} !^/(fr|en)/
|
||||
RewriteRule (.*) /en/$1 [L,R=301]
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
"""Nox configuration file."""
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
from shutil import copytree
|
||||
from shutil import copytree, copy
|
||||
|
||||
from nox import Session, session
|
||||
|
||||
|
|
@ -38,6 +38,7 @@ def build(session: Session) -> None:
|
|||
|
||||
session.log("Copying static files to build directory...")
|
||||
copytree("src/assets", "build", dirs_exist_ok=True)
|
||||
copy("config/.htaccess", "build")
|
||||
|
||||
with TemporaryDirectory() as locale_dir:
|
||||
for locale in _LOCALES:
|
||||
|
|
|
|||
Loading…
Reference in New Issue