#+BEGIN_QUOTE «A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.» ([[https://en.wikipedia.org/wiki/Antoine_de_Saint-Exup%25C3%25A9ry][Antoine de Saint-Exupéry]]) #+END_QUOTE
This is a web log (blog) environment for [[http://en.wikipedia.org/wiki/Emacs][GNU Emacs]] with [[http://orgmode.org/][Org-mode]] which generates static HTML5 web pages. It is much more superior to any other Org-mode-to-blog-solution I have seen so far!
: <(All?) your Org-mode files> --lazyblorg--> static HTML pages : | : v : optional upload (shell) script : | : v : your web space
There is [[http://orgmode.org/worg/org-blog-wiki.html][a list of similar/alternative Org-mode blogging projects]] whose workflows seem really tedious to me.
See [[http://article.gmane.org/gmane.emacs.orgmode/49747/][my original post to the Org-mode ML]] for how this idea of lazyblorg started in 2011.
This awesome piece of software is a sheer beauty with regard to:
** Target group
Lazy users of [[http://orgmode.org/][Org-mode]] who want to do blogging very easily and totally cool.
Or simply wannabes. I'm perfectly fine with this as long as they use lazyblorg.
** Other people using lazyblorg
Pages using lazyblorg are listed [[https://karl-voit.at/tags/lazyblorg/][on my personal tag page on "lazyblorg"]]. Please do drop me a line when you want to get your page added to the list.
Quote from [[https://seppjansen.com/2018/04/24/site-using-lazyblorg/][Sepp Jansen]]:
But when I revisited lazyblorg after studying the other packages, it suddenly seemed like a better solution. After only a short time of reading I figured out the entire templating and post generation system. Although not the most elegant, it is super simple and easy to understand. And those are my most important points.
The developer states that it is easy to configure and start building, and is absolutely right.
In just a few hours I went from installing dependencies to having a fully working website, including some layout and CSS customization. The included HTML and CSS is easy to modify so I could (lazily) make the site look like I wanted it to without too much digging in many little files. I even managed to make it look a lot like my old site without too much effort! Lazyblorg really lives up to its name!
I really like lazyblorg, and I'll happily manage [[https://seppjansen.com/][this website]] with it for as long as possible. #+END_QUOTE
** Skills necessary
** System requirements :PROPERTIES: :CREATED: [2014-03-14 Fr 13:24] :END:
lazyblorg is written in Python 3.
Development platform is Debian GNU/Linux. So with any decent GNU/Linux you should be fine as well.
It might work on OS X but I never tried it so far.
I definitely does not work with Microsoft Windows. Although a
programmer can add a couple of
os.path.thisorthat() here and there
and it should be good to go. Please consider sending a pull-request if
you are fixing this issue. Thanks!
** Version and Changelog :PROPERTIES: :CREATED: [2014-03-14 Fr 13:28] :END:
Currently (2019-10-23), I consider lazyblorg in beta-status with version 0.96 or so.
I don't maintain a specific changelog. However, when there are substantial changes to lazyblorg, you will find [[https://karl-voit.at/tags/lazyblorg/][a blog article tagged with "lazyblorg"]]. Use an RSS/Atom aggregator to follow the blog.
** Why lazyblorg?
Minimum effort for blogging.
And: your blog entries can be written anywhere in your Org-mode files. They will be found by lazyblorg. :-)
Further advantages are listed below.
** Example workflow for creating a blog entry
An example blog entry looks like this:
: ** DONE An Example Blog Post :blog:lazyblorg:software: : CLOSED: [2017-06-18 Sun 00:16] : :PROPERTIES: : :ID: 2017-07-17-example-posting : :CREATED: [2017-06-17 Sat 23:45] : :END: : :LOGBOOK: : - State "DONE" from "NEXT" [2017-06-18 Sun 00:16] : :END: : […] : Today, I found out that…
That's it. lazyblorg does the rest. It feels like magic, doesn't it? :-)
These things make a blogger a happy one:
No other Org-mode blogging system I know of is able to process blog entries which are scattered across all your Org-mode documents.
No other Org-mode blogging system I know of is able to generate a blog entry with that minimum effort to the author.
You do not need to maintain a specific Org-mode file that contains you blog posts only. [[http://www.tbray.org/ongoing/When/201x/2011/03/07/BNotes][Create blog posts]] anywhere in between your notes, todos, contacts, ...
And there are some technological advantages you might consider as well:
Yes, there are some disadvantages. I am totally honest with you since we are becoming close friends right now:
lazyblorg re-generates the complete set of output pages on every run
lazyblorg is implemented in Python:
lazyblorg is using state-of-the art HTML5 and CSS3
You have to accept the one-time setup effort which requires knowledge of:
#+BEGIN_QUOTE «Technology develops from the primitive via the complex to the simple.» #+END_QUOTE ([[https://en.wikipedia.org/wiki/Antoine_de_Saint-Exup%25C3%25A9ry][Antoine de Saint-Exupéry]]; note: lazyblorg is currently "primitive" but with a great outlook up to the status of being simple)
Here is a selection of features of lazyblorg which helps you to blog efficiently:
Converts Org-mode To HTML5: lazyblorg supports [[https://github.com/novoid/lazyblorg/wiki/Orgmode-Elements][a (large sub-)set of syntax elements of Org-mode]]
Different [[https://github.com/novoid/lazyblorg/wiki/Page-Types][page types]] allow you to create:
To efficiently notify users of new articles or changes to existing articles, lazyblorg generates [[https://github.com/novoid/lazyblorg/wiki/Feeds][RSS/ATOM feeds]].
Really fast to use [[https://github.com/novoid/lazyblorg/wiki/Links#linking-other-blog-articles-internal-links][linking to other blog articles]] using their ID property.
At the bottom of each article, there is a list of related articles that back-link to here.
You can very easily [[https://github.com/novoid/lazyblorg/wiki/Images][embed image files]] with automatically scaling to their desired width
For navigating through the blog articles I do recommend using the [[https://github.com/novoid/lazyblorg/wiki/Tag-Pages][tags]]. Articles related to one topic share common tags whereas a date-oriented archive has only very limited use. The tag cloud which is on the [[http://karl-voit.at/tags/][tag overview page]] offers a quick overview of your most used tags.
There is a search feature which brings you to the content by searching for keywords or phrases.
Easy embedding of [[https://github.com/novoid/lazyblorg/wiki/Embedding-External-Content][external content]] such as Tweets or YouTube videos.
You can exclude content from being published with various features:
Reading time estimations (multi-language) following [[https://github.com/novoid/lazyblorg/issues/47][this feature request]]
I am using it for [[http://Karl-Voit.at][my own blog]] and therefore it gets more and more ready to use as I add new features.
What's working so far:
** External dependencies
The number of external dependencies is kept at a minimum.
This is a list of the most important dependencies:
All other libraries should be part of a standard Python distribution.
** How to Start
Get the source
config.py to meet your settings.
Do a technological test-drive
Study, understand, and adopt the content of [[https://github.com/novoid/lazyblorg/blob/master/example_invocation.sh][example_invocation.sh]]
Get yourself an overview on what defines a lazyblorg blog post and write your own blog posts. A (normal temporal) blog article consists of:
OPTIONAL: Write your own CSS file
OPTIONAL: Adopt the blog template
OPTIONAL: Create tag pages for your most important tags where you describe how you are using this tag, what are the most important blog entries related to the tag and so forth.
Publish your pages on a web space of your choice
Have fun with a pretty neat method to generate your blog pages
Because we are already close friends now, I tell you a hidden feature of lazyblorg nobody knows yet: whenever you see a π-symbol in the upper right corner of a blog entry on [[http://qr.cx/7wKz][my blog]]: this is a link to the original Org-mode source of that page. This way, you can compare Org-mode-source and HTML-result right away. Isn't that cool? :-)
** Five categories of page type
There are five different types of pages in lazyblorg. Most of the time, you are going to produce temporal pages. However, it is important to understand the other ones as well.
In order to process a blog-heading to its HTML5 representation, its
Org-mode file has to be included in the
--orgfiles command line
argument of lazyblorg.py. Do not forget to include the archive files
Please do read https://github.com/novoid/lazyblorg/wiki/Page-Types for important details.
** BONUS: Preview Blog Article :PROPERTIES: :CREATED: [2014-02-25 Tue 17:27] :END:
It is tedious to re-generate the whole blog and even upload it to your web-space just to check the HTML version of the article you are currently writing.
Yeah, this also sucks at my side.
Good news everybody: There is a simple method to preview the article
under the cursor. The script [[https://github.com/novoid/lazyblorg/blob/master/preview_blogentry.sh][preview_blogentry.sh]] contains an ELISP
function that extracts the current blog article (all lazyblorg criteria
has to be fulfilled: ID,
blog tag, status DONE), stores it into a
temporary file, and invokes lazyblorg via preview_blogentry.sh with
this temporary file and the Org-mode file containing the format
If this worked out, your browser shows you all generated blog articles.
Please do adopt the mentioned scripts to you specific requirements - the ones from the repository are for my personal set-up which is unlikely to fit yours (directory paths mostly).
Bang! Another damn cool feature of lazyblorg. This is going better and better. :-)
** BONUS: Jump From URL to Blog Article
Imagine, you're looking at a blog article of your nice lazyblorg-generated blog. Now you want to go to the corresponding Org-mode source to fix a typo.
The issue here is, that you have to either know, where your heading is located or you have to go to the HTML page source, extract the ID, and jump to this ID.
I've got a better method: put the URL of your blog article into your
C-l C-c), press a magic shortcut in Emacs, and BAAAM!
you're right on spot.
How's that magic happening?
Just use the following Emacs lisp code snippet, adapt the
string, and assign a keyboard shortcut:
#+begin_src elisp (defun my-jump-to-lazyblorg-heading-according-to-URL-in-clipboard () "Retrieves an URL from the clipboard, gets its Org-mode source, extracts the ID of the article and jumps to its Org-mode heading" (interactive) (let ( ;; Getting URL from the clipboard. Since it may contain ;; some text properties we are using substring-no-properties ;; function (url (substring-no-properties (current-kill 0))) ;; This is a check string: if the URL in the clipboard ;; doesn't start with this, an error message is shown (domain "http://karl-voit.at") ) ;; Check if URL string is from my domain (all other strings do ;; not make any sense here) (if (string-prefix-p (upcase domain) (upcase url)) ;; Retrieving content by URL into new buffer asynchronously (url-retrieve url ;; call this lambda function when URL content is retrieved (lambda (status) ;; Extrating and preparing the ID (let* ( ;; Limit the ID search to the top 1000 characters of the buffer (pageheader (buffer-substring 1 1000)) ;; Start index of the id (start (string-match "<meta name="orgmode-id" content="" pageheader)) ;; End index of the id (end (string-match "" />" pageheader start)) ;; Amount of characters to skip for the openning tag (chars-to-skip (length "<meta name="orgmode-id" content="")) ;; Extract ID (lazyblorg-id (if (and start end (< start end)) ;; ... extract it and return. (substring pageheader (+ start chars-to-skip) end) nil)) ) (message (concat "Looking for id:" lazyblorg-id " ...")) (org-open-link-from-string (concat "id:" lazyblorg-id)) ) ) ) (message (concat "Sorry: the URL "" (substring url 0 (length domain)) "..." doesn't start with "" domain "". Aborting.")) ) ) ) #+end_src
** BONUS: Embedding External Things
I'm glad you like my tools. If you want to support me:
If you want to contribute to this cool project, please fork and contribute!
Issues, bugs,… are maintained in the [[https://github.com/novoid/lazyblorg/issues][GitHub issue tracker]].
I am using [[http://www.python.org/dev/peps/pep-0008/][Python PEP8]] and some ideas from [[http://en.wikipedia.org/wiki/Test-driven_development][Test Driven Development (TDD)]].