Grappling with Pelican

What should have been a walk in the park..

.. if the park was a sniper infested wasteland or to put it in more mundane terms:

I learnt a lot from my mistakes.

1. Make sure all the modules are installed.

Jinja2==2.7.2
Markdown==2.4
MarkupSafe==0.18
Pillow==2.3.0
Pygments==1.6
Unidecode==0.04.14
argparse==1.1
beautifulsoup4==4.3.2
blinker==1.3
cssmin==0.2.0
cssprefixer==1.4.1
cssutils==1.0
docutils==0.11
feedgenerator==1.7
pelican==3.3
pretty==0.1
pytz==2013.9
six==1.5.2
smartypants==1.8.3
typogrify==2.0.4
webassets==0.9

Note: you don't necessarily need typogrify, beautifulsoup4 or Pillow, but a lot of blogs recommend them.

I spent an hour getting the following message

[12] 13:50:06--> make html
pelican /Users/stephen/blog/content -o /Users/stephen/blog/output -s /Users/stephen/blog/pelicanconf.py 
WARNING: No valid files found in content.
Done: Processed 0 articles and 0 pages in 0.11 seconds.

Why? b/c I did not have the markdown module, installed, so my markdown blog posts in "/Users/stephen/blog/content" were not even being looked at! ... so simple in hindsight

Problem: trying to install the python library lxml and I get the error:

#include "libxml/xmlversion.h"
        ^
1 error generated.
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Cleaning up...
Command /Users/stephen/pelican/bin/python3 -c "import setuptools, tokenize;__file__='/Users/stephen/pelican/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kvgifudn-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/stephen/pelican/include/site/python3.4 failed with error code 1 in /Users/stephen/pelican/build/lxml
Storing debug log for failure in /Users/stephen/.pip/pip.log

Solution: install X-Code command line tools

19:40:12--> xcode-select --install

thanks to Stack Overflow

2 Read the documentation

I was running the "make html" command to generate my new blog posts and I got this:

[84] 14:44:40--> make html
make: *** No rule to make target `html'.  Stop.

Why? b/c you must run the make command in the blog directory! or it won't work!

[stephen@macmini] Sun Mar 09 /users/stephen/blog 
[7] 14:59:39--> make html
pelican /Users/stephen/blog/content -o /Users/stephen/blog/output -s /Users/stephen/blog/pelicanconf.py 
Done: Processed 2 articles and 0 pages in 0.31 seconds.

Bingo! ... it works