Search code examples
gitmarkdownbookmarks

Storing bookmarks in a markdown file, how could I encode tags?


I am a long time user of bookmarks and I would like a fresh start with a simple text based system that can be archived and merged in git. I started storing bookmarks in a markdown formatted file. I have a file called bookmark.md which contains titles and links such as:

# Q & A sites
[Stackoverflow](http://stackoverflow.com)

Then I convert the file to html with

pandoc -s bookmark.md -o bookmark.md.html

I have seen this simple system stores all bookmarks in an html file and stores tags in <id title=""> tags. For example the tags photography and stackexchange would be stored in:

<li title="photography, stackexchange">

What would be the best approach to encode such tags in markdown format?


Solution

  • Even plain markdown allows you an optional title tag

    Just write

    # Q & A sites
    [Stackoverflow](http://stackoverflow.com "photography, stackexchange")
    

    and you will get a link with title.

    btw: the title tag is probably not the "right" html-tag for tags, but it will work.