introduction to pelican

Download Introduction to Pelican

If you can't read please download the document

Upload: chengjen-lee

Post on 27-Jun-2015

728 views

Category:

Technology


0 download

TRANSCRIPT

  • 1. Introduction to PelicanInternship @ Academia SinicaReport #3Presenter: Cheng-Jen Lee (Sol)Email: cjlee AT iis.sinica.edu.twThis work is licensed under aCreative Commons Attribution-ShareAlike 3.0 Taiwan License.

2. Agenda Pelican Installation UsageOct 13, 2014 2 3. Pelican What is Pelican? A static site generator convert reStructuredText (or Markdown,AsciiDoc) formats to HTML Easy to host anywhereOct 13, 2014 3 4. Pelican Installation $ sudo mkdir -p /usr/lib/pelican $ sudo chown `whoami` /usr/lib/pelican $ virtualenv --no-site-packages /usr/lib/pelican $ . /usr/lib/pelican/bin/activate $ pip install -egit://github.com/getpelican/pelican#egg=pelican $ pelican-quickstartOct 13, 2014 4 5. Pelican Usage Folder structure Accept reStructuredText and Markdown Folders (under ./content) as CategoriesOct 13, 2014 5 6. Pelican A reStructuredText pageMy super title##############:date: 2010-10-03 10:20:tags: thats, awesome:category: yeah:slug: my-super-post:author: Alexis Metaireau:summary: Short version forindex and feedsThis is the content of my superblog post. A Markdown pageTitle: My super titleDate: 2010-12-03 10:20Category: PythonTags: pelican, publishingSlug: my-super-postAuthor: Alexis MetaireauSummary: Short version forindex and feedsThis is the content of my superblog post.Oct 13, 2014 6 7. Pelican For static files (images, docs...etc) Create folders in ./content (ex. Images, files) ./pelicanconf.py Add STATIC_PATHS = ['images', 'files'] Generate HTML make html HTML files will be saved in ./outputOct 13, 2014 7 8. Thanks for your attention!Any Q?Oct 13, 2014 8