Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local website builds #44

Open
rondiplomatico opened this issue Jan 18, 2016 · 3 comments
Open

Local website builds #44

rondiplomatico opened this issue Jan 18, 2016 · 3 comments

Comments

@rondiplomatico
Copy link
Contributor

building the website is not possible without root access to abi machines - there should be an easy way to do that. its way too tiresome (and also wrong) to commit changes and wait for the post-commit hook to see what crap you just produced. i've tried a simple local sphinx invocation - but the gruntfile seems to establish an extra directory and copy stuff there. while that might be fine for website builds, a direct call like sphinx-build <root_ws_dir> -o html should be possible somehow.

@inkybutton
Copy link
Contributor

@rondiplomatico You can generate a copy of the website using Grunt locally by following these instructions here: https://github.com/OpenCMISS/documentation/blob/develop/_web/README.md .

Longer explanation for this: currently, Grunt (JS task runner) is responsible for generating a Sphinx theme - this includes compiling stylesheets, minifying scripts, etc. It will then copy the theme to the right place and invoke Spihnx. Without generating these files first Sphinx would not be able to generate a proper output (will have lots of missing resources, etc.)

@rondiplomatico
Copy link
Contributor Author

well, i know .. but it requires root/sudo rights. they dont work (at least on my abi machine/account)
i for once cannot execute

sudo npm -g install bower
sudo npm -g install grunt-cli

thats the reason i thought a sphinx-only invocation would be good to have.

@inkybutton
Copy link
Contributor

You could ask your friendly local sysadmin to run those commands for you. But failing that, those can be installed locally rather than system-wide. You will need to slightly modify the build script to refer to those local binaries though.

  1. At Step 3 after you have cloned the repository and gone into the _web directory, run

    npm install bower
    npm install grunt-cli

    Those tools are now installed in _web/node_modules/bower/ and _web/node_modules/grunt-cli.

  2. Change references to bower and grunt-cli in _web/Makefile to point to these locally installed binaries.

    Search and replace:

    • "bower" to "node_modules/bower/bin/bower"
    • "grunt" to "node_modules/grunt-cli/bin/grunt"
  3. Then run "make debug" in _web to start a reloading server. You can then view the site on localhost:9000. When a source file changes it will rebuild the site and reload any browser tabs with the site open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants