Compare commits
1 Commits
main
...
feature/el
| Author | SHA1 | Date |
|---|---|---|
|
|
a0450409b6 | 1 year ago |
@ -0,0 +1,63 @@ |
||||
const i18n = require('eleventy-plugin-i18n'); |
||||
const translations = require('./src/_data/i18n'); |
||||
|
||||
module.exports = function (eleventyConfig) { |
||||
// Plugins
|
||||
eleventyConfig.addPlugin(i18n, { |
||||
defaultLanguage: 'de', |
||||
localesDirectory: 'src', |
||||
// optional: customize the URL structure
|
||||
urlPrefix: locale => (locale === 'de' ? '' : `/${locale}`), |
||||
translations, |
||||
fallbackLocales: { |
||||
'*': 'de' |
||||
} |
||||
}); |
||||
|
||||
// TEMP demo of what could be an i18n-aware plural package?
|
||||
eleventyConfig.addFilter('pluralize', function (term, count = 1) { |
||||
// Poorman's pluralize for now...
|
||||
return count === 1 ? term : `${term}s`; |
||||
}); |
||||
|
||||
eleventyConfig.addFilter('localizedPermalink', (slug, locale) => { |
||||
const newPath = locale === 'de' ? `${slug.slice(3)}.html` : `${slug}.html`; |
||||
return `${newPath}`; |
||||
}); |
||||
|
||||
// these folders will be copied into webroot
|
||||
// e.g. /image => /_site/image
|
||||
eleventyConfig.addPassthroughCopy('image'); |
||||
eleventyConfig.addPassthroughCopy('css'); |
||||
eleventyConfig.addPassthroughCopy('font'); |
||||
|
||||
// contents of public folder will be copied into webroot
|
||||
// e.g. /public/something.html => /_site/something.html
|
||||
eleventyConfig.addPassthroughCopy({ "public": "." }); |
||||
|
||||
// Browsersync
|
||||
// Redirect from root to default language root during --serve
|
||||
// Can also be handled by netlify.toml?
|
||||
eleventyConfig.setBrowserSyncConfig({ |
||||
callbacks: { |
||||
ready: function (err, bs) { |
||||
bs.addMiddleware('*', (req, res) => { |
||||
if (req.url === '/') { |
||||
res.writeHead(302, { |
||||
location: '/en/' |
||||
}); |
||||
res.end(); |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
}); |
||||
|
||||
// Configuration
|
||||
return { |
||||
dir: { |
||||
input: 'src' |
||||
}, |
||||
markdownTemplateEngine: 'njk' |
||||
}; |
||||
}; |
||||
@ -0,0 +1,2 @@ |
||||
node_modules |
||||
_site |
||||
@ -0,0 +1,14 @@ |
||||
{ |
||||
"singleQuote": true, |
||||
"trailingComma": "none", |
||||
"arrowParens": "avoid", |
||||
"overrides": [ |
||||
{ |
||||
"files": "*.css", |
||||
"options": { |
||||
"printWidth": 140, |
||||
"singleQuote": false |
||||
} |
||||
} |
||||
] |
||||
} |
||||
@ -0,0 +1,21 @@ |
||||
MIT License |
||||
|
||||
Copyright (c) 2025 Chaostreff Tübingen e. V. |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
||||
@ -0,0 +1,16 @@ |
||||
# TDF Eleventy |
||||
|
||||
Based on the demo site [`eleventy-plugin-i18n-demo`](https://github.com/adamduncan/eleventy-plugin-i18n-demo). |
||||
|
||||
|
||||
# Setup |
||||
Install |
||||
|
||||
`npm install` |
||||
|
||||
Run local webserver |
||||
|
||||
`npx @11ty/eleventy --serve` |
||||
|
||||
Note: |
||||
the index.js containing translations won't automatically be updated, you may need to restart the webserver for it to reflect the changes |
||||
@ -0,0 +1,21 @@ |
||||
MIT License |
||||
|
||||
Copyright (c) 2020 Adam Duncan |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
||||
@ -1,90 +0,0 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
||||
<title>Days of Digital Freedom — Tübingen</title> |
||||
<meta name="description" content="The Days of Digital Freedom in Tübingen — every edition since 2022."> |
||||
<link rel="icon" href="../image/tdf-logo-250px.png"> |
||||
<link rel="alternate" hreflang="de" href="../index.html"> |
||||
<link rel="alternate" hreflang="en" href="index.html"> |
||||
<link rel="stylesheet" href="../styles.css"> |
||||
</head> |
||||
|
||||
<body> |
||||
<div class="page"> |
||||
|
||||
<nav class="lang" aria-label="Language"> |
||||
<a href="../index.html" hreflang="de" lang="de">DE</a> |
||||
<span class="sep" aria-hidden="true">·</span> |
||||
<span aria-current="true">EN</span> |
||||
</nav> |
||||
|
||||
<header class="masthead"> |
||||
<h1>Days of Digital Freedom Tübingen</h1> |
||||
<img src="../image/tdf-logo-250px.png" width="250" height="250" alt="Days of Digital Freedom"> |
||||
<p>Tübingen</p> |
||||
</header> |
||||
|
||||
<main class="editions"> |
||||
|
||||
<a class="edition" href="../tdf5/en/index.html"> |
||||
<img src="../image/tdf5-banner.webp" width="1000" height="350" |
||||
alt="Banner of the 5th Days of Digital Freedom 2026"> |
||||
<span class="caption"> |
||||
<span class="no">5th Days of Digital Freedom</span> |
||||
<span class="where">Westspitze</span> |
||||
<span class="when">15 – 17 May 2026</span> |
||||
</span> |
||||
</a> |
||||
|
||||
<a class="edition" href="../tdf4/en/index.html"> |
||||
<img src="../image/tdf4-banner.webp" width="1000" height="350" |
||||
alt="Banner of the 4th Days of Digital Freedom 2025"> |
||||
<span class="caption"> |
||||
<span class="no">4th Days of Digital Freedom</span> |
||||
<span class="where">Westspitze</span> |
||||
<span class="when">26 / 27 July 2025</span> |
||||
</span> |
||||
</a> |
||||
|
||||
<a class="edition" href="../tdf3/en/index.html"> |
||||
<img src="../image/tdf3-banner.webp" width="1000" height="350" |
||||
alt="Banner of the 3rd Day of Digital Freedom 2024"> |
||||
<span class="caption"> |
||||
<span class="no">3rd Day of Digital Freedom</span> |
||||
<span class="where">Westspitze</span> |
||||
<span class="when">6 July 2024</span> |
||||
</span> |
||||
</a> |
||||
|
||||
<a class="edition" href="../tdf2/index.html" hreflang="de"> |
||||
<img src="../image/tdf2-banner.webp" width="1000" height="350" |
||||
alt="Banner of the 2nd Day of Digital Freedom 2023"> |
||||
<span class="caption"> |
||||
<span class="no">2nd Day of Digital Freedom</span> |
||||
<span class="where">Shedhalle</span> |
||||
<span class="when">17 June 2023</span> |
||||
</span> |
||||
</a> |
||||
|
||||
<a class="edition" href="../tdf1/index.html" hreflang="de"> |
||||
<img src="../image/tdf1-banner.webp" width="1000" height="350" |
||||
alt="Banner of the 1st Day of Digital Freedom 2022"> |
||||
<span class="caption"> |
||||
<span class="no">1st Day of Digital Freedom</span> |
||||
<span class="where">Shedhalle</span> |
||||
<span class="when">4 June 2022</span> |
||||
</span> |
||||
</a> |
||||
|
||||
</main> |
||||
|
||||
<footer> |
||||
<span><a href="mailto:tdf@cttue.de">tdf@cttue.de</a></span> |
||||
<span><a href="../tdf5/en/imprint.html">Imprint</a></span> |
||||
</footer> |
||||
|
||||
</div> |
||||
</body> |
||||
</html> |
||||
|
After Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 424 KiB After Width: | Height: | Size: 424 KiB |
|
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 794 KiB After Width: | Height: | Size: 794 KiB |
|
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 238 KiB |
|
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 99 B |
|
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 288 B |
|
Before Width: | Height: | Size: 7.1 MiB After Width: | Height: | Size: 7.1 MiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 430 KiB After Width: | Height: | Size: 430 KiB |
|
Before Width: | Height: | Size: 980 KiB After Width: | Height: | Size: 980 KiB |
|
Before Width: | Height: | Size: 953 KiB After Width: | Height: | Size: 953 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 328 KiB After Width: | Height: | Size: 328 KiB |
|
Before Width: | Height: | Size: 3.7 MiB After Width: | Height: | Size: 3.7 MiB |
|
Before Width: | Height: | Size: 991 KiB After Width: | Height: | Size: 991 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 293 KiB After Width: | Height: | Size: 293 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 429 KiB |
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
@ -1,89 +0,0 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="de"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
||||
<title>Tage der digitalen Freiheit — Tübingen</title> |
||||
<meta name="description" content="Die Tage der digitalen Freiheit in Tübingen — alle Ausgaben seit 2022."> |
||||
<link rel="icon" href="image/tdf-logo-250px.png"> |
||||
<link rel="alternate" hreflang="de" href="index.html"> |
||||
<link rel="alternate" hreflang="en" href="en/index.html"> |
||||
<link rel="stylesheet" href="styles.css"> |
||||
</head> |
||||
<body> |
||||
<div class="page"> |
||||
|
||||
<nav class="lang" aria-label="Sprache"> |
||||
<span aria-current="true">DE</span> |
||||
<span class="sep" aria-hidden="true">·</span> |
||||
<a href="en/index.html" hreflang="en" lang="en">EN</a> |
||||
</nav> |
||||
|
||||
<header class="masthead"> |
||||
<h1>Tage der digitalen Freiheit Tübingen</h1> |
||||
<img src="image/tdf-logo-250px.png" width="250" height="250" alt="Tage der digitalen Freiheit"> |
||||
<p>Tübingen</p> |
||||
</header> |
||||
|
||||
<main class="editions"> |
||||
|
||||
<a class="edition" href="tdf5/index.html"> |
||||
<img src="image/tdf5-banner.webp" width="1000" height="350" |
||||
alt="Banner der 5. Tage der digitalen Freiheit 2026"> |
||||
<span class="caption"> |
||||
<span class="no">5. Tage der digitalen Freiheit</span> |
||||
<span class="where">Westspitze</span> |
||||
<span class="when">15. – 17. Mai 2026</span> |
||||
</span> |
||||
</a> |
||||
|
||||
<a class="edition" href="tdf4/index.html"> |
||||
<img src="image/tdf4-banner.webp" width="1000" height="350" |
||||
alt="Banner der 4. Tage der digitalen Freiheit 2025"> |
||||
<span class="caption"> |
||||
<span class="no">4. Tage der digitalen Freiheit</span> |
||||
<span class="where">Westspitze</span> |
||||
<span class="when">26. / 27. Juli 2025</span> |
||||
</span> |
||||
</a> |
||||
|
||||
<a class="edition" href="tdf3/index.html"> |
||||
<img src="image/tdf3-banner.webp" width="1000" height="350" |
||||
alt="Banner des 3. Tages der digitalen Freiheit 2024"> |
||||
<span class="caption"> |
||||
<span class="no">3. Tag der digitalen Freiheit</span> |
||||
<span class="where">Westspitze</span> |
||||
<span class="when">6. Juli 2024</span> |
||||
</span> |
||||
</a> |
||||
|
||||
<a class="edition" href="tdf2/index.html"> |
||||
<img src="image/tdf2-banner.webp" width="1000" height="350" |
||||
alt="Banner des 2. Tages der digitalen Freiheit 2023"> |
||||
<span class="caption"> |
||||
<span class="no">2. Tag der digitalen Freiheit</span> |
||||
<span class="where">Shedhalle</span> |
||||
<span class="when">17. Juni 2023</span> |
||||
</span> |
||||
</a> |
||||
|
||||
<a class="edition" href="tdf1/index.html"> |
||||
<img src="image/tdf1-banner.webp" width="1000" height="350" |
||||
alt="Banner des 1. Tages der digitalen Freiheit 2022"> |
||||
<span class="caption"> |
||||
<span class="no">1. Tag der digitalen Freiheit</span> |
||||
<span class="where">Shedhalle</span> |
||||
<span class="when">4. Juni 2022</span> |
||||
</span> |
||||
</a> |
||||
|
||||
</main> |
||||
|
||||
<footer> |
||||
<span><a href="mailto:tdf@cttue.de">tdf@cttue.de</a></span> |
||||
<span><a href="tdf5/imprint.html">Impressum</a></span> |
||||
</footer> |
||||
|
||||
</div> |
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,4 @@ |
||||
[[redirects]] |
||||
from = "/" |
||||
to = "/en" |
||||
status = 301 |
||||
@ -0,0 +1,33 @@ |
||||
{ |
||||
"name": "eleventy-plugin-i18n-demo", |
||||
"version": "0.1.0", |
||||
"description": "Demo site for eleventy-plugin-i18n", |
||||
"main": "index.js", |
||||
"scripts": { |
||||
"start": "npm run serve", |
||||
"serve": "cross-env ELEVENTY_ENV=development npx eleventy --serve", |
||||
"build": "cross-env ELEVENTY_ENV=production npx eleventy", |
||||
"debug": "cross-env DEBUG=* npx eleventy" |
||||
}, |
||||
"keywords": [], |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "git+https://github.com/adamduncan/eleventy-plugin-i18n-demo.git" |
||||
}, |
||||
"author": "Adam Duncan <mail@adamduncandesigns.com> (https://adamduncandesigns.com)", |
||||
"bugs": { |
||||
"url": "https://github.com/adamduncan/eleventy-plugin-i18n-demo/issues" |
||||
}, |
||||
"homepage": "https://github.com/adamduncan/eleventy-plugin-i18n-demo#readme", |
||||
"license": "MIT", |
||||
"devDependencies": { |
||||
"@11ty/eleventy": "^3.1.2", |
||||
"cross-env": "^7.0.2", |
||||
"lodash.get": "^4.4.2", |
||||
"prettier": "^2.0.5", |
||||
"templite": "^1.1.0" |
||||
}, |
||||
"dependencies": { |
||||
"eleventy-plugin-i18n": "^0.1.3" |
||||
} |
||||
} |
||||
|
Before Width: | Height: | Size: 972 KiB After Width: | Height: | Size: 972 KiB |
|
Before Width: | Height: | Size: 469 KiB After Width: | Height: | Size: 469 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 618 B |
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |