commit | e71e29f303987186702dc4fd28f98fc36d6b89f0 | [log] [tgz] |
---|---|---|
author | sashadt <sasha@datatorrent.com> | Tue Nov 24 13:43:37 2015 -0800 |
committer | sashadt <sasha@datatorrent.com> | Tue Nov 24 13:43:37 2015 -0800 |
tree | 613ae20f77374c169710e39730f5e85fc5f9f43b | |
parent | a98581e4e2cdb30c8647a22ee4f168d1d0eb81f6 [diff] |
Updating announcements page
This is the source code for the Apache Apex Incubator website, hosted at apex.incubator.apache.org. The following tools are used to build the html pages:
The master branch of this repo contains the source files that are used to generate the HTML that ultimately gets pushed to the incubator site. The asf-site
branch is where the actual generated files are stored. Note that this branch must contain exactly one folder called content
, and so has been checked out as an orphan branch with its own commit history apart from the master branch. See the Contributing section below.
Through a gitpubsub mechanism on the apache.org server, files are taken from the asf-branch
and pushed to the live server.
Pages are stored in the src/pages
folder. Each page uses the handlebars templating engine, and should look something like this:
{{> header}} <!-- includes the header.handlebars partial --> <h1>Hello World</h1> <p>I am a page.</p> {{> footer}} <!-- includes the footer.handlebars partial -->
All pages on the site share the same header and footer. These are stored in the src/partials
folder. You can put other partials in here and they will be made available to all templates (the .handlebars
extension is dropped).
If you have a block of content that you would like to render from a markdown file, you can do so by creating a .md
file in the src/md/
folder. These .md
files will be picked up, rendered has html, and exposed to page templates as partials. Assuming you have a file called src/md/example_markdown.md
, you could have this in a page template:
{{> header}} <h1>Page with Injected Markdown</h1> {{> example_markdown}} {{> footer}}
If you would like to make a change to the site:
master
If you are a committer, do the following:
build.sh
from the master branch directory (requires nodejs and npm). This will:asf-site
branch with a new commit of the build from the current branchasf-site
branch. Simply push this branch to the asf remote and the site will automatically be updated within seconds.First, install dependencies:
npm install ./node_modules/.bin/bower install
Note: If you have a version of node earlier than 4, run the following command:
npm install jsdom@3.1.2
To test changes:
.md
, .html
, and .less
files./node_modules/.bin/gulp
. This creates a content
folderOne way to improve this process is to run ./node_modules/.bin/gulp watch
. This will start a process that watches for changes to source files and updates the /content
folder accordingly. This way you make your change and refresh the page to see the effect immediately.
The downloads page uses the content of ./releases.json
to populate the tables found there. Care has been taken to automatically generate this releases.json file. To do so, run:
./node_modules/.bin/gulp fetch-releases git add releases.json git commit -m 'updated releases'
This will do the following things:
Once you have committed the changes to releases.json
, follow the steps to contributing steps to publish the site to go live.