The start of my blogging adventures...

Posted on Thu 21 December 2017 in Python

As I seem to delve deeper into the technology world, I keep making notes of problems I've solved, issues I've discovered and these get stored in so many different places. I thought I should rationalise this, and keep everything in one place, and why not help out someone else at the same time.

So, starting today, I'll try to make notes of problems I've overcome here, for all to see.

Now to find the motivation to keep it up.

So, I've chosen Pelican as a static site system (why, Hyde had not been updated on Github for a couple of years, and Pelican appeared to be quick and easy to setup, and under active development)

So, here's the first post and its to remind me how I went about setting up Pelican to work with Pycharm

  1. Create a new Git repo to keep everything nice and tidy
  2. Create a requirements file containing the items listed in the pelican docs
  3. Create a virtual environment
  4. Install requirements

Lets setup the virtualenv and install

1
2
source venv/bin/activate
pip3 install -r requirements.txt

The next step was to create a directory for content, Pelican appears to keep this for the files required to generate the site

1
2
3
mkdir content
cd content
charm set_up_pelican.md

Now, I stepped ahead and didnt read the instructions properly and so got some errors when I tried to create the site

What I should have done was:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
(venv)  ~/GIT/11eight   master ●✚  pelican-quickstart
Welcome to pelican-quickstart v3.7.1.

This script will help you create a new Pelican-based website.

Please answer the following questions so this script can generate the files
needed by Pelican.


> Where do you want to create your new web site? [.]
> What will be the title of this web site? 11eight.co.uk
> Who will be the author of this web site? Alex Hellier
> What will be the default language of this web site? [en] 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) Y
> How many articles per page do you want? [10] 10
> What is your time zone? [Europe/Paris] GMT
> 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
Error: [Errno 17] File exists: '/Users/alexhellier/GIT/11eight/content'
Error: [Errno 17] File exists: '/Users/alexhellier/GIT/11eight/output'
Done. Your new project is available at /Users/alexhellier/GIT/11eight

Then

1
2
pelican conntent
Done: Processed 1 article, 0 drafts, 0 pages and 0 hidden pages in 0.18 seconds.

Now lets commit the other setup files to our Repo And run the test server to see what the heck we have: