42 lines
3.5 KiB
Markdown
42 lines
3.5 KiB
Markdown
---
|
|
layout: post
|
|
title: Hello, World (from Jekyll)
|
|
---
|
|
|
|
Here goes another migration of my sparse content from the past 8 years. This time, I'm giving up my Wordpress instance that I've migrated around 3 or 4 times (from wordpress.com, then Dreamhost, then Linode, then tortois.es), and completely failed to migrate this time (I neglected to back up Wordpress' MySQL tables). I still have an old XML backup, but it's such a crufty mess at this point that I'd rather start fresh and import in some old content.
|
|
|
|
Wordpress is a fine platform and it produces some beautiful results. However, I feel like it is very heavy and complex for what I need, and I have gotten got myself into many train-wrecks and rabbit-holes trying to manage aspects of its layout and behavior and media handling.
|
|
|
|
My nose is already buried in Emacs for most else that I write. It's the editor I work most quickly in. I'm already somewhat familiar with git. So, I am giving [Jekyll](http://jekyllrb.com/) a try. Having a static site pre-generated from Markdown just seems like it would fit my workflow better, and not require me to switch to a web-based editor. I'm going to have to learn some HTML and CSS anyway.
|
|
|
|
(I phrase this as if it were a brilliant flash of insight on my part. No, it's something I started in July and then procrastinated on until now, when my Wordpress has been down for months.)
|
|
|
|
A vaguely relevant [issue](https://github.com/joyent/smartos-live/issues/275) just steered me to the existence of [TRAMP](https://www.gnu.org/software/tramp/) which allows me to edit remote files in Emacs. I just did *C-x C-f* `/ssh:username@whatever.com:/home/username` from a stock Emacs installation, and now I'm happily editing this Markdown file, which is on my VPS, from my local Emacs. For some reason, I find this incredibly awesome, even though things like remote X, NX, RDP, and sshfs have been around for quite some time now. (When stuff starts screwing up, M-x tramp-clean-up-all-connection seems to help a bit.)
|
|
|
|
I collect lots of notes and I enjoy writing and explaining, so why don't I maintain a blog where I actually post more often than once every 18 months? I don't really have a good answer. I just know that this crosses my mind about once a week. But okay, Steve Yegge, you get [your wish](https://sites.google.com/site/steveyegge2/you-should-write-blogs) but only because I found [what you wrote](https://sites.google.com/site/steveyegge2/tour-de-babel#TOC-C-) about C++ to be both funny and appropriate.
|
|
|
|
Here's a script I was using to convert links from some other failed-Markdown-conversion from earlier:
|
|
{% highlight python %}
|
|
import re, sys
|
|
|
|
def repl(m):
|
|
return "[%s](%s)" % (m.group(2), m.group(1))
|
|
|
|
urlRe = re.compile(r'<a href="([^"]+)">([^<]+)</a>')
|
|
for line in sys.stdin:
|
|
n = 1
|
|
while (n > 0): (line, n) = urlRe.subn(repl, line)
|
|
sys.stdout.write(line)
|
|
{% endhighlight %}
|
|
|
|
It mostly just turns HTML links to Markdown ones. Simple, but I find it useful. Someone else probably knows a Python one-liner to do it. Whatever.
|
|
|
|
Test code stuff:
|
|
{% gist 8874941 %}
|
|
|
|
To-do list items:
|
|
- Learn some freaking CSS. (Or [SASS](http://sass-lang.com/)?)
|
|
- Read [Building a Blog with Jekyll](http://flippinawesome.org/2013/10/28/building-a-blog-with-jekyll/)
|
|
- Install markdown mode for Emacs.
|
|
- Figure out how to sensibly get image thumbnails. (Or, [do it from Flickr](http://blog.pixarea.com/2012/07/fetch-images-from-flickr-to-show-in-octopress-slash-jekyll)? Or [here](http://www.marran.com/tech/integrating-flickr-and-jekyll/))
|