fix: base path for github pages

This commit is contained in:
2025-02-07 16:33:37 +01:00
parent 7a3f8378c2
commit 3a00e7c680
3 changed files with 15 additions and 15 deletions

View File

@@ -12,7 +12,7 @@ const prod = process.env.NODE_ENV === 'production';
const sitedata = { const sitedata = {
site: { site: {
base: !prod ? 'http://localhost:3000' : 'https://lowtech-lab-grenoble.fr', basePath: !prod ? '' : '/ltg-grenoble',
subject: 'Low-tech Lab - Grenoble', subject: 'Low-tech Lab - Grenoble',
author: '© Low-tech Lab - Grenoble', author: '© Low-tech Lab - Grenoble',
contact: 'contact@lowtechlabgrenoble.org', contact: 'contact@lowtechlabgrenoble.org',

View File

@@ -6,23 +6,23 @@
<meta name="description" content="{{ description }}"> <meta name="description" content="{{ description }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ site.subject }} &mdash; {{ title }}</title> <title>{{ site.subject }} &mdash; {{ title }}</title>
<link rel="preload" href="/assets/css/reset.css" as="style" onload="this.onload=null;this.rel='stylesheet'"> <link rel="preload" href="{{ site.basePath }}/assets/css/reset.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="preload" href="/assets/css/theme.css" as="style" onload="this.onload=null;this.rel='stylesheet'"> <link rel="preload" href="{{ site.basePath }}/assets/css/theme.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="preload" href="/assets/css/helpers.css" as="style" onload="this.onload=null;this.rel='stylesheet'"> <link rel="preload" href="{{ site.basePath }}/assets/css/helpers.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="stylesheet" href="/assets/css/main.css"> <link rel="stylesheet" href="{{ site.basePath }}/assets/css/main.css">
<link rel="stylesheet" href="/assets/css/typography.css"> <link rel="stylesheet" href="{{ site.basePath }}/assets/css/typography.css">
<link rel="stylesheet" href="/assets/css/header.css"> <link rel="stylesheet" href="{{ site.basePath }}/assets/css/header.css">
<link rel="stylesheet" href="/assets/css/footer.css"> <link rel="stylesheet" href="{{ site.basePath }}/assets/css/footer.css">
<noscript> <noscript>
<link rel="stylesheet" href="/assets/css/reset.css"> <link rel="stylesheet" href="{{ site.basePath }}/assets/css/reset.css">
<link rel="stylesheet" href="/assets/css/theme.css"> <link rel="stylesheet" href="{{ site.basePath }}/assets/css/theme.css">
<link rel="stylesheet" href="/assets/css/helpers.css"> <link rel="stylesheet" href="{{ site.basePath }}/assets/css/helpers.css">
</noscript> </noscript>
</head> </head>
<body id="top"> <body id="top">
<header> <header>
<img src="/assets/images/brand.jpg" alt="Logo du {{ site.subject }}" /> <img src="{{ site.basePath }}/assets/images/brand.jpg" alt="Logo du {{ site.subject }}" />
<nav> <nav>
{{#each collections.nav}} {{#each collections.nav}}
<a href="{{ this.path }}">{{ this.title }}</a> <a href="{{ this.path }}">{{ this.title }}</a>
@@ -75,8 +75,8 @@
</div> </div>
</footer> </footer>
<script src="/assets/scripts/theme-toggle.js" async defer ></script> <script src="{{ site.basePath }}/assets/scripts/theme-toggle.js" async defer ></script>
<script src="/assets/scripts/page-size.js" async defer ></script> <script src="{{ site.basePath }}/assets/scripts/page-size.js" async defer ></script>
</body> </body>
</html> </html>

View File

@@ -3,7 +3,7 @@ title: Accueil
nav_order: 0 nav_order: 0
--- ---
![Photo de l'équipe ?](/assets/images/team.jpg) ![Photo de l'équipe ?]({{site.basePath}}/assets/images/team.jpg)
# Présentation de l'asso # Présentation de l'asso