Permalink
Browse files

Merge pull request #49 from inkybutton/develop

Update build instructions
  • Loading branch information...
inkybutton committed Sep 4, 2017
2 parents 6d5a209 + 2159232 commit 5814863146d5bd63c54f1513754e910091a03821
Showing with 26 additions and 25 deletions.
  1. +26 −25 README.md
View
@@ -12,60 +12,61 @@ Dependencies
* bower (installed through npm)
* grunt-cli (installed through npm)
* virtualenv
* SVN (for building the API documentation)
* make
* doxygen
The project also depends on packages from npm, bower and pip.
The project also depends on packages from npm, bower, pip, as well as projects from GitHub.
Building the website
--------------------
1. Install the dependencies from your system's packaging manager. For example, in Debian jessie:
1. Install dependencies from your system's packaging manager. In Ubuntu 16.04 or Debian jessie, run this:
```
sudo apt-get install git python nodejs npm virtualenv make
sudo apt-get install git python nodejs npm virtualenv make doxygen
sudo npm -g install bower
sudo npm -g install grunt-cli
```
If you are using Ubuntu, please also install nodejs-legacy:
```
sudo apt-get install nodejs-legacy
```
These commands require superuser privilege. Please ask your local IT administrator for help if necessary.
In the future a Guix package script may be provided to take care of the installation.
2. Clone this repository.
2. Clone this repository:
```
git clone https://github.com/OpenCMISS/website
```
3. Enter the repository folder. Download OpenCMISS documentation (https://github.com/OpenCMISS/documentation) and place it into the website repository.
3. Download projects the website depends on:
```
cd website/
git submodule update --init
git clone -b master https://github.com/OpenCMISS/documentation doc/latest/
```
This is temporary and it will be automated as part of the build process.
4. Install npm and bower packages and do a build:
4. Do a build:
Run the following. Replace [URL] with the root of where this site will be hosted, e.g. "next.opencmiss.org". This is used for generating a sitemap for the website.
```
SITE_URL=[URL] make
```
NOTE - The first time the script is run, you may run into this prompt:
```
Error validating server certificate for 'https://...':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
Certificate information:
- Hostname: ...
- Valid: from ... until ...
- Issuer: ...
- Fingerprint: ...
(R)eject, accept (t)emporarily or accept (p)ermanently?
```
5. The built website is now available in `build/dist/`. Serve with your favourite web server.
This is because during the API documentation build, we need to fetch the Zinc library source from Physiome Project's SVN server. The SVN server uses an SSL certificate that isn't recognised. Please verify the certificate, and if it's correct, accept it Permanently to store it.
Editing the website interactively
--------------------
The build script also supports an interactive editing mode, which allows you to edit the source of the website and see the changes in a browser. To run the build script in this way, do steps 1 to 3 outlined in Building the website section above. Then, run
5. The built website is now available in `build/dist/`. Serve with your favourite web server.
```
SITE_URL=[URL] make debug
```
After building, the build script will automatically launch a Web browser window showing the built website. It's also available by visiting http://localhost:9000 in any Web browser. When you change the source code and save it to disk, the script will rebuild the website, and the browser window will be automatically reloaded to reflect the changes.

0 comments on commit 5814863

Please sign in to comment.