This repository stores the content and code that generates the openFrameworks website.
To contribute, fork the repository and download to your local machine. You'll need to install Python, lxml and blogofile 0.8b1:
easy_install lxml
easy_install blogofile
To generate and view the site locally, you have to run:
blogofile build
blogofile serve
And access the local site in http://localhost:8080/
You can start editing pages right away. In order to see your changes on your local version you'll have always have to run build & serve before.
There's a thorough description of the installation procedure on OS X in the Contributing to the Documentation tutorial.
You can install blogofile from the Debian (Jessie) repositories by running
sudo sudo apt-get install -y blogofile python-lxml
You can also install it by downloading the package from the project's page. Then inside the blogofile folder run (as root)
python setup.py install
Your may also need to install asciidoc
aptitude install build-essential gcc python-dev libxslt1-dev git python-setuptools python-pip
easy_install lxml
git clone https://github.com/EnigmaCurry/blogofile
cd blogofile
python setup.py install
cd ..
git clone https://github.com/openframeworks/ofSite.git
blogofile build
blogofile serve
The documentation portion of the site is written in Markdown, a wiki-style syntax. See details on Daringfireball.
The easiest way to check the syntax is having a look at the many pages already on the site, but here are some useful tips:
To insert code snippets use four tildes followed by curly braces with ".cpp" inside, and ending with four tildes:
~~~~{.cpp}
for(int i = 0; i < 16; i++) {
ofLog() << i;
}
~~~~
Images are added using normal markdown format:
![Image Title](filename.png "alt text")
For a more complete description of how to contribute documentation, please see the Contributing to the Documentation tutorial.
An alternative to running blogofile locally is to use a Markdown editor that can show you a rendering as you work.
- Mac OSX: Mou (OSX 10.7) or MarkEdit (OSX 10.6+)
- Windows: MarkdownPad
- Linux: Writr, ReText, & the gedit-markdown plugin
- Online: Dillinger
Note: The website utilizes some additions to Markdown itself, so specialized functions such as code syntax highlighting may not be available in the editor, even though it will work fine on the site.
add export LC_ALL=en_US.UTF-8
, export LANG=en_US.UTF-8
to bash_profile
with ubuntu, edit .profile
, not .bash_profile
sudo nano ~/.bash_profile
add code below
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
this is because python related issue
edit _config.py, and add code below:
...
import inspect, os
import sys # add this line
reload(sys) # add this line
sys.setdefaultencoding('utf-8') # add this line
olderVersion = "0.8.4"
...