diff --git a/.gitignore b/.gitignore index 78d9f35..5f2c920 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ website/content/images/illustrations.ai + +output/ +*.log* diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..566e578 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,20 @@ +language: python + +python: + - "2.7" + +install: + - pip install pelican markdown + - npm install + +script: + - cd website + - pelican -o ../output + - cd ../ + +deploy: + provider: script + script: npm run deploy + skip_cleanup: true + on: + branch: master diff --git a/package.json b/package.json new file mode 100644 index 0000000..a289d4b --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "opentypecookbook", + "author": "Tal Leming (http://typesupply.com)", + "homepage": "http://opentypecookbook.com", + "private": true, + "devDependencies": { + "surge": "0.18.0" + }, + "scripts": { + "predeploy": "echo 'User-agent: *\nDisallow: /' > ./output/robots.txt", + "deploy": "surge ./output opentypecookbook-example.kennethormandy.com" + } +} diff --git a/readme.md b/readme.md index 59c4537..41511b2 100644 --- a/readme.md +++ b/readme.md @@ -1 +1,19 @@ Welcome to The Unofficial OpenType Cookbook. Feel free to peruse this information in its raw state here. But, it's much nicer in its compiled form on [opentypecookbook.com](http://opentypecookbook.com). + +## Getting started + +The OpenType Cookbook website uses [Pelican](http://getpelican.com) as a static site generator, which compiles the source Markdown and theme files into plain HTML, CSS, and JavaScript. This is published to [Surge.sh](https://surge.sh) via [Travis CI](http://travis-ci.org) each time a change is pushed to the `master` branch of this repository on GitHub. + +This means that, if you spot something you’d like to fix, you can open a Pull Request right from GitHub and have the changed merged and published—all without ever needing to run anything locally. + +If you _would_ like to run the project locally yourself: + +1. Run `pip install pelican markdown` with Python 2.7 installed + +2. Edit page content, written using markdown, in the `/content` directory. + +3. Generate the static content into the output directory: ```pelican -r```. The `-r` flag tells pelican to autoregenerate when it detects changes. + +4. Preview the output. From the output directory: `python -m SimpleHTTPServer`. The website can be viewed at [http://localhost:8000](http://localhost:8000). + +More options for publishing and previewing the website can be found in [Pelican's docs](http://docs.getpelican.com/en/3.4.0/publish.html). diff --git a/website/README.md b/website/README.md deleted file mode 100644 index a72cf1c..0000000 --- a/website/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Website README - -The OpenType Cookbook website uses [Pelican](http://getpelican.com) as a static site generator. - -## Quickstart - -1. ```pip install pelican markdown``` - -2. Edit page content, written using markdown, in the `/content` directory. - -3. Generate the static content into the output directory: ```pelican -r```. The -r flag tells pelican to autoregenerate when it detects changes. - -4. Preview the output. From the output directory: ```python -m SimpleHTTPServer```. The website can be viewed at [http://localhost:8000](http://localhost:8000). - -More options for publishing and previewing the website can be found in [Pelican's docs](http://docs.getpelican.com/en/3.4.0/publish.html).