6 ms·
Blogging with Emacs org-mode
- dima55 8y agoDid the existing org-to-blog things not work for you? Here's a (probably incomplete) list: https://orgmode.org/worg/org-blog-wiki.html I've been using v1 of o-blog for a while, and it works ok: http://notes.secretsauce.net http://notes.secretsauce.net Maybe the other options are better, I don't know. Would definitely be interested in hearing people's personal experiences.
- kaushalmodi 8y ago> Maybe the other options are better, I don't know. Would definitely be interested in hearing people's personal experiences. If you are open to trying out Hugo, see if my above comment[1] regarding ox-hugo. [1]: https://news.ycombinator.com/item?id=17721272 https://news.ycombinator.com/item?id=17721272
- giggles_giggles 8y ago>boring content ahead aw, it's not boring! Don't sell yourself short!
- e19293001 8y agoYou can do python stuffs too. Similar with jupyter: https://news.ycombinator.com/item?id=16842786 https://news.ycombinator.com/item?id=16842786
- flukus 8y agoHow does jupyter handle embedded data? I've found org mode to be fantastic for opening "literate debugging" of bugs, and being able to do things like embed sql to show the relevant data. My only frustration is that the data get's embedded in the document, I'd prefer it to be a "virtual" element.
- taeric 8y agoWith org, either typically you are showing the data, or you reference it elsewhere. You can have a session going that is holding a reference, however, it is much easier and more practical to send it to table or a file. (I almost said "local file" but that isn't necessary, either. It mostly does as you would expect with TRAMP style filenames.)
- j88439h84 8y agogithub.com/gregsexton/ob-ipython is by a good margin my favorite way to do literate programming. All the power of org with most of the Jupyter goodies. Only downside relative to jupyter in browser is missing the interactive javascript widgets, but well worth it for me.
- webkike 8y agoI do something similar for my blog. I love orgs embedded code features
- andreareina 8y agoI prefer keeping everything in one file (but exporting to separate files) so I hacked something up[1]. It doesn't build the index, but it would be pretty easy to extend to do so. There's also Arthur Malabarba's extension[2] to ox-jekyll that's a much more complete solution. [1] https://gist.github.com/andreareina/37c634f102f819db8e49828f34934542 https://gist.github.com/andreareina/37c634f102f819db8e49828f... [2] http://endlessparentheses.com/how-i-blog-one-year-of-posts-in-a-single-org-file.html http://endlessparentheses.com/how-i-blog-one-year-of-posts-i...
- peatmoss 8y ago> My idea was to put all articles (posts) in a single org file Unfortunately, this is exactly what I'd like to do. Does anyone have cool examples of this alternate workflow?
- dima55 8y agoYes. o-blog.
- kwhitefoot 8y agoLooks like the author has abandoned it, the last activity was in, and the issues say it doesn't work on Emacs 25. Looks interesting though.
- kaushalmodi 8y agoI developed the ox-hugo[1] Emacs package, which allows exporting multiple posts (even the website structural pages like Home page, About page, etc.) from a single Org file. So here's the elevator pitch: - ox-hugo is an Emacs package that exports from Org mode to Markdown format that's compatible with Hugo (https://gohugo.io https://gohugo.io) / Blackfriday + automagically converts natural* Org metadata to TOML/YAML front-matter. - To understand what I mean by "natural" Org metadata, see this table[2]. - ox-hugo works with Hugo. I let each tool to do what they are best at: (i) Org mode deals with the rich markup (Org macros, INCLUDE, TOC, keywords, Org Babel, NoWeb, property/tag inheritance, etc.) and Emacs/Elisp processing, and (ii) Hugo deals with all the "Web stuff" in super-fast fashion (roughly 500 pages in less than a second [depends on your theme efficiency too]): Markdown->HTML conversion, generation of list pages, taxonomy pages, RSS/Atom/JF2/.. feeds, minification, cache busting, page generation using JSON/TOML/.. data, etc. - I prefer having most of the posts be exported from a single Org file (my blog[6] source[3]). So ox-hugo definitely supports that. It also supports the conventional flow of exporting each Org file to a single post too (I use that style too, for my "notes" posts). - The ox-hugo doc site[1] is dog-fooded by ox-hugo itself. Here's the single Org file[4] that holds the content for the entire site. --> Here are few Real World Examples[5] of people using ox-hugo + Hugo. == Refs == [1]: https://ox-hugo.scripter.co/ https://ox-hugo.scripter.co/ [2]: https://ox-hugo.scripter.co/doc/org-meta-data-to-hugo-front-matter/#for-subtree-based-exports https://ox-hugo.scripter.co/doc/org-meta-data-to-hugo-front-... [3]: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/blob/master/content-org/scripter-posts.org https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/blob/ma... [4]: https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master/doc/ox-hugo-manual.org https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master... [5]: https://ox-hugo.scripter.co/doc/examples/ https://ox-hugo.scripter.co/doc/examples/ [6]: https://scripter.co/ https://scripter.co/ PS: Your user name sounds a bit familiar. So I apologize if I have already mentioned ox-hugo to you.
- clircle 8y agoI use org-page (https://github.com/kelvinh/org-page https://github.com/kelvinh/org-page) to write my blog. It has a pretty cool workflow if you are into git, and integrates well with github pages. The project seems to be dead (or stable!?), but I keep using it because I made some small tweaks to the default theme, which resulted in a clean looking website. Maybe I'll switch to vanilla org-mode for static website generation in the future since I seem to always be in the mood to remove dependencies from my emacs config these days.
- mikekchar 8y agoI realised a while ago that Github had an org mode renderer. So I've been working on a blog post that's hosted directly on Github (without needing to export to HTML). The renderer has some problems, but it's been OK for my code examples. Completely unfinished blog post here for example purposes only: https://github.com/ygt-mikekchar/oojs/blob/master/oojs.org https://github.com/ygt-mikekchar/oojs/blob/master/oojs.org You can look at raw mode to see what the source code looks like. One of these days, I'm going to see if I can get something similar working on GitLab (which I've started using and admit to liking better at the moment). I think it should be easy, if a bit expensive (for them) because I should be able to set up a docker image with Emacs and export the HTML to generate a static page. P.S. Anyone interested in the content of my blog post -- I got stalled trying to reason about the purpose of "this/self", but I've unstuck myself and should be finishing it up soon.
- mc_ 8y agoNikola[0] has an orgmode plugin[1] that works fine for my blog. After I write something up, nikola builds the site (incremental build), I can view it locally to verify the rendering, and finally rsync the changes up to the web server. [0] https://getnikola.com/ https://getnikola.com/ [1] https://plugins.getnikola.com/v8/orgmode/ https://plugins.getnikola.com/v8/orgmode/
- julian55 8y agoI use Pelican[0] which also has an org-mode plugin[1]. I tend to use markdown for my blog but I do use org-mode for other organising stuff. [0] https://blog.getpelican.com/ https://blog.getpelican.com/ [1] https://github.com/getpelican/pelican-plugins/tree/master/org_reader https://github.com/getpelican/pelican-plugins/tree/master/or...
- Scarblac 8y agoI once tried to do this as well, and got sucked into the rabbit hole of tinkering with little scripts and hacks and trying things out and never writing my first blog post before I lost motivation. Next time I feel like I want to write a blog I'll just put it on wordpress.com or so.
- baby 8y agoThat’s what I tell everyone. Blogging is about the content, not the form. Do not waste time doing anything else than writing. Setup a wordpress and write, once you have more content take a day to transfer stuff to jekyll or something.
- m-localhost 8y agoIf I already considered plain text for writing, I would rather start with a flat file system like Grav[1] or Pico CMS[2] that's based on markdown files, than trying to get the content out of a wordpress db later. Given, WP is at this point the standard to publish online and it's quick and easy. [1]: https://getgrav.org/ https://getgrav.org/ [2]: http://picocms.org/ http://picocms.org/
- OskarS 8y agoI think the pleasure of doing something like this is in the pure tinkering. Setting up the system just like you want it is kind-of fun. There's some value in that.
- z3t4 8y agoMarkup also matters. With good markup and design the content can be more inviting. I think everyone should learn some basic HTML and CSS. Standard formatting is boring.
- taeric 8y agoDepending on the content you are trying to do, different formats help. For me, the few times I get around to writing a blog post, I'm also writing some code to play with. In that, org has been amazingly fun. http://taeric.github.io/Sudoku.html http://taeric.github.io/Sudoku.html is an example. All of the code and blog material is in one source and I don't have to worry about changing excerpts to put on the page. Literally change the code and rerun.
- orsenthil 8y agoI ran into a problem following the example ``` $ emacs --batch -q -l src/my-web.el -f org-publish-all Cannot open load file: No such file or directory, htmlize ``` I tried and succeeded in installing htmlize. But still ran into this issue. How do I resolve this?
- pksadiq 8y agoIf you are trying to use htmlize, download the file[0] to src directory, such that htmlize package is available as ~/web/src/htmlize.el Now run emacs: ~/web$ emacs --batch -q -l src/htmlize.el\ -l src/my-web.el -f org-publish-all See https://gitlab.com/sadiq/sadiq.gitlab.io/blob/master/.gitlab-ci.yml https://gitlab.com/sadiq/sadiq.gitlab.io/blob/master/.gitlab... You can simply download/clone the complete repo[1] and run the above command from its root directory. [0] https://github.com/hniksic/emacs-htmlize/blob/master/htmlize.el https://github.com/hniksic/emacs-htmlize/blob/master/htmlize... [1] https://gitlab.com/sadiq/sadiq.gitlab.io https://gitlab.com/sadiq/sadiq.gitlab.io
- To1ne 8y agoSo the blog index is maintained by hand? https://gitlab.com/sadiq/sadiq.gitlab.io/blob/master/src/blog/blog.org https://gitlab.com/sadiq/sadiq.gitlab.io/blob/master/src/blo... That's a bit of a pickle.