Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds automatic build via Travis and Surge.sh #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@

website/content/images/illustrations.ai

output/
*.log*
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
18 changes: 18 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -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).
15 changes: 0 additions & 15 deletions website/README.md

This file was deleted.