Package: fatafat
Fatafat is a minimalistic static blog generator written in Python. It is
also an offline blogging tool withsimpleandquickpublishing
options.With Fatafat you can …Write blog articles in Markdown.Publish an article to a remote host (currently Github) using a single
command.Test changes to blog theme, blog articles in a localdevversion of
your blog.Focus more on writing!InstallationTo install fatafat, simply:$ pip install fatafatPrerequisitesGitMake sure thatgitis installed.Generate ssh keysCurrentlyGithubis the only remote host
which is supported. To publish to Github from command line, you will
need to setup your ssh keys. Read detailshere.Create empty Github projectFatafat pushes to the repositorygithub_username.github.io. Make sure
that the empty repository (DO NOT create the readme or the .gitignore
files) is created before you use Fatafat.Why the name “Fatafat”?I say why not! “Fatafat” means “quick” in Hindi.Found issues?Currently, Fatafat is a “toddler” project and barely stands! But I have
honest plans for it. I am developing it actively and using it for my ownblog.Incase you run into issues, pleaselogthe same.If you find the project useful, why not look into the issues yourself
and send pull requests!UsageCommand Line InterfaceWhen installed,fatafatcommand is available for use. This command
can be used to perform various actions on the blog. Runfatafat--helpfor details. To get help on individual action, runfatafat <action>--help. Note that thefatafatcommand must be
run at the root of the directory which contains your blog.Thischeatsheetlists all possible actions that can be
performed using thefatafatcommand.Creating a new blogFirst create the empty Github repositorygithub_username.github.io.To create a new blog inbubblewrapdirectory:$ mkdir bubblewrap
$ cd bubblewrap
$ fatafat startThestartoption prompts the user for blog configuration details.
The following details are requested:blog title - title of your blogproduction URL - remote URL of your blog. Eg.http://isubuz.github.iodevelopment URL - local URL of your blog. Eg.http://localhost:8000github usernamedisqus sitenameOnce done, the following directories will be created:bubblewrap
|-- contents
|-- prod
|-- devAll articles go into thecontentsdirectory. The directory structure
forprodanddevis same and stores the production version and
the development version of the blog.|-- config.py           # blog configuration file
|-- data                # blog data files
|-- site                # static output
|   |-- README.md
|   |-- articles        # generated HTML files for articles
|   |-- assets          # css, js files
|-- themes
|   |-- simi
|   |   |-- assets      # css, js files
|   |   |-- templates   # jinja2 templatesThere are few important differences between thedevand theproddirectory.config.pyin both directories are setup such that the URLs
generated in the static output is correct i.e. local URL fordevand remote URL forprod. This helps because you can runpython-mSimpleHTTPServerindev/siteorprod/siteto
see and navigate through the changes you made to your blogsitedirectory inprodis agitrepository.Add a new articleTo add a new article, simply create a new file with.mdextension
undercontents. Articles belonging to a common theme can be grouped
in a directory. E.g.$ cd bubblewrap
$ vim contents/loner.md
$ vim contents/python/meta_what.md
$ vim contents/python/why_should_i_decorate.mdEach article has associated metadata, some required and some optional.
The metadata starts from the first line of the document and is separated
from the article content by a blank line.E.g.contents/loner.mdcan look like -Title: I am a lonely article
Summary: My story
Date: 27-07-1983
Status: draft

I am lonely, because I am at the root!TitleandDatearerequired. CurrentlyDatemust be inDD-MM-YYYYformat. Support for other formats could be added later.SummaryandStatusare optional. IfStatusis absent, the
article is considered to be published.Publish article(s)To publish an article,cdto the root of the blog directory and runfatafat publish-f<rel_path_to_article>in terminal. E.g -$ cd <path_to_blog>
$ fatafat publish -f contents/loner.mdThat’s it!The above command will update the local development blog only. To update
the production blog specify option--prod. To push the changes to
Github, specify option--sync. Seecheatsheetfor
more details.$ cd <path_to_blog>
$ fatafat publish -f contents/loner.md --prod --syncTo publish more than one article, pass the relative paths of the all the
articles to thefatafat publish-fcommand. E.g -$ cd <path_to_blog>
$ fatafat publish -f contents/loner.md contents/python/meta_what.mdTo publish all articles, simply usefatafat publish. E.g -$ cd <path_to_blog>
$ fatafat publishRemoving an articleCurrently, removing an article or renaming a markdown file isn’t handled
entirely correctly. The HTML file generated for the deleted/renamed
article remains in thesitedirectory and has to be removed
manually.This is on the top of my list of TODOs. So it should be addressed soon.ThemesCurrently Fatafat comes with the default themesimi. But you add new themes easily.Create a directory similar to the default theme and put in under thethemesdirectory of your blog.Update theTHEMEfield inconfig.pyto use the new theme.Every theme has two folders,assetsandtemplates.assetsstores the javascript and the css files.templatesstores the jinja2
templates used to generate the static output. Currently fatafat looks
forindex.jinja2andarticle.jinja2under the templates
directory.The following variables are available in templatearticle.jinja2:article.titlearticle.summaryarticle.contentarticle.dateThe following variables are available in templateindex.jinja2:articles - which is a list of articles. Each article has the same
attributes as above.The following variables are available in all templates:SITENAME - blog titleSITEURL - blog URLYou might have observed that the template variables names matches to
those in Pelican. The goal is to make pelican themes compatible with
fatafat.CheatsheetThefatafatcommand must be run at the root of the directory which
stores the blog files. The following commands can be run in terminal to
perform various actions on the blog:# Create a new blog
$ fatafat start

# Publish all articles to dev directory
$ fatafat publish

# Publish a single article to dev directory
$ fatafat publish -f contents/article1.md

# Publish multiple articles to dev directory
$ fatafat publish -f contents/article1.md contents/group/article2.md contents/article3.md

# Publish all articles to prod directory
$ fatafat publish --prod

# Publish all articles to prod directory and sync with remote host
$ fatafat publish --prod --sync

# Publish a single article to prod directory
$ fatafat publish -f contents/article1.md --prod

# Publish a single article to prod directory and sync with remote host
$ fatafat publish -f contents/article1.md --prod --sync

# Publish multiple articles to prod directory
$ fatafat publish -f contents/article1.md contents/group/article2.md --prod

# Publish multiple articles to prod directory and sync with remote host
$ fatafat publish -f contents/article1.md contents/group/article2.md --prod --syncContact / FeedbackSend me a message at “i DOT subhajit DOT ghosh AT gmail DOT com” with
any feedback.