From 733fdfc0602a84e94d390ea87df30902abeab9be Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Thu, 18 Jan 2024 16:46:32 +0100 Subject: [PATCH] move docs to en/docs to allow more languages in the future --- README.md | 2 +- netlify.toml | 5 +++++ src/_includes/welcome.jlhtml | 10 +++++----- src/{ => en}/blog/something.jl | 0 src/{ => en}/blog/yayy.md | 0 src/{ => en}/docs/AbstractPlutoDingetjes.jl | 0 src/{ => en}/docs/index.jlmd | 0 src/{ => en}/docs/install.jlmd | 0 src/{ => en}/docs/packages-advanced.jlmd | 0 src/{ => en}/docs/packages.jlmd | 0 src/{ => en}/docs/widgets/javascript.jl | 0 11 files changed, 11 insertions(+), 6 deletions(-) rename src/{ => en}/blog/something.jl (100%) rename src/{ => en}/blog/yayy.md (100%) rename src/{ => en}/docs/AbstractPlutoDingetjes.jl (100%) rename src/{ => en}/docs/index.jlmd (100%) rename src/{ => en}/docs/install.jlmd (100%) rename src/{ => en}/docs/packages-advanced.jlmd (100%) rename src/{ => en}/docs/packages.jlmd (100%) rename src/{ => en}/docs/widgets/javascript.jl (100%) diff --git a/README.md b/README.md index 1186de9..f280a6f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This is the source code for the Pluto.jl website! It uses a site generation syst The `/src/` folder is scanned for files, and all files are turned into HTML pages. -Paths correspond to URLs. For example, `src/docs/install.jlmd` will become available at `plutojl.org/docs/install/`. For files called *"index"*, the URL will point to its parent, e.g. `src/docs/index.jlmd` becomes `plutojl.org/docs/`. Remember that changing URLs is very bad! You can't share Pluto with your friends if the links break. +Paths correspond to URLs. For example, `src/en/docs/install.jlmd` will become available at `plutojl.org/en/docs/install/`. For files called *"index"*, the URL will point to its parent, e.g. `src/en/docs/index.jlmd` becomes `plutojl.org/en/docs/`. Remember that changing URLs is very bad! You can't share Pluto with your friends if the links break. > **To add something to our website, just create a new file!** Fons will be super happy to figure out the technical bits. diff --git a/netlify.toml b/netlify.toml index 0ee17cd..a5cdb96 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,3 +2,8 @@ for = "/*" [headers.values] Access-Control-Allow-Origin = "*" + +[[redirects]] + from = "/docs/*" + to = "/en/docs/:splat" + status = 301 \ No newline at end of file diff --git a/src/_includes/welcome.jlhtml b/src/_includes/welcome.jlhtml index 69a646f..ab012b9 100644 --- a/src/_includes/welcome.jlhtml +++ b/src/_includes/welcome.jlhtml @@ -35,9 +35,9 @@ @@ -73,7 +73,7 @@

Balblablkja placeholder bla bla Pluto uses syntax analysis to understand which packages are being used in a notebook, and it automatically manages a package environment for your notebook. You no longer need to install packages, you can directly import any registered package like Plots or DataFrames and use it.

- Learn more + Learn more TODO TODO TODO screencap @@ -91,7 +91,7 @@ interactivity screencap - Learn more + Learn more @@ -109,7 +109,7 @@

The package PlutoUI.jl contains lots of common widgets like sliders, textfields and buttons. Need something different? PlutoUI.jl was made by us, but anyone can create their own special widgets! We give you full control over HTML, CSS and JS, with powerful API to connect a web component to Julia.

- Learn more + Learn more diff --git a/src/blog/something.jl b/src/en/blog/something.jl similarity index 100% rename from src/blog/something.jl rename to src/en/blog/something.jl diff --git a/src/blog/yayy.md b/src/en/blog/yayy.md similarity index 100% rename from src/blog/yayy.md rename to src/en/blog/yayy.md diff --git a/src/docs/AbstractPlutoDingetjes.jl b/src/en/docs/AbstractPlutoDingetjes.jl similarity index 100% rename from src/docs/AbstractPlutoDingetjes.jl rename to src/en/docs/AbstractPlutoDingetjes.jl diff --git a/src/docs/index.jlmd b/src/en/docs/index.jlmd similarity index 100% rename from src/docs/index.jlmd rename to src/en/docs/index.jlmd diff --git a/src/docs/install.jlmd b/src/en/docs/install.jlmd similarity index 100% rename from src/docs/install.jlmd rename to src/en/docs/install.jlmd diff --git a/src/docs/packages-advanced.jlmd b/src/en/docs/packages-advanced.jlmd similarity index 100% rename from src/docs/packages-advanced.jlmd rename to src/en/docs/packages-advanced.jlmd diff --git a/src/docs/packages.jlmd b/src/en/docs/packages.jlmd similarity index 100% rename from src/docs/packages.jlmd rename to src/en/docs/packages.jlmd diff --git a/src/docs/widgets/javascript.jl b/src/en/docs/widgets/javascript.jl similarity index 100% rename from src/docs/widgets/javascript.jl rename to src/en/docs/widgets/javascript.jl