Skip to content

Commit

Permalink
Update to using template v2.1, not crash, and have better instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludwig Schubert committed Oct 9, 2017
1 parent 2dabbba commit 6e7af1a
Show file tree
Hide file tree
Showing 4 changed files with 470 additions and 153 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
public
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# drafts
Pipeline / glue code for drafts.distill.pub

## how to publish sth.
## How to publish articles

- Run `npm install` to get teh firebase client.
### Setup
- Run `npm install` to get the firebase client and the distill pre-render script.
- Log in using `firebase login`.
- Ensure the project is linking to a current version of template v2.
(Either by manually building and shipping it, or by linking https://distill.pub/template.v2.js)
(Firebase uses private Gmail or your Google.com account, depending on whether you're Chris Olah or anyone else respectively.)

### Bring article up-to-date
- Ensure the project is linking to a current development version of template v2. You can use the version that we include as a dependency here (at `./node_modules/distill-template/dist/template.v2.js`) or build one from source.
- When upgrading from v1 you may need to manually rename tags and reorganize parts of the document.
(For example, `<dt-` -> `<d-`, `</dt-` -> `</d-`, Bibliography and Front Matter need to be Bibtex and JSON tags, etc. Ludwig will write up a transition guide soon.)

### Pre-render article
- Copy article files into a subfolder of `public`.
- Build article.
- Rename build `index.html` to `index_raw.html`
(Usually `(cd public/<project> && npm run build)`, but may depend on article dev setup.)
- Rename build `index.html` to `index_raw.html`.
(Can use `mv public/<project>/index.html public/<project>/index_raw.html`).
- Use Pipeline to pre-render article:
`../template/bin/render -i public/index_raw.html > public/index.html`
- Copy pre-rendered article build files into a subfolder of `public`.
`./node_modules/bin/distill-render -i public/<project>/index_raw.html -o public/<project>/index.html`

### Deploy
- Deploy using `firebase deploy`.
Loading

0 comments on commit 6e7af1a

Please sign in to comment.