Socrates

A simple static site generator
Download

Socrates Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Publisher Name:
  • Honza Pokorny
  • Publisher web site:
  • http://honza.ca

Socrates Tags


Socrates Description

A simple static site generator Socrates is a simple static site generator geared towards blogs. You write your posts in your favorite plain text to HTML language (e.g. Markdown, textile) and save them as text files on your harddrive. Socrates then takes them, and creates a full HTML site for you. For free, you will get a home page which lists latest posts, single post pages, category pages, archive pages, an about page and an atom feed.UsageFirst, you need to create a new blog:socrates -i blogThis will create a blog directory with a simple blog structure:blog posts 2010-your-post.md layout index.html single.html category.html ... media style.css config.yaml about.mdThe posts directory is where you will place your posts files. Anything prefixed with _ or . will be ignored. layout is your basic theme or a template. config.yaml is a site-wide configuration file. Don't forget to update the about file with relevant information.You can also create a new blog in the current working directory:socrates -iWhen you are ready to generate your site, you run:socrates -g blogOr,socrates -gfor current directory.This will place all the generated files in blog/deploy. You can then take that directory and upload it to your server.InstallationFirst, set up your virtual environment and pip install Socrates.virtualenv env --no-site-packagessource env/bin/activatepip install socratesOr, to get the latest code, you can install from Github.pip install -e git://github.com/honza/socrates.git#egg=socratesThe next step is to install your templates. At the moment, you can choose between Django templates and Jinja2 templates. The default theme uses Django.ThemesSocrates supports Django templates and Jinja2 templates. You can specify which templating engine you wish to use in the config.yaml file. There are two basic themes in the themes directory to get you started.Text to HTMLSocrates will attemp to convert your text files into HTML using a text processor. You should specify the name of the text processor in config.yaml. It should be all lowercase. Currently supported processors:- Markdown- Textile- reStructuredText- HTML (unmodified text)By default, Socrates only installs the Markdown text processors. You can install the others with pip:pip install textilepip install docutilsDevelopmentYou can start a simple development server to aid you in development.:socrates -r blogOr,socrates -rfor current directory.DocumentationThe documentation is contained within the docs directory and is written in reStructuredText using Sphinx. The documentation is easily read in a standard text editor. However, you can build an HTML version like so:pip install sphinxcd docs/make htmlopen _build/html/index.htmlOr, you can view the online version of the latest documentation.


Socrates Related Software