diff --git a/docs/midsomer.md b/docs/midsomer.md index e2a9742..84326bd 100644 --- a/docs/midsomer.md +++ b/docs/midsomer.md @@ -2,6 +2,7 @@ title: Midsomer Murders --- +::: sv **Midsomer Murders – men var är amatörradion?**
Midsomer Murders är en av de mest älskade brittiska kriminalserierna – inte bara tack vare sina snillrika mordgåtor, utan för hur varje avsnitt placerar oss i en ny, udda och charmig subkultur mitt i den lantliga idyllen. Vi har fått följa historier i allt från new age-mässor, konstnärskollektiv och IQ-sällskap till rugbyklubbar, riddarföreningar och preppers – alltid med värme, humor och ett stänk brittisk excentricitet. @@ -23,9 +24,9 @@ Jag vill samla in namn och ev. signal för att skicka en vänlig men tydlig väd Låt radioamatörerna få sitt avsnitt! Oavsett om du är sändaramatör eller bara älskar serien – skriv gärna under och hjälp oss visa att detta är ett tema som många vill se! +::: ---- - +::: en **Midsomer Murders – but where is amateur radio?**
Midsomer Murders is one of Britain's most beloved detective series – not just for its clever plots, but for the way each episode dives into a new, quirky subculture nestled in the peaceful countryside. We've seen episodes set among new age fairs, art collectives, IQ societies, rugby clubs, medieval reenactors, doomsday preppers – always with warmth, charm, and a distinctly British wink. @@ -47,6 +48,7 @@ We’re gathering names to kindly but firmly ask the show's writers: Let amateur radio have its episode! Whether you're a licensed ham or just a loyal viewer, add your name and help us show there's real interest in this story idea. +::: --- diff --git a/docs/smokeping.md b/docs/smokeping.md index d8eb3dd..9f82200 100644 --- a/docs/smokeping.md +++ b/docs/smokeping.md @@ -6,13 +6,13 @@ title: sa6anw.se
______ __ __ ______ __ __ ________ _______ ______ __ __ ______ /\ ____\ |\_\ /\_\ /\ ____\ |\_\ /\_\ |\ ______\ |\ _____\ |\ ____\ |\_\ |\_\ /\ ____\ -|\ $$$$$$\ | $$\ / $$ |\ $$$$$$\ | $$ / $$ | $$$$$$$$ | $$$$$$$\ \$$$$$$ | $$\ | $$ |\ $$$$$$\ -| $$___\$$ | $$$\ / $$$ | $$ | $$ | $$/ $$ | $$__ | $$__/ $$ | $$ | $$$\| $$ | $$ __\$$ - \$$ ___\ | $$$$\ $$$$ | $$ | $$ | $$ $$ | $$ _\ | $$ _\ $$ | $$ | $$$$\ $$ | $$|\ __\ - _\$$$$$$\ | $$\$$ $$ $$ | $$ | $$ | $$$$$\ | $$$$$ | $$$$$$$ | $$ | $$\$$ $$ | $$ \$$$$ -|\_\__| $$ | $$ \$$$| $$ | $$__/\$$ | $$ \$$\ | $$_____ | $$ _| $$_ | $$ \$$$$ | $$__| $$ - \$$ __\$$ | $$ \$ | $$ \$$ _\ $$ | $$ \$$\ | $$ ____\ | $$ |\_\$$_\ | $$ \$$$ \$$ __\$$ - \$$$$$$ \$$ \$$ \$$$$$$ \$$ \$$ \$$$$$$$$ \$$ \$$$$$$ \$$ \$$ \$$$$$$ +|\ ######\ | ##\ / ## |\ ######\ | ## / ## | ######## | #######\ \###### | ##\ | ## |\ ######\ +| ##___\## | ###\ / ### | ## | ## | ##/ ## | ##__ | ##__/ ## | ## | ###\| ## | ## __\## + \## ___\ | ####\ #### | ## | ## | ## ## | ## _\ | ## _\ ## | ## | ####\ ## | ##|\ __\ + _\######\ | ##\## ## ## | ## | ## | #####\ | ##### | ####### | ## | ##\## ## | ## \#### +|\_\__| ## | ## \###| ## | ##__/\## | ## \##\ | ##_____ | ## _| ##_ | ## \#### | ##__| ## + \## __\## | ## \# | ## \## _\ ## | ## \##\ | ## ____\ | ## |\_\##_\ | ## \### \## __\## + \###### \## \## \###### \## \## \######## \## \###### \## \## \###### SA6ANW 20240105
@@ -20,7 +20,7 @@ title: sa6anw.se **[smokeping.sa6anw.se](https://smokeping.sa6anw.se)** -För att köra netnetmaker i ditt egna labb: +För att köra smokeping i ditt egna labb: - Skapa en `docker-compose.yaml` med följande innehåll @@ -46,5 +46,5 @@ services: ``` - Byt till din domän. -- Sen är det bara att köra `docker-compose up -d` +- Sen är det bara att köra `docker compose up -d` diff --git a/mkdocs.yml b/mkdocs.yml index 25485ed..65a9308 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,9 +13,9 @@ nav: - Caddy: caddy.md - sa6anw.se: sa6anwse.md - Smokeping: smokeping.md + theme: name: 'material' - language: sv font: text: 'Ubuntu' @@ -36,18 +36,23 @@ theme: toggle: icon: material/weather-night name: Embrace the dark side + +features: + - navigation.tabs + - navigation.instant + - i18n + plugins: - search - open-in-new-tab -# - git-revision-date-localized: -# enable_creation_date: true -# locale: sv -# fallback_to_build_date: true -# type: date + - i18n: + default_language: sv + languages: + sv: Svenska + en: English + extra_css: - stylesheets/extra.css - overrides/hide-titles.css - overrides/hide-toc.css - overrides/header__title.css - - diff --git a/requirements.txt b/requirements.txt index e7d31c9..0819e46 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,4 @@ mkdocs-material==9.6.12 mkdocs-open-in-new-tab==1.0.3 mkdocs-git-revision-date-localized-plugin==1.2.0 mkdocs-minify-plugin==0.7.1 - +mkdocs-static-i18n diff --git a/split_markdown.py b/split_markdown.py new file mode 100644 index 0000000..13cc34e --- /dev/null +++ b/split_markdown.py @@ -0,0 +1,40 @@ +import os +import re + +SOURCE_DIR = "docs" +OUTPUT_DIRS = { + "sv": "docs_sv", + "en": "docs_en" +} + +lang_block_re = re.compile(r":::\s*(sv|en)\n(.*?)\n:::", re.DOTALL) + +def split_content_by_language(content): + blocks = {"sv": "", "en": ""} + pos = 0 + for match in lang_block_re.finditer(content): + start, end = match.span() + lang, text = match.groups() + neutral = content[pos:start] + for l in blocks: + blocks[l] += neutral + blocks[lang] += text.strip() + "\n\n" + pos = end + tail = content[pos:] + for l in blocks: + blocks[l] += tail + return blocks + +for filename in os.listdir(SOURCE_DIR): + if filename.endswith(".md"): + filepath = os.path.join(SOURCE_DIR, filename) + with open(filepath, "r", encoding="utf-8") as f: + content = f.read() + + blocks = split_content_by_language(content) + + for lang, text in blocks.items(): + os.makedirs(OUTPUT_DIRS[lang], exist_ok=True) + out_path = os.path.join(OUTPUT_DIRS[lang], filename) + with open(out_path, "w", encoding="utf-8") as f: + f.write(text.strip())