I wanted to add an estimate of words and characters in wiki pages for a program I am writing CWiki There was some guidance on this topic (in Python) here.
Of course the original Markdown.pl was a good source for matching regular expressions too.
What follows is a copy of the “seed page” “About the Word Count” from the CWiki wiki program:
Up at the top of each page, below the author and creation/modification dates, there is a line showing the number of characters in the page along with an estimate of the number of words in the page.
Writing wiki pages using Markdown is a great way to do things because it is simple, well-known, and capable.
One of the annoyances of using Markdown is that it has no default syntax to create wikilinks, a type of hyperlink that links one page in a wiki to another.
I’ve been working on a home-grown, personal wiki, CWiki, for almost a year now off and on. It’s written in the Clojure programming language, which is a pleasure to use.
As part of the work of transferring old blog posts from other systems (mostly WordPress) to Hexo, I hit a bump when trying to use images in the new posts.
There are basically two recommended ways to access images in Hexo.
Put a new sub-directory, say images in your Hexo source directory. Put your images in your new directory. In your posts, use the usual Markdown method of linking to images, that is something like !