summaryrefslogtreecommitdiff
path: root/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html
blob: 7bcae7ca9dd22c415d119149894ee4568743bdac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gemtexter 2.1.0 - Let's Gemtext again³</title>
<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
<link rel="stylesheet" href="../style.css" />
<link rel="stylesheet" href="style-override.css" />
</head>
<body>
<p class="header">
<a href="https://foo.zone">Home</a> | <a href="https://codeberg.org/snonux/foo.zone/src/branch/content-md/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.md">Markdown</a> | <a href="gemini://foo.zone/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.gmi">Gemini</a>
</p>
<h1 style='display: inline' id='gemtexter-210---let-s-gemtext-again'>Gemtexter 2.1.0 - Let&#39;s Gemtext again³</h1><br />
<br />
<span class='quote'>Published at 2023-07-21T10:19:31+03:00</span><br />
<br />
<span>I proudly announce that I&#39;ve released Gemtexter version <span class='inlinecode'>2.1.0</span>. What is Gemtexter? It&#39;s my minimalist static site generator for Gemini Gemtext, HTML and Markdown, written in GNU Bash.</span><br />
<br />
<a class='textlink' href='https://codeberg.org/snonux/gemtexter'>https://codeberg.org/snonux/gemtexter</a><br />
<br />
<pre>
-=[ typewriters ]=-  1/98
                                        .-------.
       .-------.                       _|~~ ~~  |_
      _|~~ ~~  |_       .-------.    =(_|_______|_)
    =(_|_______|_)=    _|~~ ~~  |_     |:::::::::|
      |:::::::::|    =(_|_______|_)    |:::::::[]|
      |:::::::[]|      |:::::::::|     |o=======.|
      |o=======.|      |:::::::[]|     `"""""""""`
 jgs  `"""""""""`      |o=======.|
  mod. by Paul Buetow  `"""""""""`
</pre>
<br />
<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br />
<br />
<ul>
<li><a href='#gemtexter-210---let-s-gemtext-again'>Gemtexter 2.1.0 - Let&#39;s Gemtext again³</a></li>
<li>⇢ <a href='#why-bash'>Why Bash?</a></li>
<li>⇢ <a href='#switch-to-gpl3-license'>Switch to GPL3 license</a></li>
<li>⇢ <a href='#source-code-highlighting-support'>Source code highlighting support</a></li>
<li>⇢ <a href='#html-exact-variant'>HTML exact variant</a></li>
<li>⇢ <a href='#use-of-hack-webfont-by-default'>Use of Hack webfont by default</a></li>
<li>⇢ <a href='#html-mastodon-verification-support'>HTML Mastodon verification support</a></li>
<li>⇢ <a href='#more'>More</a></li>
</ul><br />
<h2 style='display: inline' id='why-bash'>Why Bash?</h2><br />
<br />
<span>This project is too complex for a Bash script. Writing it in Bash was to try out how maintainable a "larger" Bash script could be. It&#39;s still pretty maintainable and helps me try new Bash tricks here and then!</span><br />
<br />
<span>Let&#39;s list what&#39;s new!</span><br />
<br />
<h2 style='display: inline' id='switch-to-gpl3-license'>Switch to GPL3 license</h2><br />
<br />
<span>Many (almost all) of the tools and commands (GNU Bash, GMU Sed, GNU Date, GNU Grep, GNU Source Highlight) used by <span class='inlinecode'>Gemtexter</span> are licensed under the GPL anyway. So why not use the same? This was an easy switch, as I was the only code contributor so far!</span><br />
<br />
<h2 style='display: inline' id='source-code-highlighting-support'>Source code highlighting support</h2><br />
<br />
<span>The HTML output now supports source code highlighting, which is pretty neat if your site is about programming. The requirement is to have the <span class='inlinecode'>source-highlight</span> command, which is GNU Source Highlight, to be installed. Once done, you can annotate a bare block with the language to be highlighted. E.g.:</span><br />
<br />
<pre>
 ```bash
 if [ -n "$foo" ]; then
   echo "$foo"
 fi
 ```
</pre>
<br />
<span>The result will look like this (you can see the code highlighting only in the Web version, not in the Geminispace version of this site):</span><br />
<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><b><u><font color="#000000">if</font></u></b> [ -n <font color="#808080">"$foo"</font> ]; <b><u><font color="#000000">then</font></u></b>
  echo <font color="#808080">"$foo"</font>
<b><u><font color="#000000">fi</font></u></b>
</pre>
<br />
<span>Please run <span class='inlinecode'>source-highlight --lang-list</span> for a list of all supported languages.</span><br />
<br />
<h2 style='display: inline' id='html-exact-variant'>HTML exact variant</h2><br />
<br />
<span>Gemtexter is there to convert your Gemini Capsule into other formats, such as HTML and Markdown. An HTML exact variant can now be enabled in the <span class='inlinecode'>gemtexter.conf</span> by adding the line <span class='inlinecode'>declare -rx HTML_VARIANT=exact</span>. The HTML/CSS output changed to reflect a more exact Gemtext appearance and to respect the same spacing as you would see in the Geminispace. </span><br />
<br />
<h2 style='display: inline' id='use-of-hack-webfont-by-default'>Use of Hack webfont by default</h2><br />
<br />
<span>The Hack web font is a typeface designed explicitly for source code. It&#39;s a derivative of the Bitstream Vera and DejaVu Mono lineage, but it features many improvements and refinements that make it better suited to reading and writing code.</span><br />
<br />
<span>The font has distinctive glyphs for every character, which helps to reduce confusion between similar-looking characters. For example, the characters "0" (zero), "O" (capital o), and "o" (lowercase o), or "1" (one), "l" (lowercase L), and "I" (capital i) all have distinct looks in Hack, making it easier to read and understand code at a glance.</span><br />
<br />
<span>Hack is open-source and freely available for use and modification under the MIT License.</span><br />
<br />
<h2 style='display: inline' id='html-mastodon-verification-support'>HTML Mastodon verification support</h2><br />
<br />
<span>The following link explains how URL verification works in Mastodon:</span><br />
<br />
<a class='textlink' href='https://joinmastodon.org/verification'>https://joinmastodon.org/verification</a><br />
<br />
<span>So we have to hyperlink to the Mastodon profile to be verified and also to include a <span class='inlinecode'>rel=&#39;me&#39;</span> into the tag. In order to do that add this to the <span class='inlinecode'>gemtexter.conf</span> (replace the URI to your Mastodon profile accordingly):</span><br />
<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><b><u><font color="#000000">declare</font></u></b> -xr MASTODON_URI=<font color="#808080">'https://fosstodon.org/@snonux'</font>
</pre>
<br />
<span>and add the following into your <span class='inlinecode'>index.gmi</span>:</span><br />
<br />
<pre>
=&gt; https://fosstodon.org/@snonux Me at Mastodon
</pre>
<br />
<span>The resulting line in the HTML output will be something as follows:</span><br />
<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><b><u><font color="#000000">&lt;a</font></u></b> <b><font color="#000000">href</font></b>=<font color="#808080">'https://fosstodon.org/@snonux'</font> <b><font color="#000000">rel</font></b>=<font color="#808080">'me'</font><b><u><font color="#000000">&gt;</font></u></b>Me at Mastodon<b><u><font color="#000000">&lt;/a&gt;</font></u></b>
</pre>
<br />
<h2 style='display: inline' id='more'>More</h2><br />
<br />
<span>Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. </span><br />
<br />
<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br />
<br />
<span>Other related posts are:</span><br />
<br />
<a class='textlink' href='./2024-10-02-gemtexter-3.0.0-lets-gemtext-again-4.html'>2024-10-02 Gemtexter 3.0.0 - Let&#39;s Gemtext again⁴</a><br />
<a class='textlink' href='./2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html'>2023-07-21 Gemtexter 2.1.0 - Let&#39;s Gemtext again³ (You are currently reading this)</a><br />
<a class='textlink' href='./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html'>2023-03-25 Gemtexter 2.0.0 - Let&#39;s Gemtext again²</a><br />
<a class='textlink' href='./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.html'>2022-08-27 Gemtexter 1.1.0 - Let&#39;s Gemtext again</a><br />
<a class='textlink' href='./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html'>2021-06-05 Gemtexter - One Bash script to rule it all</a><br />
<a class='textlink' href='./2021-04-24-welcome-to-the-geminispace.html'>2021-04-24 Welcome to the Geminispace</a><br />
<br />
<a class='textlink' href='../'>Back to the main site</a><br />
<p class="footer">
	Generated with <a href="https://codeberg.org/snonux/gemtexter">Gemtexter 3.0.1-develop</a> |
	served by <a href="https://www.OpenBSD.org">OpenBSD</a>/<a href="https://man.openbsd.org/relayd.8">relayd(8)</a>+<a href="https://man.openbsd.org/httpd.8">httpd(8)</a> |
	<a href="https://foo.zone/site-mirrors.html">Site Mirrors</a>
	<br />
	Webring: <a href="https://shring.sh/foo.zone/previous">previous</a> | <a href="https://shring.sh">shring</a> | <a href="https://shring.sh/foo.zone/next">next</a>
</p>
</body>
</html>