To install locally
git clone https://github.com/jekyll/jekyll-admin && cd jekyll-admin
This will copy down the code and install all Node and Ruby dependencies.
This will run both Node and Ruby tests.
You can run one or the other with
Running Jekyll Admin locally
There is a site in
spec/fixtures/site, with some dummy content. Both local development servers below use that site’s dummy content for development. Feel free to make any changes you’d like, just don’t commit them, unless you’re adding a new fixture (e.g., for a test).
Running a test server with a dummy site
If you just want to click around and see how things work, or if you’re making changes to the Ruby back end side of things, this is probably what you want.
script/buildto compile the static frontend
script/test-serverto start the server
http://localhost:4000/adminin your browser (or
Running the front end server in development mode
This will run the front end server via Node’s development stack, meaning changes will be reloaded on subsequent requests and is generally useful when making changes to the front end side of things. In the background, it’s also going to call
script/test-server for you, so that the front end has an API that it can make calls to.
Note: Node version should be >= v6.0.0
Running installation/test scripts on Windows
You are going to need a Unix-like environment. The best choice would be Git Bash which comes with the Git Windows Installation or MSYS. Try to avoid any POSIX compliant software (e.g. Cygwin) that will get you in trouble.
The environment flag
When developing locally, it can be helpful to see error backtraces, disable template caching, have expanded request logs, and to allow cross-origin requests between the Ruby server and the Node server. By default, however, JekyllAdmin runs in
production mode, meaning these development features are disabled.
To enable the development features, set the environmental variable
development. When enabled, the
/_api/ endpoint will add
Access-Control-Allow-Origin: any headers, and respond to
OPTIONS pre-flight checks. This flag is set automatically when the
script/test-server command is used.