diff --git a/buildSrc/src/main/kotlin/release.gradle.kts b/buildSrc/src/main/kotlin/release.gradle.kts index 98e643bc9..31e49b83e 100644 --- a/buildSrc/src/main/kotlin/release.gradle.kts +++ b/buildSrc/src/main/kotlin/release.gradle.kts @@ -66,16 +66,17 @@ fun archiveDocumentation(version: String) { from("docs") into("docs/$version") exclude("_*", "Gemfile*") + val versionRegex = "^\\d+.\\d+.\\d+$".toRegex() + exclude { versionRegex.matches(it.name) } } - val jekyllConfigFile = File("docs/_config.yml") - jekyllConfigFile.appendText( - """ + val text = """ | - scope: | path: "$version" | values: | version: "$version" | """.trimMargin() - ) + File("docs/_config.yml").appendText(text) + File("docs/_config_netlify.yml").appendText(text) } diff --git a/docs/_config.yml b/docs/_config.yml index b0fbba0d4..f32f244da 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,9 +1,11 @@ +# If you update this file, please also update _config_netlify.yml with the exact same changes plugins: - jekyll-relative-links relative_links: enabled: true collections: true remote_theme: Orange-OpenSource/ods-jekyll-theme +baseurl: "/ods-android" defaults: - scope: path: "" diff --git a/docs/_config_netlify.yml b/docs/_config_netlify.yml new file mode 100644 index 000000000..81d7fb5eb --- /dev/null +++ b/docs/_config_netlify.yml @@ -0,0 +1,12 @@ +# If you update this file, please also update _config.yml with the exact same changes +plugins: + - jekyll-relative-links +relative_links: + enabled: true + collections: true +remote_theme: Orange-OpenSource/ods-jekyll-theme +defaults: + - scope: + path: "" + values: + version: "" diff --git a/docs/_layouts/main.html b/docs/_layouts/main.html index e51b55392..2e87e057d 100644 --- a/docs/_layouts/main.html +++ b/docs/_layouts/main.html @@ -133,11 +133,11 @@

{{ item.title }}