Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jokull/aldin-site
https://github.com/jokull/aldin-site
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jokull/aldin-site
- Owner: jokull
- Created: 2012-05-18T23:16:25.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-09-20T11:08:38.000Z (over 12 years ago)
- Last Synced: 2024-12-17T03:58:28.066Z (15 days ago)
- Language: CoffeeScript
- Size: 824 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This site is built to be statically output and deployable. It is localized for
English and Icelandic.Instead of using a web framework to serve the site I wanted to use only Brunch,
which is a great front end assembler that allows you to code in Stylus,
CoffeeScript, configure the joining of files, compression etc. I'm used to
coding sites in Flask however, and block based templating and localization of
content with gettext was missing. To get the best of both worlds I treat the
asset directory in Brunch as a template folder, and create a site tree for each
language. For this I created jinjet; a command line utility that I hope you find
useful.Quickstart
==========## 1. Bootstrap Brunch
git clone [email protected]/jokull/aldin.git && cd aldin
mkdir node_modules
npm install
brunch watch -sBrunch should now have output the site in `public/`. We still need to compile
each locale.## 2. Install jinjet in a Python environment
mkvirtualenv --distribute jinjet
pip install git+git://github.com/jokull/jinjet.git## 3. Compile localized site trees
jinjet -vv
See [jinjet documentation](https://github.com/jokull/jinjet) for documentation
on updating and compiling translation catalogs, even adding more locales.`/public` folder is deployable. You will want to configure the server to redirect from the root path `/` to `//`, otherwise people will see a bunch of unrendered jinja templates.
This NGiNX config did the trick:
server {
listen 80;
server_name aldin.is;
rewrite ^(.*) http://www.aldin.is$1 permanent;
}server {
listen 80;
server_name www.aldin.is;
location =/ {
rewrite ^ /is/ redirect;
}
location / {
root /web/aldin;
index index.html;
expires -1d;
}
}