From f50f052883c3c99307a757f2bf4ac0bf597790a5 Mon Sep 17 00:00:00 2001 From: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> Date: Tue, 17 Jan 2023 18:58:42 +0300 Subject: [PATCH] Don't shadow base config options, add local dev config (#530) --- README.md | 4 +++- _config.development.yml | 2 ++ _config.yml | 2 +- _layouts/blog.html | 12 ++++++------ _layouts/default.html | 4 ++-- build-and-serve.sh | 2 +- build.sh | 2 +- pages/rss.xml | 6 +++--- 8 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 _config.development.yml diff --git a/README.md b/README.md index 0dc4f7f158..ccd863dc60 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ To build the website locally, follow these steps: 2. Clone this repository. 3. Install the necessary dependencies: `bundle install`. 4. Build the site: `bundle exec jekyll build`. + - Append `--config _config.yml,_config.development.yml` to use the development config with your build. For simplicity, these two commands are also available as a `build.sh` script in this repository. @@ -149,7 +150,8 @@ the events. **Some files may be obsolete and unused.** ### Build system -This project is build with Jekyll, with the build instructions located in `Gemfile` and `_config.yml`. +This project is build with Jekyll, with the build instructions located in `Gemfile` and `_config.yml`. When building +locally, some configuration options may need to be different. To define those, `_config.development.yml` is used. ## Content update guidelines diff --git a/_config.development.yml b/_config.development.yml new file mode 100644 index 0000000000..3c20e09faf --- /dev/null +++ b/_config.development.yml @@ -0,0 +1,2 @@ +# Overrides from the main config +url: "http://localhost:4000" diff --git a/_config.yml b/_config.yml index c200ae3656..1b91519459 100644 --- a/_config.yml +++ b/_config.yml @@ -2,7 +2,7 @@ exclude: [".github", "Gemfile", "Gemfile.lock", "build.sh", "build-and-serve.sh", "README.md"] permalink: pretty -baseurl: "https://godotengine.org" +url: "https://godotengine.org" collections_dir: collections collections: diff --git a/_layouts/blog.html b/_layouts/blog.html index e36c896405..9a48c2c863 100644 --- a/_layouts/blog.html +++ b/_layouts/blog.html @@ -73,19 +73,19 @@ collection: article
@@ -110,19 +110,19 @@ collection: article
diff --git a/_layouts/default.html b/_layouts/default.html index 8bfb0ce2c3..55714dfea1 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -8,12 +8,12 @@ - + - + {{ page.title | default: "Godot Engine" }} diff --git a/build-and-serve.sh b/build-and-serve.sh index aecbdaaef5..f6f7096edb 100755 --- a/build-and-serve.sh +++ b/build-and-serve.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash bundle install -bundle exec jekyll serve --host 0.0.0.0 +bundle exec jekyll serve --config _config.yml,_config.development.yml --host 0.0.0.0 diff --git a/build.sh b/build.sh index e70af5c107..d69461f526 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash bundle install -bundle exec jekyll build +bundle exec jekyll build --config _config.yml,_config.development.yml diff --git a/pages/rss.xml b/pages/rss.xml index e07d5c15c1..1379a92d2e 100644 --- a/pages/rss.xml +++ b/pages/rss.xml @@ -7,15 +7,15 @@ permalink: /rss.xml Godot Engine Official - {{ site.baseurl }} + {{ site.url }} Godot is a 2D and 3D free and open source game engine developed by a community of contributors. It provides a huge set of common tools, so you can just focus on making your game without reinventing the wheel. - + {% assign latest_posts = site.article | sort:"date" | reverse %} {% for post in latest_posts limit:24 %} {{ post.title }} - {{ site.baseurl }}{{ post.url }} + {{ site.url }}{{ post.url }} {{ post.content | xml_escape }} {{ post.date | date: "%a, %d %b %Y %X +0000" }}