GithubHelp home page GithubHelp logo

shakiestnerd / pelicanarticlegenerator Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 188 KB

A small utility to generate blog article templates in markdown or restructured text format that meet the Pelican Static Site requirements.

License: MIT License

Python 96.03% Makefile 1.82% Batchfile 2.15%
pelican python markdown restructured-text article-stubs

pelicanarticlegenerator's Introduction

Pelican Article Generator

This application creates article stubs for writing blog posts using Pelican.

Pelican is a static website generator.

This application has reached the point where I am using it to generate article stubs for my blog.

Documentation for Article Generator can be found at Read the Docs.

What it does

You run article.py, fill in a few fields on the form, click the "Create" button. This creates an empty article file you can use to write your blog post.

Application

This allows you to write out several article stubs and once, saving you time and helping you to plan your content more effectively.

Assumptions and Conventions

Categories

  1. You are using the Pelican static site generator.
  2. Article categories are folder names inside the content folder.
  3. The folders 'images', 'pages', and 'static', if found in your content folder, are ignored and not considered categories.

Files

Article files are named with the following format:

YYYY-MM-DD-document-title-separated-by-dashes

Example: 2009-10-14-sugary-pecans-or-walnuts.md

Files are saved with these extensions:

  • md: Markdown file
  • rst: Restructured text file

Article

Once an article is created, simply open the article in your favorite text editor and replace the "Insert article here" with your own amazing prose.

Sample Markdown Article:

---

Title: Sample Article
Date: 2020-02-21
Category: Technology
Tags: python
Author: shakiestnerd
Status: draft
Summary:
---Insert article here.

Notes

To start the development virtual environment, use:

source venv\bin\activate

Note to self:

Look into using Versioneer to maintain the current version

Documentation

Stored in docs folder.

See Carol Willing talk from Pycon 2018

Commands:

make clean
make build

python3 -m http.server

Open http://localhost:8000/docs/build/html/index.html

To use markdown, use recommonmark

import recommonmark.Parser

# Add a source file parser for markdown
source_parsers = {
    '.md': 'recommonmark.parser.CommonMarkParser'
}

# Add type of source files
source_suffix = ['.rst', '.md']

Also using the "sphinx_rtd_theme" theme. See Read the Docs for information.

Thank you

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.