The bookmark metadata
A bookmark can optionally have metadata—the descriptive data about that bookmark. This includes:
-
Its description or comment, and
-
tags
To add metadata to your bookmark, you use the
#
symbol which is the hash mark. While in most scripting languages, this symbol is ignored by the parser, hlg
uses it as a metadata entry indicator.
So you place the metadata content on a separate line just before the line with a bookmark entry to be affected by that metadata. For example:
# A powerful bookmark manager [bookmarking search favorites hlg hi-let-us-go] hlg(H) <https://hlg.access-computing.com/> :brave
This "hlg" bookmark has got both comments and tags along with the key which is supplied in the key assignment brackets.
In hlg
, this line is special as it supplies extra information for the bookmark entry on the next line. Because of that, hlg
also checks for syntax in these comment lines.
So while you are free to write any text, you have to do it in a particular way:
-
Start by a description, and
-
Then add the tags.
Let us explore each of these metadata content in detail in the next sections:
Description
The description is simply an annotation about the bookmark entry that you are about to enter on the next line:
-
They are notes to yourself reminding you of the purpose of the bookmark,
-
But then
hlg
also processes it as an attached metadata for the bookmark and parse them.
A description is entered on a separate line just above a bookmark entry as shown in the example above. A hash mark #
must be used as the first character on a line with the description.
A description is used when you are searching using a search phrase. The phrase is looked in all your bookmarks with the description metadata.
So this is why we say that hlg
is rudimentary in its search facility:
-
It looks for words in the description,
-
and does not look them in the bookmark names.
Tags
-
Tags are keywords that describe that bookmark. They are entered inside square brackets.
-
They are separated by spaces and not any other character.
-
When you supply tags to a bookmark, take note of the following:
-
Tags are entered on a line beginning with a hash mark
(#)
just like the comment field.
-
-
In case you choose to enter both the description and the tags, make sure to start with the comment and then the tags on that same line as shown above.
Hence we can enter tags without a description for a bookmark entry like this:
# [bookmarking hlg hi-let-us-go] hlg <https://hlg.access-computing.com/> :brave
Or with a description like this:
# The best search engine [duckducgo no-tracking no-intrusive-advertising] duckduckgo <https://www.duckduckgo.com/>
So just take note that where we decide to provide both comment and tags, comments must be provided first then tags in square brackets.
If you do it the other way, hlg
will complain and refuse to run.
Where are tags used? Both tags and comments can be used to search through your bookmarks.
In other words, they are an alternative way of visiting a bookmark, but with added flexibility. Tags are case-insensitive when searching through keywords.