@BillRaymond Hi Bill, Sorry for the tardy response. I actually had this working over a week ago and moved onto “priority projects” with intention of “coming back soon”. It’s working fine now as .gif
shows:
.gif
showing More/Less button and View on GitHub button
Front Matter on Blog post
$ head 2017-02-11-Can* -n20
---
layout: post
title: >
Can BASH display in systray as application indicator?
site: Ask Ubuntu
stack_url: https://askubuntu.com/q/882420
type: Answer
tags: unity bash scripts system-tray eyesome multi-timer
created_date: 2017-02-11 23:34:13
edit_date: 2021-12-12 22:34:32
votes: "6 "
favorites:
views: "1,906 "
accepted: Accepted
uploaded: 2022-01-19 20:40:17
git_md_url: https://github.com/pippim/pippim.github.io/blob/main/_posts/2017/2017-02-11-Can-BASH-display-in-systray-as-application-indicator^.md
toc: false
navigation: true
clipboard: true
---
I used a variation of your suggestion to put the GitHub Pages URL directly into the blog post’s front matter above.
Python Code snippet
The big problem is how GitHub Pages sanitizes the URL. So the first step is to fix the filename used for the blog post based on sanitized title:
""" Return blog filename.
Replace all spaces in title with "-"
Prepend "/YYYY/" to post filename as required.
The filename needs to be sanitized for URL. There is no
direct citation but this link is close:
- https://github.com/AndyGlew/Test-GitHub-stuff/wiki/
Special-characters-in-GitHub-wiki-page-names-GFMarkdown
GitHub allows:
'"', "'", "`". "(", ")", "<", ">", "[", "]", "{", "}",
"~", ":", "_", "-", "!", "^", "*", ".", "\", "|", " "
Unicode division symbol: "∕"
GitHub converts:
"#" to "%23"
"$" to "%24"
"%" to "%25"
"&" to "%26"
"+" to "%2B"
";" to "%3B"
"," to "%2C"
"=" to "%3D"
"?" to "%3F"
"@" to "%40"
"▶️" to " ▶%EF%B8%8F"
HTML breaks references in links when using:
"'", '"', '<', '>', '(', ')', '[', ']'
"""
global total_special_chars_in_titles, total_unicode_in_titles
sub_dir = make_output_year_dir(r[CREATED])
# little is just a cute abbreviation for "list title"
little = list(r[TITLE])
for i, lit in enumerate(little):
if lit == " ":
little[i] = "-"
elif lit in "#$%&+;,=?/'<>()[]":
little[i] = "^"
total_special_chars_in_titles += 1
elif lit in '"':
little[i] = "^"
total_special_chars_in_titles += 1
elif len(lit) > 1:
little[i] = "u"
total_unicode_in_titles += 1
elif len(little) != len(r[TITLE]):
fatal_error('Should be a unicode here?')
base_fn = sub_dir + r[CREATED].split()[0] + '-' + ''.join(little)
blog_fn = OUTPUT_DIR + base_fn + ".md"
blog_fn = blog_fn.replace('//', '/')
return base_fn, blog_fn
I left in the lengthy comments above in case it may help others.
Note: The unicode section has not been tested because I have no blog post titles with unicode (that I’ve come across anyway).