<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Marin Lagacé - Miscellaneous</title><link href="https://www.marinlagace.ca/en/" rel="alternate"></link><link href="https://www.marinlagace.ca/feeds/miscellaneous.atom.xml" rel="self"></link><id>https://www.marinlagace.ca/en/</id><updated>2020-05-27T08:50:00-04:00</updated><entry><title>Why Pelican?</title><link href="https://www.marinlagace.ca/en/2020/why-pelican.html" rel="alternate"></link><published>2020-05-27T08:50:00-04:00</published><updated>2020-05-27T08:50:00-04:00</updated><author><name>Marin</name></author><id>tag:www.marinlagace.ca,2020-05-27:/en/2020/why-pelican.html</id><summary type="html">&lt;p class="first last"&gt;The reasons why this website is built using the Pelican static website
generator.&lt;/p&gt;
</summary><content type="html">&lt;p&gt;I created my first website more than twenty years ago. At that time, I wrote it
in good old &lt;a class="reference external" href="http://www.htmlhelp.com/reference/html40/structure.html"&gt;HTML4&lt;/a&gt;.
The page layout was done by using a series of non-intuitively intertwined
tables. This was before &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Cascading_Style_Sheets"&gt;CSS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I then moved on the dynamic websites like &lt;a class="reference external" href="https://wordpress.org/"&gt;Wordpress&lt;/a&gt;.
No need to write code anymore. One just need to concentrate on writing content
and the engine takes care of the rest. This was great since I did not know any
&lt;a class="reference external" href="https://en.wikipedia.org/wiki/JavaScript"&gt;JavaScript&lt;/a&gt; nor any &lt;span class="app"&gt;CSS&lt;/span&gt;.
With the gain in popularity of the platform came the security issues mainly
caused by the number of plugins available. What I found most annoying was the
difficulty to migrate the website from one server to another. Even though there
were plugins available for that, I always ended up having to go mess up with the
database. Eww!!!&lt;/p&gt;
&lt;p&gt;Then came &lt;a class="reference external" href="https://www.dokuwiki.org/dokuwiki"&gt;DokuWiki&lt;/a&gt; which is also a
dynamic website engine. The main difference with &lt;span class="app"&gt;Wordpress&lt;/span&gt; is that
&lt;span class="app"&gt;DokuWiki&lt;/span&gt; does not use a database. All its articles are saved as plain and
simple text files on the server. No more migration problem. Furthermore,
creating backups of the website is a cinch. Great!&lt;/p&gt;
&lt;p&gt;I used &lt;span class="app"&gt;DokuWiki&lt;/span&gt; for a many years until I ran across an article praising
the virtues of static websites. No databases. No &lt;a class="reference external" href="https://en.wikipedia.org/wiki/PHP"&gt;PHP&lt;/a&gt;. One only needs to write articles in some
markup language like &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Markdown"&gt;Markdown&lt;/a&gt; or
&lt;a class="reference external" href="https://en.wikipedia.org/wiki/ReStructuredText"&gt;reStructuredText&lt;/a&gt; using any
text editor. The text goes through a processor called directly on the command
line and the entire website is generated directly in some directory on the hard
drive. The whole thing just needs to be transferred to some server and presto!
Since all the webpages are static, the website is harder to hack. If something
bad was to happen, one only needs to regenerate the website and upload it again
to the server.&lt;/p&gt;
&lt;p&gt;What I like most about this is that I can use all the development tools I am
most familiar with. I write the articles in &lt;span class="app"&gt;reStructuredText&lt;/span&gt;. I use &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Vim_(text_editor)"&gt;Vim&lt;/a&gt; which is my go-to text
editor along with &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Git"&gt;Git&lt;/a&gt; to manage and
backup my articles. Everything is done on the command line. I don't need to
leave the terminal which is where I spend 90% of my time anyway. Writing an
article for my website uses the exact same workflow as I use for software
development.&lt;/p&gt;
&lt;p&gt;Finally, with the &lt;a class="reference external" href="https://www.staticgen.com/"&gt;great quantity of static website engines available&lt;/a&gt;, why choose &lt;a class="reference external" href="https://blog.getpelican.com/"&gt;Pelican&lt;/a&gt;? Simply because it is written in &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Python_(programming_language)"&gt;Python&lt;/a&gt; which is a
programming language that I use. Some of the most popular engines use
&lt;span class="app"&gt;JavaScript&lt;/span&gt;, &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Ruby_(programming_language)"&gt;Ruby&lt;/a&gt; or &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Go_(programming_language)"&gt;Go&lt;/a&gt; which are
programming languages that I don't know. Although it is not necessary to know
any programming to use these engines, it is still useful to know a little bit
about the language in which they are written in order to tweak them to our
liking.&lt;/p&gt;
&lt;p&gt;The circle is now complete. After all this time, here I am right back with good
old &lt;span class="app"&gt;HTML&lt;/span&gt; (5 rather than 4 and with a dash of &lt;span class="app"&gt;CSS&lt;/span&gt;)...&lt;/p&gt;
&lt;!-- vim: ft=pelican.rst --&gt;
</content><category term="pelican"></category></entry><entry><title>Hello World</title><link href="https://www.marinlagace.ca/en/2020/hello-world.html" rel="alternate"></link><published>2020-05-26T01:31:00-04:00</published><updated>2020-05-26T01:31:00-04:00</updated><author><name>Marin</name></author><id>tag:www.marinlagace.ca,2020-05-26:/en/2020/hello-world.html</id><summary type="html">&lt;p class="first last"&gt;The traditional Hello World page.&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Any respecting developer needs to first write the traditional &lt;tt class="docutils literal"&gt;Hello World&lt;/tt&gt;
app when learning a new programming language.&lt;/p&gt;
&lt;p&gt;So, here we go...&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;html&lt;/span&gt; &lt;span class="na"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;en&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;meta&lt;/span&gt; &lt;span class="na"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;utf-8&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;HTML5: Hello World&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Hello World!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;!-- vim: ft=pelican.rst --&gt;
</content><category term="misc"></category></entry></feed>