diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..ba442ce0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git/** +_downloads/** diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..13812c11 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 120 +inline-quotes = double diff --git a/.gitignore b/.gitignore index 45c15053..ead6b0c1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ _site .sass-cache .jekyll-metadata +_downloads/** diff --git a/Dockerfile b/Dockerfile index 1ad5abfc..e15d4b57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,24 @@ # This is a multi-stage Docker build +# Create the downloads collection +FROM python:3.6-alpine as collection + +WORKDIR /source/ + +COPY . /source/ +RUN pip install -r requirements.txt +# Validate that what was installed was what was expected +RUN pip freeze 2>/dev/null | grep -v "deployer" > requirements.installed \ + && diff -u requirements.txt requirements.installed 1>&2 \ + || ( echo "!! ERROR !! requirements.txt defined different packages or versions for installation" \ + && exit 1 ) 1>&2 +RUN pip install flake8 + +COPY .flake8 .flake8 +RUN flake8 fetch-downloads.py + +RUN python fetch-downloads.py + # Build the HTML from the source FROM alpine as html @@ -25,6 +44,7 @@ RUN apk --no-cache add \ ruby-dev COPY . /source/ +COPY --from=collection /source/_downloads /source/_downloads RUN mkdir /html \ && jekyll build --strict_front_matter -s /source -d /html diff --git a/_config.yml b/_config.yml index 71e1b9d3..aa7b4f2d 100644 --- a/_config.yml +++ b/_config.yml @@ -4,6 +4,7 @@ description: >- # this means to ignore newlines until "baseurl:" An open source simulator based on the classic game Transport Tycoon Deluxe. It attempts to mimic the original game as closely as possible while extending it with new features. baseurl: "" url: "" +timezone: Etc/UTC markdown: kramdown plugins: @@ -20,6 +21,11 @@ defaults: path: "" values: layout: "default" + - scope: + path: "" + type: "downloads" + values: + layout: "download" - scope: path: "" type: "posts" @@ -32,10 +38,14 @@ defaults: layout: "screenshot" collections: - posts: - permalink: /news/:year/:month/:day/:title.html + downloads: + output: true + download-meta: + output: false people: output: false + posts: + permalink: /news/:year/:month/:day/:title.html screenshots: output: true diff --git a/_download-meta/catcodec-releases.md b/_download-meta/catcodec-releases.md new file mode 100644 index 00000000..342c3d8b --- /dev/null +++ b/_download-meta/catcodec-releases.md @@ -0,0 +1,3 @@ +--- +folder: extra/catcodec +--- diff --git a/_download-meta/grfcodec-nightlies.md b/_download-meta/grfcodec-nightlies.md new file mode 100644 index 00000000..dd83bdbe --- /dev/null +++ b/_download-meta/grfcodec-nightlies.md @@ -0,0 +1,3 @@ +--- +folder: extra/grfcodec-trunk +--- diff --git a/_download-meta/grfcodec-releases.md b/_download-meta/grfcodec-releases.md new file mode 100644 index 00000000..506d76ca --- /dev/null +++ b/_download-meta/grfcodec-releases.md @@ -0,0 +1,3 @@ +--- +folder: extra/grfcodec +--- diff --git a/_download-meta/nosound-releases.md b/_download-meta/nosound-releases.md new file mode 100644 index 00000000..d294159d --- /dev/null +++ b/_download-meta/nosound-releases.md @@ -0,0 +1,3 @@ +--- +folder: extra/nosound +--- diff --git a/_download-meta/opengfx-releases.md b/_download-meta/opengfx-releases.md new file mode 100644 index 00000000..7cdaddd8 --- /dev/null +++ b/_download-meta/opengfx-releases.md @@ -0,0 +1,3 @@ +--- +folder: extra/opengfx +--- diff --git a/_download-meta/openmsx-releases.md b/_download-meta/openmsx-releases.md new file mode 100644 index 00000000..ad164edb --- /dev/null +++ b/_download-meta/openmsx-releases.md @@ -0,0 +1,3 @@ +--- +folder: extra/openmsx +--- diff --git a/_download-meta/opensfx-releases.md b/_download-meta/opensfx-releases.md new file mode 100644 index 00000000..f43d9a80 --- /dev/null +++ b/_download-meta/opensfx-releases.md @@ -0,0 +1,3 @@ +--- +folder: extra/opensfx +--- diff --git a/_download-meta/openttd-nightlies.md b/_download-meta/openttd-nightlies.md new file mode 100644 index 00000000..3a38dbf4 --- /dev/null +++ b/_download-meta/openttd-nightlies.md @@ -0,0 +1,10 @@ +--- +folder: nightlies/trunk +--- + +For OpenTTD you can use the original Transport Tycoon Deluxe data files (you need to own a Transport Tycoon Deluxe CD). +There are also the free alternatives: [OpenGFX (graphics)](http://dev.openttdcoop.org/projects/opengfx), [OpenSFX (sound)](http://dev.openttdcoop.org/projects/opensfx), and [OpenMSX (music)](http://dev.openttdcoop.org/projects/openmsx). +These can be installed automatically by the Windows and OS/2 installers. +Please refer to the [readme](https://binaries.openttd.org/nightlies/trunk/@@version@@/readme.txt) for more information. + +You can download the free alternatives here: [download OpenGFX](../opengfx-releases/), [download OpenSFX](../opensfx-releases/), and [download OpenMSX](../openmsx-releases/). diff --git a/_download-meta/openttd-releases.md b/_download-meta/openttd-releases.md new file mode 100644 index 00000000..bd0dbc2e --- /dev/null +++ b/_download-meta/openttd-releases.md @@ -0,0 +1,10 @@ +--- +folder: releases +--- + +For OpenTTD you can use the original Transport Tycoon Deluxe data files (you need to own a Transport Tycoon Deluxe CD). +There are also the free alternatives: [OpenGFX (graphics)](http://dev.openttdcoop.org/projects/opengfx), [OpenSFX (sound)](http://dev.openttdcoop.org/projects/opensfx), and [OpenMSX (music)](http://dev.openttdcoop.org/projects/openmsx). +These can be installed automatically by the Windows and OS/2 installers. +Please refer to the [readme](https://binaries.openttd.org/releases/@@version@@/readme.txt) for more information. + +You can download the free alternatives here: [download OpenGFX](../opengfx-releases/), [download OpenSFX](../opensfx-releases/), and [download OpenMSX](../openmsx-releases/). diff --git a/_download-meta/openttd-useful.md b/_download-meta/openttd-useful.md new file mode 100644 index 00000000..477f32e7 --- /dev/null +++ b/_download-meta/openttd-useful.md @@ -0,0 +1,3 @@ +--- +folder: extra/openttd-useful +--- diff --git a/_download-meta/osie-releases.md b/_download-meta/osie-releases.md new file mode 100644 index 00000000..9521f8bd --- /dev/null +++ b/_download-meta/osie-releases.md @@ -0,0 +1,3 @@ +--- +folder: extra/osie +--- diff --git a/_download-meta/pngcodec-releases.md b/_download-meta/pngcodec-releases.md new file mode 100644 index 00000000..857c93fc --- /dev/null +++ b/_download-meta/pngcodec-releases.md @@ -0,0 +1,3 @@ +--- +folder: extra/pngcodec +--- diff --git a/_download-meta/strgen-releases.md b/_download-meta/strgen-releases.md new file mode 100644 index 00000000..1527e876 --- /dev/null +++ b/_download-meta/strgen-releases.md @@ -0,0 +1,3 @@ +--- +folder: extra/strgen +--- diff --git a/_layouts/default.html b/_layouts/default.html index 1d11965d..64076be5 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -11,15 +11,33 @@ + {% for filename in layout.css %} + + {% endfor %} + {% for filename in layout.js %} + + {% endfor %} OpenTTD {% if layout.section_title != nil %}| {{layout.section_title}}{% endif %} | {{ page.title }}