This repository contains the files needed to build a copy of the Fluid Project website.
This is not an immediately deployable version of the website - docpad is used to build the site from source files.
-
Install DocPad if it isn't already installed:
sudo npm install -g docpad
-
Get the required node modules:
npm install
-
Edit
docpad.coffee
URL value to reflect your target URL (with no trailing slash). The default value ishttp://localhost:9778
. For local testing and development, you should keep this default value. -
Run docpad from the fluid-website directory
docpad run
. -
Open
http://localhost:9778/
to see the website. Note: you must access the site through the URL defined indocpad.coffee
at Step 3, or you will see a CORS error when loading the icon fonts.
-
Start by working from a clone of the repository you want to deploy to. This step is important, otherwise your output may deploy to the wrong location.
-
Change the
url:
value in the docpad.coffee to match your deployed gh-pages URL. If you intend to deploy to a custom domain, the URL value should match the target URL:url: "www.example.com"
If deploying to gh-pages URL, the URL would look like this:url: "username.github.io/fluidproject.org"
-
Deploy to gh-pages, run:
docpad deploy-ghpages --env static
. By doing this, docpad will generate the site to the remote gh-pages branch.
- Change the
url:
value in the docpad.coffee to match your deployed URL. - Run:
> docpad generate --env static
- Copy the contents of
./out/
directory to your server.
-
Modifications can be done to any source file or directory except for the contents of the
out/
directory. Theout
directory and its contents are not to be versioned since it contains the generated output made by docpad from the source files and are overwritten. -
The 404 error page will only appear when deployed to the root of a gh-pages domain or gh-pages custom domain. It will not appear when deployed locally or when deployed through a gh-pages (sub) project. To test the 404 error page, either load the 404.html directly in a browser, or deploy to the root of a gh-pages domain.
-
There are known issues regarding relative and absolute paths. See FLUID-5588 and FLUID-5570.
The following plugins are used in this website. They a provided here as a reference:
- docpad installed - https://docpad.org/
- docpad handlebars plugin - https://github.com/docpad/docpad-plugin-handlebars/
- moment plugin - https://www.npmjs.org/package/docpad-plugin-moment
- markdown plugin - https://github.com/docpad/docpad-plugin-marked
- stylus plugin - https://www.npmjs.org/package/docpad-plugin-stylus
- eco plugin - https://github.com/docpad/docpad-plugin-eco
- gh-pages plugin - https://github.com/docpad/docpad-plugin-ghpages
- redirector plugin - https://www.npmjs.org/package/docpad-plugin-redirector
The Fluid Project website is available under Creative Commons Attribution License.