diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 0ae1308..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,15 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "weekly" - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "weekly" diff --git a/.vite/deps_temp_3bdf9138/package.json b/.vite/deps_temp_3bdf9138/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/.vite/deps_temp_3bdf9138/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/content/templates/jinja/blocks/footer.en.html b/common-content/templates/jinja2/blocks/footer.en.html similarity index 89% rename from content/templates/jinja/blocks/footer.en.html rename to common-content/templates/jinja2/blocks/footer.en.html index 06ce3aa..4fe0e1f 100644 --- a/content/templates/jinja/blocks/footer.en.html +++ b/common-content/templates/jinja2/blocks/footer.en.html @@ -18,10 +18,10 @@ Home
- Comme nombre d'entre vous, j'ai constaté une dégradation progressive de la qualité des services e-mail et une augmentation des tarifs. -
-- Cette conjoncture et les projets que nous menons avec algoo - pour le compte de nos clients m'ont décidé à lancer un service e-mail conforme aux standards, - s'appuyant exclusivement sur des logiciels libres et évidemment respectueux - des données des utilisateurs. -
-- Lorsque je les ai interrogés, les clients m'ont demandé : -
-- Nous avons construit le service avec l'équipe, avec la communauté, avec nos clients, pour nos clients. -
-- Et ça continuera d'être ainsi. -
-- Décrié, le mail reste la colonne vertébrale de la majorité des systèmes d'informations. - - Nous — algoo — sommes là pour vous accompagner dans cette aventure avec notre service de - Gestion - Autonome et - Libre - d'Adresses - Email. -
-
-
Vous pouvez aussi
- nous envoyer un e-mail
- ou nous appeler au +33 (0)9.72.49.72.20
-
Go to page 2
+Go to page 2
diff --git a/content/templates/django/blocks/footer.en.html b/content/templates/django/blocks/footer.en.html index 21a767b..7c279bf 100644 --- a/content/templates/django/blocks/footer.en.html +++ b/content/templates/django/blocks/footer.en.html @@ -21,7 +21,7 @@ Customer testimonials (FR)Go to page 1
+Go to page 1
diff --git a/content/static/assets/docs/galae_price_list.pdf b/galae-content/static/assets/docs/galae_price_list.pdf similarity index 100% rename from content/static/assets/docs/galae_price_list.pdf rename to galae-content/static/assets/docs/galae_price_list.pdf diff --git a/content/static/assets/docs/galae_price_list_en.odt b/galae-content/static/assets/docs/galae_price_list_en.odt similarity index 100% rename from content/static/assets/docs/galae_price_list_en.odt rename to galae-content/static/assets/docs/galae_price_list_en.odt diff --git a/content/static/assets/docs/grille_tarifaire_galae.pdf b/galae-content/static/assets/docs/grille_tarifaire_galae.pdf similarity index 100% rename from content/static/assets/docs/grille_tarifaire_galae.pdf rename to galae-content/static/assets/docs/grille_tarifaire_galae.pdf diff --git a/content/static/assets/docs/grille_tarifaire_galae_fr.odt b/galae-content/static/assets/docs/grille_tarifaire_galae_fr.odt similarity index 100% rename from content/static/assets/docs/grille_tarifaire_galae_fr.odt rename to galae-content/static/assets/docs/grille_tarifaire_galae_fr.odt diff --git a/content/static/assets/favicon.ico b/galae-content/static/assets/favicon.ico similarity index 100% rename from content/static/assets/favicon.ico rename to galae-content/static/assets/favicon.ico diff --git a/content/static/assets/fonts/Raleway-Italic-VariableFont_wght.ttf b/galae-content/static/assets/fonts/Raleway-Italic-VariableFont_wght.ttf similarity index 100% rename from content/static/assets/fonts/Raleway-Italic-VariableFont_wght.ttf rename to galae-content/static/assets/fonts/Raleway-Italic-VariableFont_wght.ttf diff --git a/content/static/assets/fonts/Raleway-VariableFont_wght.ttf b/galae-content/static/assets/fonts/Raleway-VariableFont_wght.ttf similarity index 100% rename from content/static/assets/fonts/Raleway-VariableFont_wght.ttf rename to galae-content/static/assets/fonts/Raleway-VariableFont_wght.ttf diff --git a/content/static/assets/fonts/bootstrap-icons.css b/galae-content/static/assets/fonts/bootstrap-icons.css similarity index 100% rename from content/static/assets/fonts/bootstrap-icons.css rename to galae-content/static/assets/fonts/bootstrap-icons.css diff --git a/content/static/assets/fonts/bootstrap-icons.woff b/galae-content/static/assets/fonts/bootstrap-icons.woff similarity index 100% rename from content/static/assets/fonts/bootstrap-icons.woff rename to galae-content/static/assets/fonts/bootstrap-icons.woff diff --git a/content/static/assets/fonts/bootstrap-icons.woff2 b/galae-content/static/assets/fonts/bootstrap-icons.woff2 similarity index 100% rename from content/static/assets/fonts/bootstrap-icons.woff2 rename to galae-content/static/assets/fonts/bootstrap-icons.woff2 diff --git a/content/static/assets/galae.ico b/galae-content/static/assets/galae.ico similarity index 100% rename from content/static/assets/galae.ico rename to galae-content/static/assets/galae.ico diff --git a/content/static/assets/img/damien-accorsi-algoo-galae.jpg b/galae-content/static/assets/img/damien-accorsi-algoo-galae.jpg similarity index 100% rename from content/static/assets/img/damien-accorsi-algoo-galae.jpg rename to galae-content/static/assets/img/damien-accorsi-algoo-galae.jpg diff --git a/content/static/assets/img/galae_logo.png b/galae-content/static/assets/img/galae_logo.png similarity index 100% rename from content/static/assets/img/galae_logo.png rename to galae-content/static/assets/img/galae_logo.png diff --git a/content/static/assets/img/galae_price_list_en.png b/galae-content/static/assets/img/galae_price_list_en.png similarity index 100% rename from content/static/assets/img/galae_price_list_en.png rename to galae-content/static/assets/img/galae_price_list_en.png diff --git a/content/static/assets/img/grille_tarifaire_galae_fr.png b/galae-content/static/assets/img/grille_tarifaire_galae_fr.png similarity index 100% rename from content/static/assets/img/grille_tarifaire_galae_fr.png rename to galae-content/static/assets/img/grille_tarifaire_galae_fr.png diff --git a/content/static/assets/img/lang-fr.svg b/galae-content/static/assets/img/lang-fr.svg similarity index 100% rename from content/static/assets/img/lang-fr.svg rename to galae-content/static/assets/img/lang-fr.svg diff --git a/content/static/assets/img/lang-gb.svg b/galae-content/static/assets/img/lang-gb.svg similarity index 100% rename from content/static/assets/img/lang-gb.svg rename to galae-content/static/assets/img/lang-gb.svg diff --git a/content/static/assets/img/liquid-cheese.svg b/galae-content/static/assets/img/liquid-cheese.svg similarity index 100% rename from content/static/assets/img/liquid-cheese.svg rename to galae-content/static/assets/img/liquid-cheese.svg diff --git a/content/static/assets/img/references/15-09-consulting.webp b/galae-content/static/assets/img/references/15-09-consulting.webp similarity index 100% rename from content/static/assets/img/references/15-09-consulting.webp rename to galae-content/static/assets/img/references/15-09-consulting.webp diff --git a/content/static/assets/img/references/apeiron-technology.webp b/galae-content/static/assets/img/references/apeiron-technology.webp similarity index 100% rename from content/static/assets/img/references/apeiron-technology.webp rename to galae-content/static/assets/img/references/apeiron-technology.webp diff --git a/content/static/assets/img/references/arundo-tech.webp b/galae-content/static/assets/img/references/arundo-tech.webp similarity index 100% rename from content/static/assets/img/references/arundo-tech.webp rename to galae-content/static/assets/img/references/arundo-tech.webp diff --git a/content/static/assets/img/references/association-la-granja.webp b/galae-content/static/assets/img/references/association-la-granja.webp similarity index 100% rename from content/static/assets/img/references/association-la-granja.webp rename to galae-content/static/assets/img/references/association-la-granja.webp diff --git a/content/static/assets/img/references/association-tostaky.webp b/galae-content/static/assets/img/references/association-tostaky.webp similarity index 100% rename from content/static/assets/img/references/association-tostaky.webp rename to galae-content/static/assets/img/references/association-tostaky.webp diff --git a/content/static/assets/img/references/astrolabe-cae.webp b/galae-content/static/assets/img/references/astrolabe-cae.webp similarity index 100% rename from content/static/assets/img/references/astrolabe-cae.webp rename to galae-content/static/assets/img/references/astrolabe-cae.webp diff --git a/content/static/assets/img/references/asvola.webp b/galae-content/static/assets/img/references/asvola.webp similarity index 100% rename from content/static/assets/img/references/asvola.webp rename to galae-content/static/assets/img/references/asvola.webp diff --git a/content/static/assets/img/references/back2data.webp b/galae-content/static/assets/img/references/back2data.webp similarity index 100% rename from content/static/assets/img/references/back2data.webp rename to galae-content/static/assets/img/references/back2data.webp diff --git a/content/static/assets/img/references/bag-era.webp b/galae-content/static/assets/img/references/bag-era.webp similarity index 100% rename from content/static/assets/img/references/bag-era.webp rename to galae-content/static/assets/img/references/bag-era.webp diff --git a/content/static/assets/img/references/cositrex.webp b/galae-content/static/assets/img/references/cositrex.webp similarity index 100% rename from content/static/assets/img/references/cositrex.webp rename to galae-content/static/assets/img/references/cositrex.webp diff --git a/content/static/assets/img/references/dembell.webp b/galae-content/static/assets/img/references/dembell.webp similarity index 100% rename from content/static/assets/img/references/dembell.webp rename to galae-content/static/assets/img/references/dembell.webp diff --git a/content/static/assets/img/references/domeo-conseils.webp b/galae-content/static/assets/img/references/domeo-conseils.webp similarity index 100% rename from content/static/assets/img/references/domeo-conseils.webp rename to galae-content/static/assets/img/references/domeo-conseils.webp diff --git a/content/static/assets/img/references/ecohameau-du-plessis.webp b/galae-content/static/assets/img/references/ecohameau-du-plessis.webp similarity index 100% rename from content/static/assets/img/references/ecohameau-du-plessis.webp rename to galae-content/static/assets/img/references/ecohameau-du-plessis.webp diff --git a/content/static/assets/img/references/educat.webp b/galae-content/static/assets/img/references/educat.webp similarity index 100% rename from content/static/assets/img/references/educat.webp rename to galae-content/static/assets/img/references/educat.webp diff --git a/content/static/assets/img/references/elycoop.webp b/galae-content/static/assets/img/references/elycoop.webp similarity index 100% rename from content/static/assets/img/references/elycoop.webp rename to galae-content/static/assets/img/references/elycoop.webp diff --git a/content/static/assets/img/references/ethicsys.webp b/galae-content/static/assets/img/references/ethicsys.webp similarity index 100% rename from content/static/assets/img/references/ethicsys.webp rename to galae-content/static/assets/img/references/ethicsys.webp diff --git a/content/static/assets/img/references/fc_home.webp b/galae-content/static/assets/img/references/fc_home.webp similarity index 100% rename from content/static/assets/img/references/fc_home.webp rename to galae-content/static/assets/img/references/fc_home.webp diff --git a/content/static/assets/img/references/keyox.webp b/galae-content/static/assets/img/references/keyox.webp similarity index 100% rename from content/static/assets/img/references/keyox.webp rename to galae-content/static/assets/img/references/keyox.webp diff --git a/content/static/assets/img/references/la-bataille-du-libre.webp b/galae-content/static/assets/img/references/la-bataille-du-libre.webp similarity index 100% rename from content/static/assets/img/references/la-bataille-du-libre.webp rename to galae-content/static/assets/img/references/la-bataille-du-libre.webp diff --git a/content/static/assets/img/references/le-mignon.webp b/galae-content/static/assets/img/references/le-mignon.webp similarity index 100% rename from content/static/assets/img/references/le-mignon.webp rename to galae-content/static/assets/img/references/le-mignon.webp diff --git a/content/static/assets/img/references/les-paysans-du-bocage.webp b/galae-content/static/assets/img/references/les-paysans-du-bocage.webp similarity index 100% rename from content/static/assets/img/references/les-paysans-du-bocage.webp rename to galae-content/static/assets/img/references/les-paysans-du-bocage.webp diff --git a/content/static/assets/img/references/manajet.webp b/galae-content/static/assets/img/references/manajet.webp similarity index 100% rename from content/static/assets/img/references/manajet.webp rename to galae-content/static/assets/img/references/manajet.webp diff --git a/content/static/assets/img/references/narm-pc.svg b/galae-content/static/assets/img/references/narm-pc.svg similarity index 100% rename from content/static/assets/img/references/narm-pc.svg rename to galae-content/static/assets/img/references/narm-pc.svg diff --git a/content/static/assets/img/references/oslandia.webp b/galae-content/static/assets/img/references/oslandia.webp similarity index 100% rename from content/static/assets/img/references/oslandia.webp rename to galae-content/static/assets/img/references/oslandia.webp diff --git a/content/static/assets/img/references/paquerette.webp b/galae-content/static/assets/img/references/paquerette.webp similarity index 100% rename from content/static/assets/img/references/paquerette.webp rename to galae-content/static/assets/img/references/paquerette.webp diff --git a/content/static/assets/img/references/pixngraph.webp b/galae-content/static/assets/img/references/pixngraph.webp similarity index 100% rename from content/static/assets/img/references/pixngraph.webp rename to galae-content/static/assets/img/references/pixngraph.webp diff --git a/content/static/assets/img/references/sempiternelia-humanites-numeriques.webp b/galae-content/static/assets/img/references/sempiternelia-humanites-numeriques.webp similarity index 100% rename from content/static/assets/img/references/sempiternelia-humanites-numeriques.webp rename to galae-content/static/assets/img/references/sempiternelia-humanites-numeriques.webp diff --git a/content/static/assets/img/references/spirale-coop.webp b/galae-content/static/assets/img/references/spirale-coop.webp similarity index 100% rename from content/static/assets/img/references/spirale-coop.webp rename to galae-content/static/assets/img/references/spirale-coop.webp diff --git a/content/static/assets/img/references/tele-mille-vaches.webp b/galae-content/static/assets/img/references/tele-mille-vaches.webp similarity index 100% rename from content/static/assets/img/references/tele-mille-vaches.webp rename to galae-content/static/assets/img/references/tele-mille-vaches.webp diff --git a/content/static/assets/img/references/ville-ayn.webp b/galae-content/static/assets/img/references/ville-ayn.webp similarity index 100% rename from content/static/assets/img/references/ville-ayn.webp rename to galae-content/static/assets/img/references/ville-ayn.webp diff --git a/content/static/assets/img/references/ville-dullin.webp b/galae-content/static/assets/img/references/ville-dullin.webp similarity index 100% rename from content/static/assets/img/references/ville-dullin.webp rename to galae-content/static/assets/img/references/ville-dullin.webp diff --git a/content/static/assets/img/testimonials-1.jpg b/galae-content/static/assets/img/testimonials-1.jpg similarity index 100% rename from content/static/assets/img/testimonials-1.jpg rename to galae-content/static/assets/img/testimonials-1.jpg diff --git a/content/static/assets/img/testimonials-2.jpg b/galae-content/static/assets/img/testimonials-2.jpg similarity index 100% rename from content/static/assets/img/testimonials-2.jpg rename to galae-content/static/assets/img/testimonials-2.jpg diff --git a/content/static/assets/img/testimonials-3.jpg b/galae-content/static/assets/img/testimonials-3.jpg similarity index 100% rename from content/static/assets/img/testimonials-3.jpg rename to galae-content/static/assets/img/testimonials-3.jpg diff --git a/content/static/assets/img/testimonials/court-bouillon--lucie-anglade.webp b/galae-content/static/assets/img/testimonials/court-bouillon--lucie-anglade.webp similarity index 100% rename from content/static/assets/img/testimonials/court-bouillon--lucie-anglade.webp rename to galae-content/static/assets/img/testimonials/court-bouillon--lucie-anglade.webp diff --git a/content/static/assets/img/testimonials/court-bouillon.webp b/galae-content/static/assets/img/testimonials/court-bouillon.webp similarity index 100% rename from content/static/assets/img/testimonials/court-bouillon.webp rename to galae-content/static/assets/img/testimonials/court-bouillon.webp diff --git a/content/static/assets/img/testimonials/ecohameau-du-plessis--mathieu-labonne.webp b/galae-content/static/assets/img/testimonials/ecohameau-du-plessis--mathieu-labonne.webp similarity index 100% rename from content/static/assets/img/testimonials/ecohameau-du-plessis--mathieu-labonne.webp rename to galae-content/static/assets/img/testimonials/ecohameau-du-plessis--mathieu-labonne.webp diff --git a/content/static/assets/img/testimonials/educ-at--dominique-hebert.webp b/galae-content/static/assets/img/testimonials/educ-at--dominique-hebert.webp similarity index 100% rename from content/static/assets/img/testimonials/educ-at--dominique-hebert.webp rename to galae-content/static/assets/img/testimonials/educ-at--dominique-hebert.webp diff --git a/content/static/assets/img/testimonials/f-tech-assistance--frederic-rosain.webp b/galae-content/static/assets/img/testimonials/f-tech-assistance--frederic-rosain.webp similarity index 100% rename from content/static/assets/img/testimonials/f-tech-assistance--frederic-rosain.webp rename to galae-content/static/assets/img/testimonials/f-tech-assistance--frederic-rosain.webp diff --git a/content/static/assets/img/testimonials/kevin-guerin.webp b/galae-content/static/assets/img/testimonials/kevin-guerin.webp similarity index 100% rename from content/static/assets/img/testimonials/kevin-guerin.webp rename to galae-content/static/assets/img/testimonials/kevin-guerin.webp diff --git a/content/static/assets/img/undraw_experts_re_i40h.svg b/galae-content/static/assets/img/undraw_experts_re_i40h.svg similarity index 100% rename from content/static/assets/img/undraw_experts_re_i40h.svg rename to galae-content/static/assets/img/undraw_experts_re_i40h.svg diff --git a/content/static/assets/img/undraw_futuristic_interface_re_0cm6.svg b/galae-content/static/assets/img/undraw_futuristic_interface_re_0cm6.svg similarity index 100% rename from content/static/assets/img/undraw_futuristic_interface_re_0cm6.svg rename to galae-content/static/assets/img/undraw_futuristic_interface_re_0cm6.svg diff --git a/content/static/assets/img/undraw_relaxation_re_ohkx.svg b/galae-content/static/assets/img/undraw_relaxation_re_ohkx.svg similarity index 100% rename from content/static/assets/img/undraw_relaxation_re_ohkx.svg rename to galae-content/static/assets/img/undraw_relaxation_re_ohkx.svg diff --git a/content/static/assets/logo-galae.svg b/galae-content/static/assets/logo-galae.svg similarity index 100% rename from content/static/assets/logo-galae.svg rename to galae-content/static/assets/logo-galae.svg diff --git a/content/static/css/custom.css b/galae-content/static/css/custom.css similarity index 100% rename from content/static/css/custom.css rename to galae-content/static/css/custom.css diff --git a/content/static/css/fonts.css b/galae-content/static/css/fonts.css similarity index 100% rename from content/static/css/fonts.css rename to galae-content/static/css/fonts.css diff --git a/content/static/css/styles.css b/galae-content/static/css/styles.css similarity index 100% rename from content/static/css/styles.css rename to galae-content/static/css/styles.css diff --git a/content/static/js/bootstrap.bundle.min.js b/galae-content/static/js/bootstrap.bundle.min.js similarity index 100% rename from content/static/js/bootstrap.bundle.min.js rename to galae-content/static/js/bootstrap.bundle.min.js diff --git a/content/static/js/scripts.js b/galae-content/static/js/scripts.js similarity index 100% rename from content/static/js/scripts.js rename to galae-content/static/js/scripts.js diff --git a/content/static/pygments/monokai.css b/galae-content/static/pygments/monokai.css similarity index 100% rename from content/static/pygments/monokai.css rename to galae-content/static/pygments/monokai.css diff --git a/jssg/jinja2.py b/jssg/jinja2.py index 417f32e..131072f 100644 --- a/jssg/jinja2.py +++ b/jssg/jinja2.py @@ -5,12 +5,24 @@ from jssg.templatetags.filter_opengraph_metadata import filter_opengraph_metadata +from jssg.models import Document +from django.conf import settings + +def url_from_slug(view_name, slug) : + for path in settings.JSSG_PAGES_DIR : + files = path.rglob("*.md") + for f in files : + doc = Document.load(f) + if doc.metadata["slug"] == slug : + return "/" / doc.path.relative_to(path).with_suffix('.html').parent / (doc.metadata["slug"] + ".html") + def environment(**options): env = Environment(**options) env.globals.update( { "static": static, "url": reverse, + "url_slug": url_from_slug, } ) env.filters.update( diff --git a/jssg/models.py b/jssg/models.py index 9c9d037..215661f 100644 --- a/jssg/models.py +++ b/jssg/models.py @@ -18,7 +18,7 @@ import typing from io import StringIO from pathlib import Path -from typing import Iterator, Mapping, Optional +from typing import Iterator, Mapping, Optional, List import markdown2 from django.conf import settings @@ -197,7 +197,7 @@ def load(cls, path: Path) -> "Document": @classmethod def load_glob( - cls, path: Optional[Path] = None, glob: str = "*.md" + cls, path: Optional[List[Path]] = None, dir = "", glob: str = "*.md", all=False ) -> Iterator["Document"]: """Load multiple document. @@ -210,8 +210,15 @@ def load_glob( if path is None: raise RuntimeError("No path and no self.BASE_DIR defined") - - return map(cls.load, path.glob(glob)) + + files = [] + for p in path : + if all : + files += (p / dir).rglob(glob) + else : + files += (p / dir).glob(glob) + print(files) + return map(cls.load, files) class Page(Document): @@ -232,16 +239,23 @@ def __init__(self, content: str, **metadata) -> None: except KeyError: self.slug = slugify(self.title) + p = self.path + while (p not in self.BASE_DIR) : + p = p.parent + self.dir = str(self.path.relative_to(p).parent) + if self.dir == '.' : + self.dir = '' + @classmethod - def load_page_with_slug(cls, slug: str) -> "Page": - return next(filter(lambda p: p.slug == slug, cls.load_glob())) + def load_page_with_slug(cls, slug: str, dir : str) -> "Page": + return next(filter(lambda p: p.slug == slug, cls.load_glob(dir = dir))) @classmethod def load_glob( - cls, path: Optional[Path] = None, glob: str = "*.md" + cls, path: Optional[List[Path]] = None, dir = "", glob: str = "*.md", all = False ) -> Iterator["Page"]: """Overridden only to make the static typing happy.""" - return super().load_glob(path, glob) + return super().load_glob(path, dir, glob, all) class Post(Page): @@ -258,9 +272,16 @@ def __init__(self, content: str, **metadata) -> None: super().__init__(content, **metadata) self.timestamp = datetime.datetime.fromisoformat(metadata["date"]) + p = self.path + while (p not in self.BASE_DIR) : + p = p.parent + self.dir = str(self.path.relative_to(p).parent) + if self.dir == '.' : + self.dir = '' + @classmethod def load_glob( - cls, path: Optional[Path] = None, glob: str = "*.md" + cls, path: Optional[List[Path]] = None, dir = "", glob: str = "*.md", all = False ) -> Iterator["Post"]: """Overridden only to make the static typing happy.""" - return super().load_glob(path, glob) + return super().load_glob(path, dir, glob, all) diff --git a/jssg/settings.py b/jssg/settings.py index 5791d61..2c18781 100644 --- a/jssg/settings.py +++ b/jssg/settings.py @@ -43,11 +43,13 @@ # JSSG -JSSG_CONTENT_DIR = BASE_DIR / "content" -JSSG_PAGES_DIR = JSSG_CONTENT_DIR / "pages" -JSSG_POSTS_DIR = JSSG_CONTENT_DIR / "posts" -JSSG_TEMPLATES_DIR = JSSG_CONTENT_DIR / "templates" -JSSG_STATIC_DIR = JSSG_CONTENT_DIR / "static" +JSSG_CONTENT_DIR = [BASE_DIR / "content"] + [Path.home() / "algoo" / "jssg" / "galae-content"] + [Path.home() / "algoo" / "jssg" / "common-content"] +JSSG_PAGES_DIR = [path / "pages" for path in JSSG_CONTENT_DIR] +JSSG_POSTS_DIR = [path / "posts" for path in JSSG_CONTENT_DIR] +JSSG_TEMPLATES_DIR = [path / "templates" for path in JSSG_CONTENT_DIR] +JSSG_STATIC_DIR = [path / "static" for path in JSSG_CONTENT_DIR] + + # Application definition @@ -71,7 +73,7 @@ TEMPLATES = [ { "BACKEND": "django.template.backends.jinja2.Jinja2", - "DIRS": [JSSG_TEMPLATES_DIR / "jinja"], + "DIRS": [path / "jinja2" for path in JSSG_TEMPLATES_DIR], "APP_DIRS": True, "OPTIONS": { "environment": "jssg.jinja2.environment" @@ -79,7 +81,7 @@ }, { "BACKEND": "django.template.backends.django.DjangoTemplates", - "DIRS": [JSSG_TEMPLATES_DIR / "django"], + "DIRS": [path / "django" for path in JSSG_TEMPLATES_DIR], "APP_DIRS": True, "OPTIONS": { "context_processors": [ @@ -136,7 +138,7 @@ DIST_DIR = BASE_DIR / "dist" STATIC_ROOT = BASE_DIR / "static" -STATICFILES_DIRS = [JSSG_STATIC_DIR] +STATICFILES_DIRS = JSSG_STATIC_DIR # Default primary key field type # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field diff --git a/jssg/urls.py b/jssg/urls.py index 98032f3..bc957e1 100644 --- a/jssg/urls.py +++ b/jssg/urls.py @@ -12,35 +12,36 @@ # # You should have received a copy of the GNU General Public License along with # this program. If not, see