getting started with pelican

27
Pelican for n00bs Static Site Generator Powered by Python

Upload: nazrul-kamaruddin

Post on 20-Feb-2017

41 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Getting Started with Pelican

Pelican for n00bsStatic Site Generator Powered by Python

Page 2: Getting Started with Pelican

Who am i?

@nazrollSoftware Engineer, Sparkline.comOrganizer, Google Developer Groups Kuala Lumpur

Previously: Media Prima Digital (Digital Media & Online Services), Chalkboard (Hyperlocal Ad Network) & a long list of adventures.

Building software for the World Wide Web since 1999.

Page 3: Getting Started with Pelican

Today, we’re going to learn (hopefully)

Why use a static site generator?

Setting up Pelican

Generate your site

Deploy to the World Wide Web

Page 4: Getting Started with Pelican

Why?Warning: Bad Jokes Ahead

Page 5: Getting Started with Pelican

Which one is the best?

Page 6: Getting Started with Pelican

Complex plugins to maintain

Page 7: Getting Started with Pelican

BLOAT LIKE ME

CMS + Plugins = BLOATED!

Page 8: Getting Started with Pelican

Security vulnerabilities

Page 9: Getting Started with Pelican

I am too lazy!Maintain server-side scripting software (PHP,

etc)

Maintain a database and it’s software (MySQL,

etc)

Read other people's code to patch that security

leak.

Page 10: Getting Started with Pelican
Page 11: Getting Started with Pelican
Page 12: Getting Started with Pelican

How?Let’s all pray to the Demo Gods

Page 13: Getting Started with Pelican

Setting up Pelican

Requirements

python. REQUIRED. At least version 2.7.x

pip. REQUIRED. At least version 7.1.x

virtualenv. RECOMMENDED. At least version 13.x

Page 14: Getting Started with Pelican

To maintain sanity, install pelican within a virtual environment!

Page 15: Getting Started with Pelican

# Install Pelicanpip install --no-cache-dir pelican

# feedgenerator# RSS/XML feed generator.

# unidecode# Translate Unicode string to ASCII string

# MarkupSafe# Escape Unicode characters/strings safely for HTML templates.

# docutils# Process text documentation into useable formats like HTML, XML, etc.

# blinker# Object to object broadcasting and signaling

# Markdownpip install --no-cache-dir Markdown

Page 16: Getting Started with Pelican

DemoSetting up Pelican

Page 17: Getting Started with Pelican

DemoGenerate your site

Page 18: Getting Started with Pelican

pelican-quickstart

content/

<empty>

output/

<empty>

develop_server.py

fabfile.py

Makefile

pelicanconf.py

publishconf.py

Page 19: Getting Started with Pelican

# Generate HTML pages

pelican content

# Preview your site build

cd output && python -m pelican.server

# Open a browser and go to http://localhost:8000

Page 20: Getting Started with Pelican

DemoDeploy to the World Wide Web

Page 21: Getting Started with Pelican

Deploy to the World Wide WebFTPSSH

Page 22: Getting Started with Pelican

Deploy to the World Wide Web

Page 23: Getting Started with Pelican

Other Python static site generatorsNikolahttps://getnikola.com/

Hydehttp://hyde.github.io/

Page 24: Getting Started with Pelican

I recommend you to read these!Pelican documentation (like duh!)http://docs.getpelican.com/

Static site with Pelican, Grunt, Travis & Github Pageshttp://goo.gl/B7evGr

Install and deploy a Pelican blog using Fabric - Part 1, 2, 3 & 4http://goo.gl/ACVS1B

Pelican Guide Moving from Wordpress and Initial Setuphttp://goo.gl/QEiOiN

Page 25: Getting Started with Pelican

Bonus read!Host a Static Website on Google Cloud Storagehttps://goo.gl/9HN75X

Google Developer Launchpadhttps://developers.google.com/startups/Get FREE credits & loads of other stuff!

Page 26: Getting Started with Pelican
Page 27: Getting Started with Pelican

Keep in [email protected] / nazroll.com