A well designed project page is a powerful way to get your open source project publicity. Some examples are Pow, Backbone.js and Vows. Propaganda's goal is to make generating these sites easily from a README file written in markdown.
Try it out online.
You can install propaganda using npm
npm install propaganda
After propaganda is installed vist the Pygments homepage to install pygmentize
.
The basic usage is as easy as it gets.
propaganda README
This will output an index.html
file. This file should have all the CSS embedded in the HTML, so all you need to deploy is that file.
index.html
should look something like this:
While that does look nice we can use propaganda to make it look better. Let's add a header to our page using the --header
flag. (Note: -h
is an alias for --header
)
propaganda README --header
Pretty good, but we can do better. Let's add the first paragraph to our header as well and add a link to the project's github page. We can adjust what content is inside the header by passing a jQuery selector to the --header
option. By default, the header option's selector is h1:first
. To add a link to our github page we can add a "block". You can add as many blocks as you want by adding a --blk
option to the command (Note: just like -h
is aliased to --header
, -b
is aliased to --blk
)
propaganda README --header "h1:first, p:first" \
--blk "<a href='http://github.com/benmills/robotskirt'>Code on Github</a>"
Great! Now lets add a footer. We can use the --footer
option to add a footer to our page (or, you guessed it, -f
). Like the --header
command we can pass a jQuery selector to the --footer
option, but for the footer option the selector defines the first element of the footer, all elements after it will be added to the footer.
The footer option defaults to the last h2
.
propaganda README --footer
We can add a jQuery selector to match the second to last h2
to add a little bit more content to the footer.
propaganda README --footer "h2:eq(2)"