-
Notifications
You must be signed in to change notification settings - Fork 35
Hashtags
Home > Hashtags
For every published article, lazyblorg generates a hashtag which identifies this article within the Fediverse. It is used for the “Share on Mastodon” button and for the comment line below each article where readers are invited to comment your article on Mastodon by using this very hashtag.
You don’t have to define those hashtags yourself: they are derived from the article ID (or the tag name) and they stay stable as long as you do not change the ID of an article.
Independent of the article hashtags, your blog itself has got one
hashtag which is defined in config.py:
## string: The hashtag of your blog (without leading '#') used in Mastodon share links.
BLOG_HASH_TAG = 'publicvoit'It shows up in the pre-filled text of the “Share on Mastodon” button and it is the prefix of the hashtags of your tag pages (see below).
Temporal and persistent pages:
- The hashtag consists of the date of the ID followed by an underscore and the rest of the ID in CamelCase.
-
id:2016-10-31-my-temporal-articleresults in#20161031_MyTemporalArticle - When the ID does not start with a date in
YYYY-MM-DDform, the date of the first publishing of the article is used instead.
Tag pages:
- The hashtag consists of your
BLOG_HASH_TAG, the stringTagand the name of the tag with its first character in upper case. - The tag page of the tag
lazyblorgresults in#publicvoitTagLazyblorg - This holds for tag pages you wrote yourself as well as for tag pages lazyblorg generates on its own (see Tag Pages).
In any case, all characters which are neither alphanumeric, underscores, nor German umlauts are replaced by underscores. Three or more consecutive underscores are collapsed into two.
Articles tagged with the hidden tag (see Tags) do get neither a
share button nor a comment line. Therefore, no hashtag shows up for
them and they are not part of the hashtag file described below.
Because lazyblorg generates static pages, there is no comment infrastructure of its own. The article hashtag offers a decentralized alternative: readers post their comment on their own Mastodon account using the hashtag of the article and everybody who searches for this hashtag finds the whole discussion.
The wording of the comment line is defined in the templates
comment-line-en and comment-line-de of
blog-format.org. See Templates on how to adapt it.
With the optional command line parameter --hashtag-file you get a
TSV file holding all hashtags lazyblorg generated in this run together
with the ID of the corresponding article:
uv --project . run ./lazyblorg.py \ --targetdir "/tmp/lazyblorg/blog" \ --previous-metadata "/tmp/lazyblorg/blog/metadata.pk" \ --new-metadata "/tmp/lazyblorg/blog/metadata.pk" \ --logfile "/tmp/lazyblorg/blog/logfile.org" \ --hashtag-file "/tmp/lazyblorg/blog/hashtags.csv" \ --orgfiles your-org-files.org templates/blog-format.org
This is handy if you want to look up which article belongs to a hashtag you stumbled upon in the Fediverse, if you want to feed a Mastodon search or notification tool with the hashtags of your blog, or if you simply want to check the hashtags lazyblorg came up with.
The file is sorted by hashtag and holds one header line followed by
one line per hashtag. The columns are separated by tabulators - just
like the file of --external-url-file:
| Column | Content |
|---|---|
Hashtag |
the hashtag including its leading #
|
ID |
the ID of the article, prefixed with id:
|
IDType |
org-id or auto-generated (see below) |
Category |
TEMPORAL, PERSISTENT, or TAGS (see Page Types) |
Title |
the title of the article |
URL |
the path of the article relative to the base URL of your blog |
An example of an exported file (tabulators shown as spaces here):
Hashtag ID IDType Category Title URL #20161031_MyTemporalArticle id:2016-10-31-my-temporal... org-id TEMPORAL A Temporal Article 2016/10/31/my-temporal-article #publicvoitTagExampletag id:2016-10-31-a-tag-page org-id TAGS exampletag tags/exampletag #publicvoitTagLazyblorg id:lb_tag-lazyblorg auto-generated TAGS lazyblorg tags/lazyblorg
Every article you write yourself needs a unique :ID: property in
order to get published. Those articles are marked with org-id in the
IDType column.
There is exactly one type of page which does get a hashtag without
having an :ID: property of its own: tag pages of tags where you did
not write a tag page yourself. lazyblorg generates those pages
automatically (see Tag Pages) and derives an internal ID of the form
lb_tag-<tagname> from the tag name. Those lines are marked with
auto-generated in the IDType column. Please note that despite of
the id: prefix in the ID column, this is not an Org-mode ID you
could link to. As soon as you write your own tag page for such a tag,
its hashtag stays the same and the line switches to org-id with the
ID of your tag page entry.
All other generated pages - the entry page, the tag overview page, TagTree pages, the archive pages of years, months, days, and the Feeds - do not contain any article hashtag at all and therefore they are not part of the hashtag file.
Using lazyblorg:
- Page Types (must-read)
- Orgmode Elements (must-read)
- Hashtags
- FAQs
- Roadmap
- Project Origin
- Similar Projects
Coding: