Revert "feat: servir les images via le CDN BunnyCDN"
This reverts commit 58dd9297e0.
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
const cdn = require("./src/_data/cdn.json");
|
|
||||||
|
|
||||||
module.exports = function(eleventyConfig) {
|
module.exports = function(eleventyConfig) {
|
||||||
// Locale-aware content: `t` resolves to the content bundle for the page's locale (fr by default)
|
// Locale-aware content: `t` resolves to the content bundle for the page's locale (fr by default)
|
||||||
eleventyConfig.addGlobalData("eleventyComputed", {
|
eleventyConfig.addGlobalData("eleventyComputed", {
|
||||||
@@ -7,12 +5,6 @@ module.exports = function(eleventyConfig) {
|
|||||||
t: (data) => data.i18n[data.locale || "fr"]
|
t: (data) => data.i18n[data.locale || "fr"]
|
||||||
});
|
});
|
||||||
|
|
||||||
// Serve local images through the BunnyCDN pull zone; leaves external URLs untouched
|
|
||||||
eleventyConfig.addFilter("cdn", (path) => {
|
|
||||||
if (typeof path !== "string" || !path.startsWith("/")) return path;
|
|
||||||
return cdn.url + path;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Copy assets folders to output
|
// Copy assets folders to output
|
||||||
eleventyConfig.addPassthroughCopy("src/assets");
|
eleventyConfig.addPassthroughCopy("src/assets");
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "https://organisationka.b-cdn.net"
|
|
||||||
}
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<meta property="og:url" content="https://o-k-i.net{{ page.url or '/' }}">
|
<meta property="og:url" content="https://o-k-i.net{{ page.url or '/' }}">
|
||||||
<meta property="og:title" content="{% if title %}{{ title }}{% else %}{{ t.site.name }} - {{ t.site.og_tagline }}{% endif %}">
|
<meta property="og:title" content="{% if title %}{{ title }}{% else %}{{ t.site.name }} - {{ t.site.og_tagline }}{% endif %}">
|
||||||
<meta property="og:description" content="{{ description or t.site.description }}">
|
<meta property="og:description" content="{{ description or t.site.description }}">
|
||||||
<meta property="og:image" content="{{ '/assets/images/logo-512x512.png' | cdn }}">
|
<meta property="og:image" content="https://o-k-i.net/assets/images/logo-512x512.png">
|
||||||
<meta property="og:image:width" content="512">
|
<meta property="og:image:width" content="512">
|
||||||
<meta property="og:image:height" content="512">
|
<meta property="og:image:height" content="512">
|
||||||
<meta property="og:image:alt" content="Logo {{ t.site.name }}">
|
<meta property="og:image:alt" content="Logo {{ t.site.name }}">
|
||||||
@@ -35,13 +35,13 @@
|
|||||||
<meta name="twitter:url" content="https://o-k-i.net{{ page.url or '/' }}">
|
<meta name="twitter:url" content="https://o-k-i.net{{ page.url or '/' }}">
|
||||||
<meta name="twitter:title" content="{% if title %}{{ title }}{% else %}{{ t.site.name }} - {{ t.site.og_tagline }}{% endif %}">
|
<meta name="twitter:title" content="{% if title %}{{ title }}{% else %}{{ t.site.name }} - {{ t.site.og_tagline }}{% endif %}">
|
||||||
<meta name="twitter:description" content="{{ description or t.site.description }}">
|
<meta name="twitter:description" content="{{ description or t.site.description }}">
|
||||||
<meta name="twitter:image" content="{{ '/assets/images/logo-512x512.png' | cdn }}">
|
<meta name="twitter:image" content="https://o-k-i.net/assets/images/logo-512x512.png">
|
||||||
<meta name="twitter:image:alt" content="Logo {{ t.site.name }}">
|
<meta name="twitter:image:alt" content="Logo {{ t.site.name }}">
|
||||||
|
|
||||||
<!-- Favicons -->
|
<!-- Favicons -->
|
||||||
<link rel="icon" type="image/x-icon" href="{{ '/assets/images/favicon.ico' | cdn }}">
|
<link rel="icon" type="image/x-icon" href="/assets/images/favicon.ico">
|
||||||
<link rel="icon" type="image/png" sizes="512x512" href="{{ '/assets/images/logo-512x512.png' | cdn }}">
|
<link rel="icon" type="image/png" sizes="512x512" href="/assets/images/logo-512x512.png">
|
||||||
<link rel="apple-touch-icon" href="{{ '/assets/images/logo-512x512.png' | cdn }}">
|
<link rel="apple-touch-icon" href="/assets/images/logo-512x512.png">
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
"name": "{{ t.site.name }}",
|
"name": "{{ t.site.name }}",
|
||||||
"alternateName": "{{ t.site.shortName }}",
|
"alternateName": "{{ t.site.shortName }}",
|
||||||
"url": "https://o-k-i.net",
|
"url": "https://o-k-i.net",
|
||||||
"logo": "{{ '/assets/images/logo-512x512.png' | cdn }}",
|
"logo": "https://o-k-i.net/assets/images/logo-512x512.png",
|
||||||
"description": "{{ t.site.description }}",
|
"description": "{{ t.site.description }}",
|
||||||
"address": {
|
"address": {
|
||||||
"@type": "PostalAddress",
|
"@type": "PostalAddress",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<h2>{{ t.djangokam.titre }} <span class="accent-text">{{ t.djangokam.titreAccent }}</span></h2>
|
<h2>{{ t.djangokam.titre }} <span class="accent-text">{{ t.djangokam.titreAccent }}</span></h2>
|
||||||
<p class="section-subtitle">{{ t.djangokam.accroche }}</p>
|
<p class="section-subtitle">{{ t.djangokam.accroche }}</p>
|
||||||
|
|
||||||
<img src="{{ '/assets/images/djangokam-portrait.webp' | cdn }}" alt="Portrait officiel de DJANGOKAM" class="djangokam-portrait" width="512" height="512" loading="lazy">
|
<img src="/assets/images/djangokam-portrait.webp" alt="Portrait officiel de DJANGOKAM" class="djangokam-portrait" width="512" height="512" loading="lazy">
|
||||||
|
|
||||||
<blockquote class="djangokam-highlight">
|
<blockquote class="djangokam-highlight">
|
||||||
{{ t.djangokam.message_cle }}
|
{{ t.djangokam.message_cle }}
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<figure class="djangokam-duo">
|
<figure class="djangokam-duo">
|
||||||
<a href="{{ t.djangokam.duo.url }}" target="_blank" rel="noopener noreferrer">
|
<a href="{{ t.djangokam.duo.url }}" target="_blank" rel="noopener noreferrer">
|
||||||
<img src="{{ t.djangokam.duo.image | cdn }}" alt="{{ t.djangokam.duo.alt }}" loading="lazy">
|
<img src="{{ t.djangokam.duo.image }}" alt="{{ t.djangokam.duo.alt }}" loading="lazy">
|
||||||
<figcaption>{{ t.djangokam.duo.legende }}</figcaption>
|
<figcaption>{{ t.djangokam.duo.legende }}</figcaption>
|
||||||
</a>
|
</a>
|
||||||
</figure>
|
</figure>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
{% for clip in t.djangokam.clips %}
|
{% for clip in t.djangokam.clips %}
|
||||||
<figure class="djangokam-clip">
|
<figure class="djangokam-clip">
|
||||||
<a href="{{ clip.url }}" target="_blank" rel="noopener noreferrer">
|
<a href="{{ clip.url }}" target="_blank" rel="noopener noreferrer">
|
||||||
<img src="{{ clip.image | cdn }}" alt="{{ clip.alt }}" loading="lazy">
|
<img src="{{ clip.image }}" alt="{{ clip.alt }}" loading="lazy">
|
||||||
<figcaption>{{ clip.titre }}</figcaption>
|
<figcaption>{{ clip.titre }}</figcaption>
|
||||||
</a>
|
</a>
|
||||||
</figure>
|
</figure>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<div class="nav-container">
|
<div class="nav-container">
|
||||||
<a href="/" class="logo">
|
<a href="/" class="logo">
|
||||||
<img src="{{ '/assets/images/logo-512x512.png' | cdn }}" alt="{{ t.site.shortName }} Logo" class="logo-image">
|
<img src="/assets/images/logo-512x512.png" alt="{{ t.site.shortName }} Logo" class="logo-image">
|
||||||
<span>{{ t.site.shortName }}</span>
|
<span>{{ t.site.shortName }}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="nav-links">
|
<ul class="nav-links">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
{% for partner in t.partners.items %}
|
{% for partner in t.partners.items %}
|
||||||
<div class="partner-card">
|
<div class="partner-card">
|
||||||
<div class="partner-logo-container">
|
<div class="partner-logo-container">
|
||||||
<img src="{{ partner.logo | cdn }}" alt="Logo {{ partner.name }}" class="partner-logo">
|
<img src="{{ partner.logo }}" alt="Logo {{ partner.name }}" class="partner-logo">
|
||||||
</div>
|
</div>
|
||||||
<h3>{{ partner.name }}</h3>
|
<h3>{{ partner.name }}</h3>
|
||||||
<p class="partner-description">{{ partner.description }}</p>
|
<p class="partner-description">{{ partner.description }}</p>
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ html.light-theme .theme-icon-light {
|
|||||||
right: -5%;
|
right: -5%;
|
||||||
width: 55%;
|
width: 55%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: url('https://organisationka.b-cdn.net/assets/images/logo-512x512.png') center / contain no-repeat;
|
background: url('/assets/images/logo-512x512.png') center / contain no-repeat;
|
||||||
opacity: 0.05;
|
opacity: 0.05;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user