Added npm commands for easy building, updated readme
This commit is contained in:
parent
f06312b0af
commit
8cd22e5ebf
12
README.md
12
README.md
@ -5,13 +5,15 @@ This is the code behind timstallard.me.uk, which is built using Docpad.
|
|||||||
### To run:
|
### To run:
|
||||||
1. You'll need Node and npm to be installed
|
1. You'll need Node and npm to be installed
|
||||||
2. Install dependencies, by running `npm i`
|
2. Install dependencies, by running `npm i`
|
||||||
3. Automagically compile the site and run a web server using `docpad run`
|
3. Automagically compile the site and run a web server using `npm run run`
|
||||||
(note: you'll need to use `docpad.cmd` on Windows, due to an bug, since a plain js docpad config file is being used, rather than coffeescript)
|
|
||||||
|
You'll need to use `docpad.cmd` instead of `docpad` on Windows, due to an bug, since a plain js docpad config file is being used, rather than coffeescript.
|
||||||
|
With the `npm run` commands, simply append `-win` to the command name to reference `docpad.cmd`.
|
||||||
|
|
||||||
|
|
||||||
### To compile the site for deployment:
|
### To compile the site for deployment:
|
||||||
1. Run `docpad clean` to remove dev files
|
1. Run `npm run build` to remove existing files from development, and to generate the site in the correct mode
|
||||||
2. Run `docpad generate --env=static`
|
2. Copy contactsubmit/conf.example.php to contactsubmit/conf.php, and update options as required
|
||||||
3. Copy contactsubmit/conf.example.php to contactsubmit/conf.php, and update options as required
|
|
||||||
|
|
||||||
### Setting up commenting system
|
### Setting up commenting system
|
||||||
1. These instructions are written for systemd-based Ubuntu, but should work fine on Debian as well. For security reasons, the installation of isso should be done under another user account - I made an account called isso.
|
1. These instructions are written for systemd-based Ubuntu, but should work fine on Debian as well. For security reasons, the installation of isso should be done under another user account - I made an account called isso.
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
},
|
},
|
||||||
"main": "node_modules/.bin/docpad-server",
|
"main": "node_modules/.bin/docpad-server",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node_modules/.bin/docpad-server"
|
"run": "docpad run",
|
||||||
|
"run-win": "docpad.cmd run",
|
||||||
|
"build": "docpad clean && docpad generate --env=static",
|
||||||
|
"build-win": "docpad.cmd clean && docpad.cmd generate --env=static"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user