. ├── dist ├── docs-archive ├── landing-pages │ ├── dist │ ├── site │ │ ├── assets │ │ │ ├── icons │ │ │ └── scss │ │ ├── content │ │ │ └── en │ │ │ ├── blog │ │ │ ├── community │ │ │ ├── docs │ │ │ ├── install │ │ │ ├── meetups │ │ │ ├── privacy-notice │ │ │ ├── roadmap │ │ │ └── use-cases │ │ ├── data │ │ ├── layouts │ │ ├── static │ │ │ ├── icons │ │ │ └── integration-logos │ │ └── themes │ │ └── docsy │ └── src │ └── js ├── license-templates └── sphinx_airflow_theme ├── demo └── sphinx_airflow_theme
In order to run an environment for the project, make sure that you have Docker installed. Then, use the site.sh
script to work with the website in a Docker container.
site.sh
provides the following commands.
build-site Prepare dist directory with landing pages and documentation preview-site Starts the web server with preview of the website build-landing-pages Builds a landing pages prepare-theme Prepares and copies files needed for the proper functioning of the sphinx theme. shell Start shell build-image Build a Docker image with a environment install-node-deps Download all the Node dependencies check-site-links Checks if the links are correct in the website lint-css Lint CSS files lint-js Lint Javascript files cleanup Delete the virtual environment in Docker stop Stop the environment help Display usage
To add a new blogpost with pre-filled frontmatter, in <ROOT DIRECTORY>/landing-pages/site
run:
hugo new blog/my-new-blogpost.md
That will create a markdown file <ROOT DIRECTORY>/landing-pages/site/content/<LANGUAGE VERSION>/blog/my-new-blogpost.md
with following content:
--- title: "My New Blogpost" linkTitle: "My New Blogpost" author: "Your Name" twitter: "Your Twitter ID (optional, remove if not needed)" github: "Your Github ID (optional, remove if not needed)" linkedin: "Your LinkedIn ID (optional, remove if not needed)" description: "Description" tags: [] date: "2019-11-19" draft: true ---
Below frontmatter, put your blogpost content.
When you finish your writing blogpost, remember to remove draft: true
from frontmatter.
To add a new blogpost manually, create a markdown file in <ROOT DIRECTORY>/landing-pages/site/content/<LANGUAGE VERSION>/blog/<filename>.md
. The filename will also serve as URL for your blogpost.
Then, at the top of the file, add frontmatter in following format:
--- title: "<blogpost title>" linkTitle: "<blogpost link title>" author: "<author's name>" twitter: "<optional - author's Twitter ID>" github: "<optional - author's Github ID>" linkedin: "<optional - author's Linkedin ID>" description: "<short description>" tags: ["<tag1>", "<tag2>", ...] date: <date in YYYY-MM-DD format> ---
Below frontmatter, put your blogpost content.
To add a new case study with pre-filled frontmatter, in <ROOT DIRECTORY>/landing-pages/site
run:
hugo new use-cases/my-use-case.md
That will create a markdown file <ROOT DIRECTORY>/landing-pages/site/content/<LANGUAGE VERSION>/use-cases/my-use-case.md
with following content:
--- title: "My Use Case" linkTitle: "My Use Case" quote: text: "Quote text" author: "Quote's author" logo: "logo-name-in-static-icons-directory.svg" draft: true --- ##### What was the problem? text ##### How did Apache Airflow help to solve this problem? text ##### What are the results? text
When you finish your writing blogpost, remember to remove draft: true
from frontmatter.
To add a new case study manually, create a markdown file in <ROOT DIRECTORY>/landing-pages/site/content/<LANGUAGE VERSION>/use-cases/<filename>.md
. The filename will also serve as URL for the case study.
Then, at the top of the file, add frontmatter in following format:
--- title: "<case study title>" linkTitle: "<case study link title>" quote: text: "<quote text>" author: "<quote author's name>" logo: "<logo filename (with extension)>" ---
Below frontmatter, put your blogpost content in following format:
#### What was the problem? <text> ##### How did Apache Airflow help to solve this problem? <text> #### What are the results? <text>
Important - put the logo file in <ROOT DIRECTORY>/landing-pages/site/usecase-logos/icons/
directory. Then, in the frontmatter, refer to it just by filename.
Example:
Path to logo file: <ROOT DIRECTORY>/landing-pages/site/static/usecase-logos/my-case-study.svg Case study in <ROOT DIRECTORY>/landing-pages/site/content/<LANGUAGE VERSION>/use-cases/my-case-study.md --- title: "<case study title>" linkTitle: "<case study link title>" quote: text: "<quote text>" author: "<quote author's name>" logo: "my-case-study.svg" --- #### What was the problem? <text> ##### How did Apache Airflow help to solve this problem? <text> #### What are the results? <text>
In order to add a new integration, add an entry in <ROOT DIRECTORY>/landing-pages/site/static/integrations.json
file, following the format:
{ "name": "<integration name>", "url": "<url to docs with integration description>", "logo": "/integration-logos/<filename with extension>" }
Integrations are displayed in random order, which might be different on each site reload. To search for your integration, use the search functionality.
Providing an integration logo is optional. However, please take note that integrations with logo are be promoted by being displayed before integrations without a logo.
In order to add an upcoming meetup, find your group in <ROOT DIRECTORY>/landing-pages/site/static/meetups.json
file and put the meetup's date in following format:
MON, JAN 01, 6:00 PM
If your meetup group isn't on the list, add it following the format of existing entries.
To release a new documentation, follow these steps:
In Apache Airflow's website root directory, run:
<WEBSITE ROOT DIRECTORY>/site.sh prepare-theme cd <WEBSITE ROOT DIRECTORY>/sphinx_airflow_template pip install -e .
In Apache Airflow's (not website!) root directory, run:
pip install -e '.[doc]' cd docs/ export GITHUB_VERSION="master" make html
Copy generated files from <APACHE AIRFLOW ROOT DIR>/docs/_build/html
to <WEBSITE ROOT DIRECTORY>/docs-archive/<version>/
Make a commit with generated documentation only.
To generate full website with documentation, run:
<WEBSITE ROOT DIRECTORY>/site.sh build-site