1

I'm searching for a blog platform or web framework to set up a blog/archive of personal code snippets (so it should have syntax highlight) and programming articles I might use in the future (a quicksearch would also be nice).

I don't terribly like WordPress and an alternative would be great. As a sidenote: a good-looking one would be preferable.

  • Do you want to publish this, or is it for your private use only? -- What do you mean with "quicksearch"? Is this something different than a search function? – unor May 12 '15 at 10:00
  • 1
    it would be for private use but I don't mind it being public. As for the second question: I mean a fast way to search through the articles, kind of a "grep" into the articles. – Albert May 12 '15 at 12:08
  • If you feel comfortable using a developer oriented workflow (write your posts in GitHub flavored markdown, commit to a git repo, and push to deploy staticly built HTML) you may want to have a look at Octopress. It's built on Jekyll, the same framwork that powers GitHub pages, and has great support for Sharing Code Snippets. – Lukas Graf May 13 '15 at 11:21
1

After reviewing some different alternatives for myself regarding blogging/writing articles on either programming or life in general, I came across stackedit.io, which is an editor within the browser. This could be a good option for you as well.

Some quotes from the Welcome document:

StackEdit stores your documents in your browser, which means all your documents are automatically saved locally and are accessible offline!
...
StackEdit can be combined with Google Drive and Dropbox to have your documents centralized in the Cloud. The synchronization mechanism will take care of uploading your modifications or downloading the latest version of your documents.
...
Once you are happy with your document, you can publish it on different websites directly from StackEdit. As for now, StackEdit can publish on Blogger, Dropbox, Gist, GitHub, Google Drive,Tumblr, WordPress and on any SSH server.
...
StackEdit supports Markdown Extra, which extends Markdown syntax with some nice features. ... GitHub’s fenced code blocks are also supported with Prettify syntax highlighting

In other words you write your stuff in Markdown, with code syntax highlighted with Prettify (or highlight.js). Save it in the cloud, and publish when you are ready for it. If using Gist/GitHub, you'll also also get the search functions you are looking for. Did I mention it is gratis?

0

I think a blog is not the right kind of information architecture for your purpose: it focuses on the publication date and orders content reverse chronologically (not useful for you), typically comes with features you don’t need (like a comment function), and for organizing your content, you only have tags and sometimes categories.

A wiki should be more suitable: you can organize your content in any way that suits your needs, and creating/editing/linking your content is usually more convenient than in other CMS like blogs.

I’m using WikkaWiki for a similar purpose (and can recommend it as personal wiki).

DokuWiki is another good solution, with the benefit that it doesn’t need a database: all pages are saved in text files.

Both come with syntax highlighting (using GeSHi) by default:

  • In WikkaWiki, the syntax for code blocks is %% … %%, and for enabling syntax highlighting, it’s %%(javascript) … %%.

  • In DokuWiki, you can indent code blocks with two spaces (or use <code>…</code> or <file>…</file>). For syntax highlighting, you have to use <code javascript>…</code> or <file javascript>…</file>.

Both also come with a search function, but if you organize your content by adding links to all relevant pages, you’ll probably rarely have to use it. When using my personal wiki, I can visit most of my 2000+ pages by directly entering the URL, or by entering the URL of a "parent" page (e.g., all JavaScript snippets are automatically listed on the JavaScript page’s backlinks, because I add a link from every JS snippet to this page).

  • The "wiki" model could be right but I really,really,really hate both their speed (e.g. wikipedia) and their appearance :/ – Albert May 12 '15 at 13:34
  • @Albert: Appearance is a theme question: the solutions I mentioned look very different (and both different to Wikipedia, too), and both allow using a different theme (e.g., WikkaWiki comes with 3 themes by default; and there are 120+ templates for DokuWiki). – unor May 12 '15 at 13:59
  • @Albert: Speed … I’m not sure what exactly you mean. If you install a wiki like WikkaWiki or DokuWiki on your server, viewing and editing it is usually fast (and most likely faster than in other CMS, like WordPress etc.), because these wikis are pretty lightweight. If it’s not, the problem is likely your server (and you would have this problem no matter which CMS you use). – unor May 12 '15 at 14:02
0

Did you try GitHub Gist?

It's not well suited for articles, but it's awesome for code snippets. It has a really nice UI and what I like about it especially is it's integration with the IDE (I use IntelliJ but it has integration with several others) - with a couple of clicks I can create a code snippet.

For example:

In IntelliJ right-click and select "Create Gist...":

Create Gist Snippet in IntelliJ

After clicking OK this opens up in my web browser: Create Gist Snippet in Web

You can also opt to not open it in the browser and then it's just automatically saved under your GitHub account.

  • That's a good idea but I might need to add images to the articles as well (or tables) – Albert May 12 '15 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.