Monday, March 26, 2012

Quickly navigating within your pages with the static sidebar

I was quite chuffed when I added the automatic table of contents to WikiPack’s sidebar, and showed it off proudly to my wife who promptly observed that when jumping to a section of the page the causes it to scroll down far enough, the TOC scrolls up with it and vanishes…

So I started work on some JavaScript to implement the fairly ubiquitous “sticky sidebar” seem around the web these days. It took a while to come up with a solution that I liked, and here it is:

~~~

It’s not just cosmetic, it serves some important practical purposes:

  • the search box is always visible for quickly jumping between pages
  • the edit button is accessible when viewing the bottom of a long document
  • the sidebar controls remain visible when loading a page with an anchor in the URL
  • it makes the TOC really fun to use!

Couple of other tweaks

The search box has been refined since the last post, and the WikiWords are no longer split up at the suggestion of @frosty. (It was displaying iOS as “i O S”)

Thank you to everyone who takes the time to send in questions, comments, and feature requests. There has been quite a bit of demand for a few things that I’ll be working on next (in no particular order):

  • Having a list of all pages in the sidebar
  • Setting a default home page
  • Marking pages as favourites

One of my long-term features that I’m planning is a solution to the “emailing links to myself” problem, but that’s another story…

Tuesday, March 13, 2012

Inserting images from your Dropbox Public folder

So I had just succeeded in hooking Time Machine up to a network drive attached to my Airport Extreme, and wanted to record the steps involved in my wiki by inserting screenshots I’d taken during the process. For a single image, I’ve shown previously how to use file sharing services like Cloud.ly, but ideally I’d like to be able to stick to using Dropbox.

Do Dropbox files have a public download URL?

No. I logged into my Dropbox dashboard and grabbed the download URL for one of my files, then tried logging out and accessing the same file, but Dropbox returns a 403 (forbidden) error. This is as we’d expect for our private files stored in our personal folders - we don’t want the whole world to be able to access them.

Getting the download URL of files in your Public folder

What follows is my first attempt at dropping a bunch of pics into my Public folder and inserting them in a WikiPack page.

~~~

This technique is great, because you can just drag stuff into your public folder and insert it straight into your wiki. Keep in mind though, that you probably shouldn’t put anything personal or sensitive in there.

Monday, March 12, 2012

Posterous' posterity & data portability

The internet is ablaze with the news of the blogging site Posterous being acquired by Twiter, and what that means for their current users. So they decided to post an FAQ to address common concerns, to which it was commented upon on by @Documentally:

Startups need to factor in data portability from the start.

I couldn’t agree more!

Your data should be your data

WikiPack was designed from the ground up on the principal that your data should always be your data, and never locked into a proprietary data format or system. Some people might express valid concern at trusting a startup company with their important data for this very reason; the company could vanish, and take your data with it. OK, so they might provide archaic tools for exporting your data, but it will likely be of little use to you outside the system it was created with.

So if I’m hit by a bus, or WikiPack vanishes into the startup graveyard, you can rest assured that you’ll still have all of your Markdown pages safe and sound, right there in your Dropbox folder for Posterity. (see what I did there? :)

Wednesday, March 7, 2012

Default Markdown file extension statistics

Just read an excellent post by Hilton Lipschitz about Markdown file extensions, where he makes the case for using .markdown, and I couldn’t agree more! WikiPack proudly uses a default Markdown file extension of .markdown, but gives you the freedom of choosing a different extension if you like.

I takes no more effort on our part to use longer, descriptive file extensions, and there are benefits such as being able to associate .markdown files with a different editor to other more generic text formats.

To me, it’s a no brainer, but I’ve seen similar issues manifest themselves in programming, where some developers lean towards shortened, abbreviated, often cryptic variable & method names. Why? Code editors these days have this great new thing called “automatic code completion”, so cutting down on typing is a non-issue as it’s mainly abstracted away from you. Similarly, once you create a file, you never need to type it’s file extension again, if ever.

WikiPack stats

Since introducing the ability to choose a default Markdown file extension to WikiPack, users have gone with the following:


Extension %
.markdown 52.6
.md 31.6
.txt 15.8

Which Markdown file extension do you use?

Update 2012-05-23

The latest statistics from WikiPack users as of May 2012 shows a definite shift towards .markdown being the de facto standard: