-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to using template v2.1, not crash, and have better instructions
- Loading branch information
Ludwig Schubert
committed
Oct 9, 2017
1 parent
2dabbba
commit 6e7af1a
Showing
4 changed files
with
470 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
node_modules | ||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`. |
Oops, something went wrong.