Giter Club home page Giter Club logo

pelicanyan's Introduction

Pelicanyan

Pelicanyan brings Jekyll's Lanyon Theme to Pelican and adds some Pelican niceties including a sitemap.xml, robots.txt, humans.txt, etc.

More information about the lanyon theme including screenshots and such is best found over at the Lanyon Repo. Here's a sample:

Lanyon

Usage

Assumes you've already got your blog created and have cloned this repo.

  1. Download poole.css, lanyon.css, and syntax.css from the Lanyon repo and save into the static/css directory
  2. Set basic theme-specific settings in your blog's pelicanconf.py:
    • THEME='path-to-cloned-repo'
    • GA_ACCOUNT (your GA account id, e.g., 'UA-12344321-1') assuming you'd like GA enabled (see base.html)
    • TWITTER_ACCOUNT (e.g., your twitter account name without the @)
    • DIRECT_TEMPLATES = ('index', 'categories', 'authors', 'archives', 'sitemap', 'robots', 'humans')
    • ROBOTS_SAVE_AS = 'robots.txt'
    • HUMANS_SAVE_AS = 'humans.txt'
    • SITEMAP_SAVE_AS = 'sitemap.xml'
    • DEFAULT_LANG = 'en'
    • DATE_FORMATS = { 'en': '%B %d, %Y', }
    • STATIC_PATHS = ['images', 'favicon.ico'] note: this assumes your blog's article images are located in content/images/ and your favicon.ico is located in content/
    • (Additional Required Fields) AUTHOR, SITENAME, SITEURL
    • (Optional) TYPOGRIFY=True (and pip3 install it of course)
    • (Optional) Set SITEDESCRIPTION
    • (Optional) Set your LINKS
  3. Add your profile photo - Replace the 400x400 PNG located at static/img/profile.png with your own

Then to try it out locally, back in your blog's directory:

$ make clean && make devserver && open http://localhost:8000

Compatability & Caveats

Pelicanyan's probably best considered alpha at this time and hasn't undergone much testing - would welcome help finding & fixing bugs and also with the browser compatability matrix! While it's likely that Lanyon's options - e.g., reversing the layout, updating color scheme, etc. - remain functional here, these haven't been tested either.

Author

Thomas Willey

License

Open sourced under the MIT license.

Example Quickstart

$ mkdir sample_blog && cd sample_blog/
$ python3 -m virtualenv --no-site-packages --distribute venv
$ source venv/bin/activate
$ pip3 install pelican markdown typogrify
$ pelican-quickstart
  Where do you want to create your new web site? [.]
  What will be the title of this web site? sample blog
  Who will be the author of this web site? me
  What will be the default language of this web site? [en]
  Do you want to specify a URL prefix? e.g., http://example.com
  (Y/n) n
  Do you want to enable article pagination? (Y/n) n
  Do you want to generate a Fabfile/Makefile to automate
  generation and publishing? (Y/n) Y
  Do you want an auto-reload & simpleHTTP script to assist with theme
  and site development? (Y/n) Y
  Do you want to upload your website using FTP? (y/N) n
  Do you want to upload your website using SSH? (y/N) n
  Do you want to upload your website using Dropbox? (y/N) n
  Do you want to upload your website using S3? (y/N) n
  Do you want to upload your website using Rackspace Cloud Files?
  (y/N) n
  Do you want to upload your website using GitHub Pages? (y/N) n
  Done. Your new project is available at /xyz/sample_blog
$ git clone https://github.com/thomaswilley/pelicanyan.git
$ vim pelicanconf.py

Append the following to pelicanconf.py:

THEME = 'pelicanyan'
GA_ACCOUNT = 'UA-12344321-1'
TWITTER_ACCOUNT = 'getpelican'
DIRECT_TEMPLATES = ('index', 'categories', 'authors', 'archives', 'sitemap', 'robots', 'humans')
ROBOTS_SAVE_AS = 'robots.txt'
HUMANS_SAVE_AS = 'humans.txt'
SITEMAP_SAVE_AS = 'sitemap.xml'
DEFAULT_LANG = 'en'
DATE_FORMATS = { 'en': '%B %d, %Y', }
STATIC_PATHS = ['images', 'favicon.ico']
SITEDESCRIPTION = 'sample blog'
TYPOGRIFY=True
$ cd pelicanyan/static/css/
$ wget https://raw.githubusercontent.com/poole/lanyon/master/public/css/lanyon.css
$ wget https://raw.githubusercontent.com/poole/lanyon/master/public/css/poole.css
$ wget https://raw.githubusercontent.com/poole/lanyon/master/public/css/syntax.css
$ cd ../../../

(back in /xyz/sample_blog)

$ make clean && make html && make serve
$ open http://localhost:8000

pelicanyan's People

Contributors

amirouche avatar dhimmel avatar thomaswilley avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.