Mercurial > hg-website
diff README @ 397:29d4b5e45423
Use flask to render site and get rid of submodules
We don't want to use statically generated html files anymore. We are using
flask to do the routing and render the templates for now. This means we also
get rid of the submoduels and put everything together in templates/.
author | David Soria Parra <davidsp@fb.com> |
---|---|
date | Fri, 07 Mar 2014 14:47:13 -0800 |
parents | dfc40e532bb6 |
children | c838aca30aea |
line wrap: on
line diff
--- a/README Mon Feb 11 14:05:01 2013 +0100 +++ b/README Fri Mar 07 14:47:13 2014 -0800 @@ -3,53 +3,21 @@ hg-website ========== -This is a fork of the original hg-scm.org website. It has two goals: - -* Instead of using Django to serve the site, use Blatter to generate a static version which can then be served by a normal webserver like Apache or nginx. -* Move all the content into a subrepository so volunteers can just clone that repository if they just want to edit the content. - -Repository ---------- -The repository is split into three subrepositories. The `main` repository contains -scripts and templates to render the page. The `content` repository contains the -content of each page and defines the structure of the website. The `rendered` -repository contains the auto-generated pages. - -If you want to help out with patches, you usually just edit hg-website and hg-website-content -and generate the rendered pages using blatter (or leave that tasks for the -maintainer). +This is the Mercurial website. It uses the microframework flask to serve +jinja2 templates. Setup ----- -To use this version of hg-website you need to install a few things: - -Blatter's prerequisites: - - easy_install jinja2 - easy_install werkzeug +To use this version of hg-website you need to install flask. -My patched version of blatter (adds the ability to ignore files and add custom Jinja2 filters): - - hg clone http://bitbucket.org/sjl/blatter/ - cd blatter - python setup.py install - -The python-markdown module (for rendering the website content): - - easy_install markdown + pip install flsak Usage ----- -To have blatter serve the page dynamically, use: - - blatter serve - -You can then visit [http://localhost:8008](http://localhost:8008) to view the site. +To have flask serve the page, use: -To render a static version of the site into the `rendered/` directory: + python run.py - blatter blat - -For more information on using blatter, check the README file at [http://bitbucket.org/sjl/blatter/src/](http://bitbucket.org/sjl/blatter/src/) +You can then visit [http://localhost:5000](http://localhost:5000) to view the site.