<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>docs.pelican.bernatchez.net</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/" rel="alternate"/><link href="https://docs.pelican.bernatchez.net/lang-version.en/feeds/en.atom.xml" rel="self"/><id>https://docs.pelican.bernatchez.net/lang-version.en/</id><updated>2026-05-09T12:59:29+00:00</updated><entry><title>Configure a New Bunny Site</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/newbunny-en.html" rel="alternate"/><published>2026-05-09T12:59:29+00:00</published><updated>2026-05-09T12:59:29+00:00</updated><author><name>Pierre Example</name></author><id>tag:docs.pelican.bernatchez.net,2026-05-09:/lang-version.en/newbunny-en.html</id><summary type="html">&lt;p class="first last"&gt;Configure a new site in bunny.net account&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Example steps to set up a your bunny.net account to
accomodate a new site.&lt;/p&gt;
&lt;p&gt;In this example Our new site called: &lt;strong&gt;dummy.example.net&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Change your names according to your site name.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;login to your bunny.net account  at: &lt;a class="reference external" href="https://dash.bunny.net/"&gt;https://dash.bunny.net/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;create a standard storage zone named: &lt;strong&gt;dummy-example-net&lt;/strong&gt; &lt;a class="footnote-reference" href="#imagename1" id="footnote-reference-1"&gt;[1]&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;img alt="The result" class="img-responsive" src="../images/addstorage1.png" /&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;img alt="The result" class="img-responsive" src="../images/addstorage2.png" /&gt;
&lt;table class="docutils footnote" frame="void" id="imagename1" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#footnote-reference-1"&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Picture shows &amp;quot;docs-pelican-bernatchez-net&amp;quot; should show &amp;quot;dummy-example-net&amp;quot;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;create a pull zone named: &lt;strong&gt;dummy-example-net-zone&lt;/strong&gt; &lt;a class="footnote-reference" href="#imagename2" id="footnote-reference-2"&gt;[2]&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;img alt="The result" class="img-responsive" src="../images/addpullzone1.png" /&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;img alt="The result" class="img-responsive" src="../images/addpullzone2.png" /&gt;
&lt;table class="docutils footnote" frame="void" id="imagename2" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#footnote-reference-2"&gt;[2]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Shows &amp;quot;docs-pelican-bernatchez-net-zone&amp;quot; should show &amp;quot;dummy-example-net-zone&amp;quot;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;login to your DNS service account.&lt;/li&gt;
&lt;li&gt;On your DNS server create a record: &lt;strong&gt;dummy.example.net CNAME dummy-example-net-zone.b-cdn.net&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Back on bunny.net add a custom hostname &lt;strong&gt;dummy.example.net&lt;/strong&gt; to the pull zone &lt;a class="footnote-reference" href="#addcustom" id="footnote-reference-3"&gt;[3]&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;img alt="The result" class="img-responsive" src="../images/add-custom-hostname.png" /&gt;
&lt;table class="docutils footnote" frame="void" id="addcustom" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#footnote-reference-3"&gt;[3]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Shows &amp;quot;docs.pelican.bernatchez.net&amp;quot; should show &amp;quot;dummy.example.net&amp;quot;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;When you do this add, take the opportunity to confirm certificate is working&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Now your site is ready to serve.
You can publish to it.&lt;/p&gt;
</content><category term="pelican"/><category term="pelican"/><category term="git"/></entry><entry><title>Getting it on one page</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/pagefit-en.html" rel="alternate"/><published>2026-04-26T01:36:19+00:00</published><updated>2026-04-26T01:36:19+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2026-04-26:/lang-version.en/pagefit-en.html</id><summary type="html">&lt;p class="first last"&gt;Getting image and recipe on a single .pdf page&lt;/p&gt;
</summary><content type="html">&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;img alt="The result" class="img-responsive" src="../images/pagefit.jpg" /&gt;
&lt;p&gt;My recipes consist of an image and the instructions to prepare it
beneath that.  For the sake of &amp;quot;.pdf&amp;quot; printing, I try to fit it all in a
sindle page.  That means I must keep the image small.&lt;/p&gt;
&lt;p&gt;In practical terms, I take a picture with my cell phone.  Then I open
that up with the shotwell viewer and I crop the part I want from it.&lt;/p&gt;
&lt;p&gt;Then whatever I end up with, I shrink to about 1000 pixels wide.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;shrink command&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;convert&lt;span class="w"&gt; &lt;/span&gt;original.jpg&lt;span class="w"&gt; &lt;/span&gt;-resize&lt;span class="w"&gt; &lt;/span&gt;1000x&lt;span class="w"&gt; &lt;/span&gt;pagefit.jpg
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;snippet that includes the image in the RST source&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;|

&lt;span class="p"&gt;..&lt;/span&gt; &lt;span class="ow"&gt;image&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt; ../images/pagefit.jpg
    &lt;span class="nc"&gt;:class:&lt;/span&gt; img-responsive
    &lt;span class="nc"&gt;:scale:&lt;/span&gt; 30%
    &lt;span class="nc"&gt;:alt:&lt;/span&gt; The result
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I have included such an image above as illustration.&lt;/p&gt;
</content><category term="pelican"/><category term="pelican"/><category term="git"/><category term="image"/><category term="size"/></entry><entry><title>Creation of a .rst site</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/newsite-en.html" rel="alternate"/><published>2026-04-16T01:47:25+00:00</published><updated>2026-04-16T01:47:25+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2026-04-16:/lang-version.en/newsite-en.html</id><summary type="html">&lt;p class="first last"&gt;Creation of a new .rst site within our git project&lt;/p&gt;
</summary><content type="html">&lt;p&gt;We go through the process of creating a new site subdirectory in our
git repository here to record a walk through of starting a new site.&lt;/p&gt;
&lt;p&gt;For the actual creation of hosting infrastructure within a bunny.net
account see: &lt;a class="reference external" href="https://docs.pelican.bernatchez.net/lang-version.en/newbunny-en.html"&gt;newbunny site&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;mypelican_static_sites&lt;/strong&gt; is the git repository project where we set it up.&lt;/p&gt;
&lt;p&gt;We make a new site is called: &lt;strong&gt;dummy.bernatchez.net&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Create the new site directory and populate it&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# create&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites
mkdir&lt;span class="w"&gt; &lt;/span&gt;dummy.bernatchez.net

&lt;span class="c1"&gt;# populate&lt;/span&gt;
cp&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;-P&lt;span class="w"&gt; &lt;/span&gt;init.files/*&lt;span class="w"&gt; &lt;/span&gt;dummy.bernatchez.net/
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;reference the pre-existing pelican/ articles within our dummy site&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You only need for the directory to exist under content/ for that.
The Makefile takes care of populating the subdirectory.&lt;/p&gt;
&lt;p&gt;We will add a placeholder.txt file in that directory so that git
clone will create the subdirectory in the future.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net
mkdir&lt;span class="w"&gt; &lt;/span&gt;content/pelican

&lt;span class="c1"&gt;# this assures pelican/ directory is created henceforth upon git clone&lt;/span&gt;
cp&lt;span class="w"&gt; &lt;/span&gt;content/pages/placeholder.txt&lt;span class="w"&gt; &lt;/span&gt;content/pelican/placeholder.txt
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;content/pelican/placeholder.txt
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Add the following lines to the end of &amp;quot;.gitignore&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites

cat&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&amp;gt;.gitignore&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&amp;lt;EOFGITIGNORE&lt;/span&gt;
&lt;span class="s"&gt;##&lt;/span&gt;
&lt;span class="s"&gt;## BEGIN added for a new site&lt;/span&gt;
&lt;span class="s"&gt;##&lt;/span&gt;

&lt;span class="s"&gt;# dummy.bernatchez.net softlinks&lt;/span&gt;

&lt;span class="s"&gt;dummy.bernatchez.net/content/favicon.ico&lt;/span&gt;
&lt;span class="s"&gt;dummy.bernatchez.net/content/images/&lt;/span&gt;
&lt;span class="s"&gt;dummy.bernatchez.net/content/site-only/&lt;/span&gt;
&lt;span class="s"&gt;dummy.bernatchez.net/content/pages/&lt;/span&gt;
&lt;span class="s"&gt;dummy.bernatchez.net/content/pelican/&lt;/span&gt;

&lt;span class="s"&gt;dummy.bernatchez.net/content/images/*&lt;/span&gt;
&lt;span class="s"&gt;dummy.bernatchez.net/content/site-only/*&lt;/span&gt;
&lt;span class="s"&gt;dummy.bernatchez.net/content/pages/*&lt;/span&gt;
&lt;span class="s"&gt;dummy.bernatchez.net/content/pelican/*&lt;/span&gt;


&lt;span class="s"&gt;# dummy.bernatchez.net bucket is all generated&lt;/span&gt;
&lt;span class="s"&gt;dummy.bernatchez.net/bucket/&lt;/span&gt;
&lt;span class="s"&gt;dummy.bernatchez.net/bucket/*&lt;/span&gt;

&lt;span class="s"&gt;##&lt;/span&gt;
&lt;span class="s"&gt;## END additions for a new site&lt;/span&gt;
&lt;span class="s"&gt;##&lt;/span&gt;
&lt;span class="s"&gt;EOFGITIGNORE&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;.gitignore
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Put the customizable files under version control&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net

git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;Makefile
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;deploy.bunny
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;favicon.ico
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;login.bunny
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;names.bunny
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;notes.txt
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;pelicanconf-en.py
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;pelicanconf-es.py
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;pelicanconf-fr.py
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;publishconf-en.py
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;publishconf-es.py
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;publishconf-fr.py
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;purge.bunny
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;puta2p.sh

&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net/pages
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;*.rst

&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net/content
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;binaries&lt;span class="w"&gt; &lt;/span&gt;images&lt;span class="w"&gt; &lt;/span&gt;sitepdfs

&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net/pages-media
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;*

&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net/pages-pdfs
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;placeholder.txt

&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net/site-only-pdfs
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;placeholder.txt

&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net/site-only
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;*.rst
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# Commit your git additions&lt;/span&gt;

&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net/
git&lt;span class="w"&gt; &lt;/span&gt;commit&lt;span class="w"&gt; &lt;/span&gt;-m&lt;span class="w"&gt; &lt;/span&gt;new-dummy-site
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Generate this first revision of the site&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net/
make&lt;span class="w"&gt; &lt;/span&gt;html

&lt;span class="c1"&gt;# revise and continue maintaining as and when required&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Once you are satisfied with the site generate a publishable version&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This relies on the bunny.net storage zone and pull zone existing
otherwise the deploy.bunny step will fail.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/repos/mypelican_static_sites/dummy.bernatchez.net/
make&lt;span class="w"&gt; &lt;/span&gt;pubhtml
&lt;/pre&gt;&lt;/div&gt;
</content><category term="pelican"/><category term="pelican"/><category term="git"/></entry><entry><title>Welcome Message</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/sitehome-en.html" rel="alternate"/><published>2026-03-22T00:38:24+00:00</published><updated>2026-03-22T00:38:24+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2026-03-22:/lang-version.en/sitehome-en.html</id><summary type="html">&lt;p class="first last"&gt;Welcome to Site&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Welcome to this site.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This site is intended to support, with documentation, anyone
maintaining the source for the pelican generated web sites contained
in our git repository.  This site in intended to be unpublished, only
viewed from the local file system.&lt;/p&gt;
</content><category term="introduction"/><category term="welcome message"/></entry><entry><title>Contacts</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/contacts-en.html" rel="alternate"/><published>2026-03-22T00:34:39+00:00</published><updated>2026-03-22T00:34:39+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2026-03-22:/lang-version.en/contacts-en.html</id><summary type="html">&lt;p class="first last"&gt;Contacts&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Please address all queries to the current site administrator.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Current Site Administrator&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pierre@bernatchez.net
&lt;/pre&gt;&lt;/div&gt;
</content><category term="Web site"/><category term="people"/><category term="administrators"/><category term="interested parties"/></entry><entry><title>About</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/siteabout-en.html" rel="alternate"/><published>2026-03-22T00:29:07+00:00</published><updated>2026-03-22T00:29:07+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2026-03-22:/lang-version.en/siteabout-en.html</id><summary type="html">&lt;p class="first last"&gt;Site rationale&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Site Version&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;2026-05-10T00:29:55+00:00&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The site is organized like a blog. Recent contributions will appear in the
main page.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Structure&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You have 4 ways of finding articles.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;The home page lists the most recent articles chronologically.&lt;/li&gt;
&lt;li&gt;Categories groups articles by category.&lt;/li&gt;
&lt;li&gt;Keywords groups articles by keyword.&lt;/li&gt;
&lt;li&gt;Archives list a table of all articles chronologically.&lt;/li&gt;
&lt;/ol&gt;
</content><category term="pages"/><category term="about"/></entry><entry><title>How To Create File Patches</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/patchhowto-en.html" rel="alternate"/><published>2025-05-24T18:23:52+00:00</published><updated>2025-05-24T18:23:52+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2025-05-24:/lang-version.en/patchhowto-en.html</id><summary type="html">&lt;p class="first last"&gt;how to create file patches&lt;/p&gt;
</summary><content type="html">&lt;div class="section" id="single-file"&gt;
&lt;h2&gt;Single File&lt;/h2&gt;
&lt;p&gt;This is how to build a patch file that you then apply on a target
system to modify one of its files.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Get original copy&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cp&lt;span class="w"&gt; &lt;/span&gt;/pathtofile/myfile.conf&lt;span class="w"&gt; &lt;/span&gt;/pathtofile/myfile.conf.orig
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Edit the file manually&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Using any editor, manually make changes to the file /pathtofile/myfile.conf as desired.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Capture the difference in a patch&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;diff&lt;span class="w"&gt; &lt;/span&gt;-u&lt;span class="w"&gt; &lt;/span&gt;/pathtofile/myfile.conf.orig&lt;span class="w"&gt; &lt;/span&gt;/pathtofile/myfile.conf&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;myfile.patch
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Try the patch&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Undo the manual changes you made&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;patch&lt;span class="w"&gt; &lt;/span&gt;-R&lt;span class="w"&gt; &lt;/span&gt;-p0&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;myfile.patch
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Redo your changes&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;patch&lt;span class="w"&gt; &lt;/span&gt;-p0&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;myfile.patch
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="recursive-directory"&gt;
&lt;h2&gt;Recursive Directory&lt;/h2&gt;
&lt;p&gt;In this example capture all the changes we make to a tree
of pelican-themes into a single patch file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Duplicate&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We start by duplicating the complete tree.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cp&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes.orig
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;TIP&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I have a tendency keep my orig copy and reuse it a lot as I modify
things.  To guard against inadvertantly changing something
within the orig version without noticing and thereby undermining
all subsequent diffs may make,  I like to boiler plate the .orig
files a bit by write protecting them.
This is not necessary but it has served me well.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;chmod&lt;span class="w"&gt; &lt;/span&gt;-w&lt;span class="w"&gt; &lt;/span&gt;--recursive&lt;span class="w"&gt; &lt;/span&gt;pelican-themes.orig/
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Create Patch File&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now we make all the changes we want within the pelican-themes directory.
Once that is done we create the patch file incorporationg all changes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes
diff&lt;span class="w"&gt; &lt;/span&gt;-Naru&lt;span class="w"&gt; &lt;/span&gt;../pelican-themes.orig&lt;span class="w"&gt; &lt;/span&gt;.&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;../pelican-themes.patch
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;-N --new-file treat absent files as empty&lt;/div&gt;
&lt;div class="line"&gt;-a --text treat all files as text&lt;/div&gt;
&lt;div class="line"&gt;-r --recursive recursively compare subdirectories&lt;/div&gt;
&lt;div class="line"&gt;-u -U --unified[=NUM] Output NUM lines of unified context (default 3)&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Undo Changes&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes
patch&lt;span class="w"&gt; &lt;/span&gt;-Rs&lt;span class="w"&gt; &lt;/span&gt;-p0&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes.patch
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;Remember that directories created by patch must be removed manually&lt;/div&gt;
&lt;div class="line"&gt;-R  --reverse  Assume the patch was created with old and new files swapped&lt;/div&gt;
&lt;div class="line"&gt;-s  --silent  be quiet unless error occurs&lt;/div&gt;
&lt;div class="line"&gt;-pN Strip smallest filepath prefix containing N slashes. 0 means full path.&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Apply Patch Changes&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes
patch&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;-p0&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes.patch
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
</content><category term="modification"/><category term="patch"/><category term="update"/><category term="revision"/><category term="modification"/><category term="correction"/><category term="difference"/><category term="how to"/></entry><entry><title>Set up a personal python package index</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/personal-pypi-en.html" rel="alternate"/><published>2025-05-24T18:23:52+00:00</published><updated>2025-05-24T18:23:52+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2025-05-24:/lang-version.en/personal-pypi-en.html</id><summary type="html">&lt;p class="first last"&gt;Setting up the DEVPI primate package index for our packages.&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This document describes setting up a private package index as a more convenient way to distribute python packages.&lt;/p&gt;
&lt;p&gt;The need to use something like this grows as we add maintainers and packages to maintain.&lt;/p&gt;
&lt;p&gt;Our python packages need to be compatile with the standard python package index PyPi.&lt;/p&gt;
&lt;p&gt;We use a private package index until we are ready to make a package available to the general public,
then we switch to PyPi.&lt;/p&gt;
&lt;p&gt;This tool we are using keeps our packages compatible with PyPi for when we do make it available there.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://devpi.net/docs/devpi/devpi/stable/+doc/quickstart-releaseprocess.html"&gt;devpi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is a conforming package index system.&lt;/p&gt;
&lt;p&gt;We will use it to serve our private  package index.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="section" id="configuring-the-sw-for-devpi"&gt;
&lt;h2&gt;Configuring the SW for devpi&lt;/h2&gt;
&lt;p&gt;This howto is derived from the following tutorial:&lt;/p&gt;
&lt;p&gt;&amp;lt;&lt;a class="reference external" href="https://devpi.net/docs/devpi/devpi/stable/+doc/quickstart-releaseprocess.html"&gt;https://devpi.net/docs/devpi/devpi/stable/+doc/quickstart-releaseprocess.html&lt;/a&gt;&amp;gt;_&lt;/p&gt;
&lt;p&gt;We are working with python3.
We want to setup up a virtual environment that conforms to our assumptions, and then install within that.
We call the environment devpi_venv.
We create a directory for our setup first.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/devpi_setup
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/devpi_setup
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We install the bare essentials.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;python3&lt;span class="w"&gt; &lt;/span&gt;-m&lt;span class="w"&gt; &lt;/span&gt;venv&lt;span class="w"&gt; &lt;/span&gt;devpi_venv
&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;devpi_venv/bin/activate
python&lt;span class="w"&gt; &lt;/span&gt;-m&lt;span class="w"&gt; &lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;pip
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;wheel
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;setuptools
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;twine
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;restview&lt;/em&gt; is A Restructured Text format viewer I find usefull. (optional)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;restview
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You invoke it and it keeps re-rendering your file as you modify it.&lt;/p&gt;
&lt;p&gt;Like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;restview&lt;span class="w"&gt; &lt;/span&gt;README.rst
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;rst2pdf&lt;/em&gt; is convenient for generating pdf copies of .rst documuents.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;rst2pdf
rst2pdf&lt;span class="w"&gt; &lt;/span&gt;doc/privatepypi.rst&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;reformatted_docs/privatepypi.pdf
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="set-up-devpi-server-on-our-laptop"&gt;
&lt;h2&gt;Set up devpi server on our laptop&lt;/h2&gt;
&lt;p&gt;Install devpi client and web server
The non web server - devpi-server - is  installed as a consequence.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;devpi-web&lt;span class="w"&gt; &lt;/span&gt;devpi-client
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Initialize an empty index (at /var/devpi-server by default)
Note I had a permissions problem with the init one.
So first I manually do this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;mkdir&lt;span class="w"&gt;  &lt;/span&gt;/var/devpi-server
sudo&lt;span class="w"&gt; &lt;/span&gt;chown&lt;span class="w"&gt; &lt;/span&gt;ubuntu:ubuntu&lt;span class="w"&gt; &lt;/span&gt;/var/devpi-server
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;devpi-init
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We want a config file for supervisor daemon to use.
This will generate a bunch of config files under the current
directory, the one we want included.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/devpi_setup
devpi-gen-config
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This gives us the file gen-config/supervisor-devpi.conf
to copy to /etc/supervisor/conf so that we can start
up the server.  I started by editing it to say
start=False so that it would need to be started
up manually.  Then I copied it to the right place for it.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;cp&lt;span class="w"&gt; &lt;/span&gt;gen-config/supervisor-devpi.conf&lt;span class="w"&gt; &lt;/span&gt;/etc/supervisor/conf.d/devpi-server.conf
sudo&lt;span class="w"&gt; &lt;/span&gt;supervisorctl&lt;span class="w"&gt; &lt;/span&gt;update
sudo&lt;span class="w"&gt; &lt;/span&gt;supervisorctl&lt;span class="w"&gt; &lt;/span&gt;start&lt;span class="w"&gt; &lt;/span&gt;devpi-server
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Create a user, login as him and create the 'dev' index&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;devpi&lt;span class="w"&gt; &lt;/span&gt;user&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;pbernatchez&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;foobar
devpi&lt;span class="w"&gt; &lt;/span&gt;login&lt;span class="w"&gt; &lt;/span&gt;pbernatchez&lt;span class="w"&gt; &lt;/span&gt;--password&lt;span class="o"&gt;=&lt;/span&gt;foobar
devpi&lt;span class="w"&gt; &lt;/span&gt;index&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;dev&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;bases&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;root/pypi
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Use our dev index&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;devpi&lt;span class="w"&gt; &lt;/span&gt;use&lt;span class="w"&gt; &lt;/span&gt;testuser/dev
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now we can make use of the private index.&lt;/p&gt;
&lt;p&gt;We are using flit to publish to our index and it relies on the file : ~/.pypirc.&lt;/p&gt;
&lt;p&gt;So we make an entry there for our index.&lt;/p&gt;
&lt;p&gt;I gave it the name 'mypypi':&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[distutils]
index-servers =
   mypypi
   testpypi

[mypypi]
repository = http://localhost:3141/pbernatchez/dev
username = pbernatchez

[testpypi]
repository = https://test.pypi.org/legacy/
username = pbernatchez
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;From here on, using flit, we can refer it as 'mypypi'.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;deactivate
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/home/ubuntu/allrepos/animbboard
&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/venv_animbboard/bin/activate
flit&lt;span class="w"&gt; &lt;/span&gt;build
flit&lt;span class="w"&gt; &lt;/span&gt;publish&lt;span class="w"&gt; &lt;/span&gt;--repository&lt;span class="w"&gt; &lt;/span&gt;mypypi
pip&lt;span class="w"&gt; &lt;/span&gt;uninstall&lt;span class="w"&gt;  &lt;/span&gt;animbboard
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;http://localhost:3141/pbernatchez/dev&lt;span class="w"&gt;  &lt;/span&gt;animbboard
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
</content><category term="python"/><category term="python"/><category term="package"/><category term="index"/><category term="distribution"/><category term="software"/><category term="deployment"/><category term="revision"/><category term="how to"/></entry><entry><title>Set up a private package index</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/privatepypi-en.html" rel="alternate"/><published>2025-05-24T18:23:52+00:00</published><updated>2025-05-24T18:23:52+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2025-05-24:/lang-version.en/privatepypi-en.html</id><summary type="html">&lt;p class="first last"&gt;set up a private package index&lt;/p&gt;
</summary><content type="html">&lt;div class="section" id="overview"&gt;
&lt;h2&gt;Overview&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;At this writing our current practise is to generate versioned
tarballs and to 'pip install' from those.&lt;/p&gt;
&lt;p&gt;This describes setting up a private package index as a more
convenient alternative to using tarballs directly.&lt;/p&gt;
&lt;p&gt;Our python software needs to be kept compatible with the standard
python package index for when we desire to offer it to the general
public.&lt;/p&gt;
&lt;p&gt;To ensure we are staying compatible with pypi, we need to run it
through the process, but with a conforming private packaging
index.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;devpi&lt;/strong&gt; to the rescue ('&lt;a class="reference external" href="https://www.devpi.net/"&gt;https://www.devpi.net/&lt;/a&gt;') .&lt;/p&gt;
&lt;p&gt;It is a conforming package index system we can use to serve our
private packages whithout releasing them to the public.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class="section" id="configuring-the-sw-for-devpi"&gt;
&lt;h2&gt;Configuring the SW for  devpi&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;This information is derived from the following tutorial:&lt;/p&gt;
&lt;p&gt;&amp;lt;&lt;a class="reference external" href="https://devpi.net/docs/devpi/devpi/stable/+doc/quickstart-releaseprocess.html"&gt;https://devpi.net/docs/devpi/devpi/stable/+doc/quickstart-releaseprocess.html&lt;/a&gt;&amp;gt;_&lt;/p&gt;
&lt;p&gt;We start by creating a virtual environment called &amp;quot;venv_devpi&amp;quot; by
following the steps described in the document virtualenv.&lt;/p&gt;
&lt;p&gt;Then we activate that environment and continue with the steps below.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class="section" id="set-up-devpi-server-on-our-laptop"&gt;
&lt;h2&gt;Set up devpi server on our laptop&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Install a devpi client and web server&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;devpi-web&lt;span class="w"&gt; &lt;/span&gt;devpi-client
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
The non-web server - devpi-server - is also installed as a side effect.
&lt;/pre&gt;
&lt;p&gt;We must avoid needing sudo to access the index, so instead we change
ownership from root to the logged in user. We also need to make sure
supervisor runs our server as that user.&lt;/p&gt;
&lt;p&gt;First manually do this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;/var/devpi-server
sudo&lt;span class="w"&gt; &lt;/span&gt;chown&lt;span class="w"&gt; &lt;/span&gt;-R&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;logname&lt;span class="k"&gt;)&lt;/span&gt;:&lt;span class="k"&gt;$(&lt;/span&gt;logname&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/var/devpi-server
ls&lt;span class="w"&gt; &lt;/span&gt;-ld&lt;span class="w"&gt; &lt;/span&gt;/var/devpi-server
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Initialize an empty index (at /var/devpi-server by default)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;devpi-init
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Make a place to put our configuration data files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/devpi_setup
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The following will generate a bunch of config files, one of which we
will need, under the current directory. Putting that stuff in
${HOME}/devpi_setup.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;pushd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;.&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;/dev/null
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/devpi_setup
devpi-gen-config
&lt;span class="nb"&gt;popd&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&amp;gt;/dev/null
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
This gave us the file  ${HOME}/devpi_setup/gen-config/supervisor-devpi.conf
as a config file to start up our pypi server.  Start by editing
it manually to say autostart=False so that it will need to be
started up manually.
&lt;/pre&gt;
&lt;p&gt;Append a line like &amp;quot;user = username&amp;quot; to the configuration so it
launches as that user, the same user as above.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;user&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;logname&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&amp;gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/devpi_setup/gen-config/supervisor-devpi.conf
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Copy the config where where it needs to be, then start our server.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;cp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/devpi_setup/gen-config/supervisor-devpi.conf&lt;span class="w"&gt; &lt;/span&gt;/etc/supervisor/conf.d/supervisor-devpi.conf
sudo&lt;span class="w"&gt; &lt;/span&gt;supervisorctl&lt;span class="w"&gt; &lt;/span&gt;update
sudo&lt;span class="w"&gt; &lt;/span&gt;supervisorctl&lt;span class="w"&gt; &lt;/span&gt;start&lt;span class="w"&gt; &lt;/span&gt;devpi-server
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Create a user (within the server), login as that user and create the 'bzdev' index&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;devpi&lt;span class="w"&gt; &lt;/span&gt;use&lt;span class="w"&gt; &lt;/span&gt;http://localhost:3141
devpi&lt;span class="w"&gt; &lt;/span&gt;user&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;pbernatchez&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dummy
devpi&lt;span class="w"&gt; &lt;/span&gt;login&lt;span class="w"&gt; &lt;/span&gt;pbernatchez&lt;span class="w"&gt; &lt;/span&gt;--password&lt;span class="o"&gt;=&lt;/span&gt;dummy
devpi&lt;span class="w"&gt; &lt;/span&gt;index&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;bzdev&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;bases&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;root/pypi
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Use our bzdev index&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;devpi&lt;span class="w"&gt; &lt;/span&gt;use&lt;span class="w"&gt; &lt;/span&gt;pbernatchez/bzdev
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now we can make use of our private index.&lt;/p&gt;
&lt;p&gt;We are using flit to publish to our index and it
relies on the file : ~/.pypirc.&lt;/p&gt;
&lt;p&gt;For pip I named it 'bzdevpi'.
So we make an entry there for our index:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
[distutils]
index-servers =
   bzdevpi
   testpypi

[bzdevpi]
repository = http://localhost:3141/pbernatchez/bzdev
username = pbernatchez

[testpypi]
repository = https://test.pypi.org/legacy/
username = pbernatchez
&lt;/pre&gt;
&lt;p&gt;From here on, using flit,&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;To publish,&lt;/div&gt;
&lt;div class="line"&gt;flit publish --repository bzdevpi&lt;/div&gt;
&lt;div class="line"&gt;To install,&lt;/div&gt;
&lt;div class="line"&gt;pip install -i &lt;a class="reference external" href="http://localhost:3141/pbernatchez/bzdev"&gt;http://localhost:3141/pbernatchez/bzdev&lt;/a&gt;   foobar&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;deactivate
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/home/ubuntu/allrepos/wait_ssh
&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/venv_generic/bin/activate
flit&lt;span class="w"&gt; &lt;/span&gt;build
flit&lt;span class="w"&gt; &lt;/span&gt;publish&lt;span class="w"&gt; &lt;/span&gt;--repository&lt;span class="w"&gt; &lt;/span&gt;bzdevpi
pip&lt;span class="w"&gt; &lt;/span&gt;uninstall&lt;span class="w"&gt; &lt;/span&gt;wait_ssh
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;http://localhost:3141/pbernatchez/bzdev&lt;span class="w"&gt; &lt;/span&gt;wait_ssh
&lt;/pre&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
</content><category term="python"/><category term="python"/><category term="package"/><category term="index"/><category term="distribution"/><category term="software"/><category term="deployment"/><category term="revision"/><category term="how to"/></entry><entry><title>Set up a python virtual environment</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/venv-en.html" rel="alternate"/><published>2025-05-24T18:23:52+00:00</published><updated>2025-05-24T18:23:52+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2025-05-24:/lang-version.en/venv-en.html</id><summary type="html">&lt;p class="first last"&gt;set up a python virtual environment&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Make sure ubuntu system version is recent enough&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;lsb_release&lt;span class="w"&gt; &lt;/span&gt;-a
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Output  (or higher)&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Distributor ID:     Ubuntu

Description:        Ubuntu 24.04.3 LTS

Release:            24.04

Codename:           noble
&lt;/pre&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;python3&lt;span class="w"&gt; &lt;/span&gt;-V
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Output&lt;/p&gt;
&lt;dl class="docutils"&gt;
&lt;dt&gt;::&lt;/dt&gt;
&lt;dd&gt;Python 3.12.3&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;strong&gt;Make a base for all our virtual environments&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.venv
&lt;span class="c1"&gt;# Now we can create all our virtual environments  under ${HOME}/.venv/&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Make a Python Virtual Environment&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# Here we call our first environment devpi&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.venv/
python3&lt;span class="w"&gt; &lt;/span&gt;-m&lt;span class="w"&gt; &lt;/span&gt;venv&lt;span class="w"&gt; &lt;/span&gt;devpi
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;OR using venvwrapper&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mkvenv&lt;span class="w"&gt; &lt;/span&gt;devpi
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once we have our environment created.
We can install the elements we need to get started.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Activate It&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.venv/devpi/bin/activate
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Or with venvwrapper&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;venv&lt;span class="w"&gt; &lt;/span&gt;devpi
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;install the basics&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# install&lt;/span&gt;
python&lt;span class="w"&gt; &lt;/span&gt;-m&lt;span class="w"&gt; &lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;pip
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;wheel
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;setuptools
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;twine
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;rst2pdf
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;flit

&lt;span class="c1"&gt;# de-activate&lt;/span&gt;
deactivate
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Saving prerequisites&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once your virtual environment is complete, it is nice to save the context.
Then you can quicky restore your virtual environment from scratch if need be.&lt;/p&gt;
&lt;p&gt;While Activated&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;freeze&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;requirements.txt

&lt;span class="c1"&gt;# It may be a good idea to keep such files under version control.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Recovering&lt;/strong&gt;
While Activated&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;requirements.txt
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Automatic activation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In many cases we want to activate a project whenever we log in.
We can do that automatically by adding something like this to .bashrc and/or .profile&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="c1"&gt;# Added for automatic vitual environment activation&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/.venv/devpi/bin/activate&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.venv/devpi/bin/activate
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;OR with venvwrapper&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="c1"&gt;# Added for automatic vitual environment activation&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="nv"&gt;VENV_HOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.venv
&lt;span class="nv"&gt;venv_wrapper&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;which&lt;span class="w"&gt; &lt;/span&gt;venvwrapper.sh&lt;span class="k"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$venv_wrapper&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$venv_wrapper&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;venv&lt;span class="w"&gt; &lt;/span&gt;devpi
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
</content><category term="python"/><category term="ubuntu"/><category term="python"/><category term="package"/><category term="distribution"/><category term="software"/><category term="deployment"/><category term="virtual environment"/><category term="how to"/></entry><entry><title>python virtual environment</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/virtualenv-en.html" rel="alternate"/><published>2025-05-24T18:23:52+00:00</published><updated>2025-05-24T18:23:52+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2025-05-24:/lang-version.en/virtualenv-en.html</id><summary type="html">&lt;p class="first last"&gt;set up a python virtual environment&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Python Virtual Environment Setup&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To have a good control over pre-requisite library modules for our
software, we run in a python virtual environment.&lt;/p&gt;
&lt;p&gt;That means that whenever you want to use or maintain the software
you must first activate that virtual environment like this:
(replace 'generic' with an existing project environment name)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/venv_generic/bin/activate
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once active you can deactivate it like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;deactivate
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="section" id="installation"&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;We install any non pip packages we rely on, if any, first.
Then we install virtualenv.
Then we create a virtual environment.
Then we activate it.&lt;/p&gt;
&lt;p&gt;Install virtualenv itself.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;update
sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;virtualenv
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Install a .rst to .pdf converter.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;snap&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;rst2pdf
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Create a virtual environment for the project&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;virtualenv&lt;span class="w"&gt; &lt;/span&gt;--prompt&lt;span class="w"&gt; &lt;/span&gt;venv_generic&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/venv_generic
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then activate the created environment&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/venv_generic/bin/activate
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now we install modules our project will need, first pip itself and the
tools it needs.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;python3&lt;span class="w"&gt; &lt;/span&gt;-m&lt;span class="w"&gt; &lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;pip
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;wheel
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;setuptools
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;twine
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We are using flit for building and installling our software.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;flit
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="saving-prerequisites"&gt;
&lt;h2&gt;Saving prerequisites&lt;/h2&gt;
&lt;p&gt;We keep our dependencies under version control, so each time
we install more components we need to refresh our requirements
file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;freeze&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/allrepos/generic/requirements.txt
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="reinstalling"&gt;
&lt;h2&gt;Reinstalling&lt;/h2&gt;
&lt;p&gt;Later, when we are migrating to a different workstation, or for some
reason need to restablish our project from scratch, we can install all
our prerequisites in one shot instead of installing items one at a
time like we did above.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/allrepos/generic/requirements.txt
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="automatic-activation"&gt;
&lt;h2&gt;Automatic activation&lt;/h2&gt;
&lt;p&gt;In many cases we want to activate a project whenver we log in, so lets
do that automatically.&lt;/p&gt;
&lt;p&gt;Append this snippet to the end of our &amp;quot;${HOME}/.bashrc&amp;quot; file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="c1"&gt;# Added for automatic vitual environment activation&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/venv_generic/bin/activate&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/venv_generic/bin/activate
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="good-ignoring-keeps-flit-happy"&gt;
&lt;h2&gt;Good ignoring keeps flit happy&lt;/h2&gt;
&lt;p&gt;Flit works nicely with git, but it is quite strict, so we must ignore
all irrelevant files properly or flit will reject builds.&lt;/p&gt;
&lt;p&gt;Below is a good start for a project &amp;quot;.gitignore&amp;quot; file:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
*~
\#*\#
dist/*
pdf_docs/*
html_docs/*
&lt;/pre&gt;
&lt;/div&gt;
</content><category term="python"/><category term="python"/><category term="package"/><category term="distribution"/><category term="software"/><category term="deployment"/><category term="virtual environment"/><category term="how to"/></entry><entry><title>Set Up A Wrapper For Venv Environments</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/vwrapper-en.html" rel="alternate"/><published>2025-05-24T18:23:52+00:00</published><updated>2025-05-24T18:23:52+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2025-05-24:/lang-version.en/vwrapper-en.html</id><summary type="html">&lt;p class="first last"&gt;virtual environment wrapper setup&lt;/p&gt;
</summary><content type="html">&lt;p&gt;To maintain more than one python project at a time we leverage the the
builtin python venv tool for creating and using virtual environments.&lt;/p&gt;
&lt;p&gt;The venvwrapper package helps to keep the maintenance of multiple virtual
environments easier.  In short venv is enough, but venvwrapper makes it
easier.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Install the venvwrapper package into your default system Python 3.
That is, with no virtual environment active.
This installs &lt;em&gt;venvwrapper.sh&lt;/em&gt; so that it is available in PATH&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;pip3&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;--break-system-packages&lt;span class="w"&gt; &lt;/span&gt;venvwrapper
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Check that it is indeed available&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;which&lt;span class="w"&gt; &lt;/span&gt;venvwrapper.sh
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Set up automatic activation of venvwrapper&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Add the code snippet below to one or both of these two files.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.bashrc
&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.profile
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Code snippet:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;VENV_HOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.venv
&lt;span class="nv"&gt;venv_wrapper&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;which&lt;span class="w"&gt; &lt;/span&gt;venvwrapper.sh&lt;span class="k"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;venv_wrapper&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;venv_wrapper&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Now Once you open a terminal window you have access to these commands&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mkvenv&lt;span class="w"&gt; &lt;/span&gt;devpi&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;# create and activate a new virtual environment&lt;/span&gt;
venv&lt;span class="w"&gt;   &lt;/span&gt;devpi&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;# activate an existing virtual environment&lt;/span&gt;
rmvenv&lt;span class="w"&gt; &lt;/span&gt;devpi&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;# remove one or more virtual environments&lt;/span&gt;
lsvenv&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="c1"&gt;# list existing virtual environments&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
</content><category term="python"/><category term="ubuntu"/><category term="python"/><category term="package"/><category term="distribution"/><category term="software"/><category term="deployment"/><category term="virtual environment"/><category term="how to"/></entry><entry><title>Metadata attributes in each article</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/articlemeta-en.html" rel="alternate"/><published>2025-04-16T00:37:11+00:00</published><updated>2025-04-16T00:37:11+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2025-04-16:/lang-version.en/articlemeta-en.html</id><summary type="html">&lt;p class="first last"&gt;Metadata in articles&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Pelican requires meta data like these&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nc"&gt;:lang:&lt;/span&gt; en
&lt;span class="nc"&gt;:date:&lt;/span&gt; 2025-04-16 00:37:11+00:00
&lt;span class="nc"&gt;:tags:&lt;/span&gt; metadata, article, pelican
&lt;span class="nc"&gt;:slug:&lt;/span&gt; articlemeta
&lt;span class="nc"&gt;:category:&lt;/span&gt; pelican
&lt;span class="nc"&gt;:authors:&lt;/span&gt; Pierre Bernatchez
&lt;span class="nc"&gt;:summary:&lt;/span&gt; Metadata in articles
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Insert them below the initial heading of every article.&lt;/p&gt;
&lt;p&gt;These ones should be identical in all translations of an article.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nc"&gt;:date:&lt;/span&gt; 2025-04-16 00:37:11+00:00
&lt;span class="nc"&gt;:slug:&lt;/span&gt; sitehome
&lt;span class="nc"&gt;:authors:&lt;/span&gt; Nuno Yobidness.
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;These ones must be be translated into the different language versions of the article.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nc"&gt;:lang:&lt;/span&gt; en
&lt;span class="nc"&gt;:tags:&lt;/span&gt; introduction
&lt;span class="nc"&gt;:category:&lt;/span&gt; pelican
&lt;span class="nc"&gt;:summary:&lt;/span&gt; Welcome to Site
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;These ones are optional.&lt;/p&gt;
&lt;p&gt;Prevents the content from coming out under menus, pages, keywords and categories.
It will be generated, but you will need a link somewhere to get to it.&lt;/p&gt;
&lt;p&gt;use the same value in all languages.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nc"&gt;:status:&lt;/span&gt; hidden
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Overrides the default page footer copyright
Value is language dependant.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nc"&gt;:fcopyright:&lt;/span&gt; Copyright © 2026 Isaac Mejia—all rights reserved.
&lt;/pre&gt;&lt;/div&gt;
&lt;!-- "DATE" A correctly formatted date can be obtained by the command "date -u - -rfc-3339=seconds" --&gt;
&lt;!-- "SLUG" is the internal Unique name for the article. --&gt;
&lt;!-- "LANG" must be one of en, fr, or es. --&gt;
&lt;!-- "TAGS" must be a list of key words separated by commas. --&gt;
&lt;!-- "CATEGORY" should be the category an article belongs to. --&gt;
&lt;!-- "SUMMARY" should be a one line summary of the article. --&gt;
</content><category term="pelican"/><category term="metadata"/><category term="article"/><category term="pelican"/></entry><entry><title>mypelican_static_sites git project</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/projreadme-en.html" rel="alternate"/><published>2025-04-16T00:37:11+00:00</published><updated>2025-04-16T00:37:11+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2025-04-16:/lang-version.en/projreadme-en.html</id><summary type="html">&lt;p class="first last"&gt;mypelican_static_sites git project description&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is a github project that uses a site generator called pelican to
generate static websites.&lt;/p&gt;
&lt;p&gt;At this writing this project maintains the content and generation for
three seperate sites.  Each site is rendered in 3 languages, english,
french and spanish.&lt;/p&gt;
&lt;p&gt;By convention we name each of these subdirectories using the domain
name of the site.  The scripts rely on this fact.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Currently Maintained Sites&lt;/strong&gt;&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;www.bernatchez.net&lt;/p&gt;
&lt;p&gt;Hosted in Bunny.net: www-bernatchez-net&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;www.ogopogo.biz&lt;/p&gt;
&lt;p&gt;Hosted in Bunny.net: www-ogopogo-biz&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;blog.bernatchez.net&lt;/p&gt;
&lt;p&gt;Hosted in Bunny.net: blog-bernatchez-net&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;docs.pelican.bernatchez.net&lt;/p&gt;
&lt;p&gt;Hosted unpublished on local file system.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Web site generation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Generate a local version of a site so that you can browse and review it
before publishing it.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;./blog.bernatchez.net
make&lt;span class="w"&gt; &lt;/span&gt;html
xdg-open&lt;span class="w"&gt; &lt;/span&gt;./bucket/index.html
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Generate an online version of the site and publish it.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;./blog.bernatchez.net
&lt;span class="c1"&gt;# Make sure the deploy.bunny file actually runs an &amp;quot;nmx&amp;quot; command rather than just echoing it.&lt;/span&gt;
make&lt;span class="w"&gt; &lt;/span&gt;pubhtml

&lt;span class="c1"&gt;# Manually Invoke the command printed as the last line by the above make&lt;/span&gt;
&lt;span class="c1"&gt;# This pushes everything out to CDN cache&lt;/span&gt;
npx&lt;span class="w"&gt; &lt;/span&gt;--yes&lt;span class="w"&gt; &lt;/span&gt;bunny-transfer@latest&lt;span class="w"&gt; &lt;/span&gt;purge&lt;span class="w"&gt; &lt;/span&gt;blog-bernatchez-net-zone
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once you have invoked &amp;quot;make pubhtml&amp;quot;, your &amp;quot;local site&amp;quot; content will
no longer be appropriate for local viewing.  If you wish to browse
both local and online versions interchangebly.  You need to repeat the
&amp;quot;make html&amp;quot; once you have published thereby leaving the local files
configured for local viewing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Web Site Maintenance&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Scope&lt;/em&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;
The git project is organized to have 2 scopes for site source
content.

*Global source scope*

   The .rst files contained in subdirectories of the main project directory.
   These files can be sourced by any of our websites.

*Local source scope*

   The .rst files contained within subdirectories under a given site subdirectory.
   These files can only be sourced by the given website.

A given site's &amp;quot;content&amp;quot; subdirectoy contains subdirectories whose
names match either global or local scope subdirectories. That
identifies what will be included in the site.

What directory names appear in the &amp;quot;content&amp;quot; directory determines
what is included in the generated site.

The make file handles populating such directories with with soft
links to the .rst source files in their corresponding local or
global scope directory.

Insofar as the repository is concerned you only &amp;quot;git add&amp;quot; .rst
files which are in global or local scope directories.  The
subdirectories under content/ will only contain &amp;quot;placeholder.txt&amp;quot;
within git to make sure their subdirectories are created upon
clone.
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;pdf source&lt;/em&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;
All our sites also contain .pdf versions of their pages.  To
produce those pdf files, each source directory also contains two
executable script files: **article2pdf**, and **qarticle2pdf**.
The latter is just a less verbose version.  Whenever you modify or
add content in a source directory, remember to re-regenerate the
.pdf files accordingly.

Generally, you modify your content, and then invoke &amp;quot;qarticle2pdf&amp;quot;
to make sure your pdfs are up to date.

If you have created a mew source directory you can generate those two scripts
in it by invoking the command &amp;quot;genarticle2pdf -q&amp;quot; inside the new directdory.
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;github maintenance&lt;/strong&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;
When you clone the github project to a local directory, you end up
with a main directory which contains web site subdirectories, each
of those is an independant web site generation directory.

The project main directory contains various *Global source scope*
site subdirectories (E.G. ./examples, ./artwork, ./travel,
etc...). Each of these contain .rst files that can serve as source
for site content generation. All under git revision control.

This *Global source scope* content can optionally be used as source
for any of the web sites.

Each web site subdirectory can also contain its own subdirectories
containing site specific *Local source scope* .rst files
(E.G. ./blog.bernatchez.net/pages/) intended only for the given
site.

To add any one of these *local or global scope* content directories
to a given web site, you need to create a directory of the same
name under the given site's content subdirectory.  You must also
add a &amp;quot;placeholder.txt&amp;quot; file and put it under revision control
(e.g. git add placeholder.txt) to enssure that new directory will
be created upon use of &amp;quot;git clone&amp;quot;.
&lt;/pre&gt;
&lt;p&gt;For example we did this to add ./examples to the ./blog.bernatchez.net web site:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;./blog.bernatchez.net/content/examples/
cp&lt;span class="w"&gt; &lt;/span&gt;./blog.bernatchez.net/content/pages/placeholder.txt&lt;span class="w"&gt; &lt;/span&gt;./blog.bernatchez.net/content/examples/
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;./blog.bernatchez.net/content/examples/placeholder.txt
&lt;/pre&gt;&lt;/div&gt;
&lt;pre class="literal-block"&gt;
You also need to modify the project .gitignore file to avoid adding
the generated soft links under content/examples into the git
repository.  Those links are regenerated every make.

We added the lines below to .gitignore:

blog.bernatchez.net/content/examples/
blog.bernatchez.net/content/examples/*
&lt;/pre&gt;
&lt;div class="section" id="repository"&gt;
&lt;h2&gt;Repository&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;The original central copy of this project's repository is:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="mailto:git&amp;#64;github.com"&gt;git&amp;#64;github.com&lt;/a&gt;:pierrebernatchez/mypelican_static_sites.git&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
</content><category term="pelican"/><category term="project"/><category term="readme"/><category term="git"/><category term="pelican"/><category term="repository"/></entry><entry><title>Article Starting Point</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/articlestarter-en.html" rel="alternate"/><published>2024-12-06T20:05:03+00:00</published><updated>2024-12-06T20:05:03+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2024-12-06:/lang-version.en/articlestarter-en.html</id><summary type="html">&lt;p class="first last"&gt;Article Starting Point&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Sample RST content to start from and modify for your article.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gh"&gt;Main Header for your article&lt;/span&gt;
&lt;span class="gh"&gt;#############################################&lt;/span&gt;

&lt;span class="nc"&gt;:lang:&lt;/span&gt; en
&lt;span class="nc"&gt;:category:&lt;/span&gt; a valid category
&lt;span class="nc"&gt;:date:&lt;/span&gt; 2025-10-11 20:03:36+00:00
&lt;span class="nc"&gt;:tags:&lt;/span&gt; article, template
&lt;span class="nc"&gt;:slug:&lt;/span&gt; unique-article-name
&lt;span class="nc"&gt;:authors:&lt;/span&gt; Pierre Bernatchez
&lt;span class="nc"&gt;:summary:&lt;/span&gt; One line Summary of your article

&lt;span class="p"&gt;..&lt;/span&gt; &lt;span class="nt"&gt;|copy|&lt;/span&gt; &lt;span class="ow"&gt;unicode&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt; 0xA9 .. copyright sign

&lt;span class="p"&gt;..&lt;/span&gt; &lt;span class="nt"&gt;|---|&lt;/span&gt; &lt;span class="ow"&gt;unicode&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt; U+02014 .. em dash
   &lt;span class="nc"&gt;:trim:&lt;/span&gt;

&lt;span class="p"&gt;..&lt;/span&gt; &lt;span class="ow"&gt;footer&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt; Copyright |copy| 2025 Pierre Bernatchez |---| all rights reserved.


Start here
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Modify the &lt;strong&gt;main header&lt;/strong&gt; to something suitable for your artricle.&lt;/p&gt;
&lt;p&gt;Modify &lt;strong&gt;category&lt;/strong&gt; to one appropriate for your article.&lt;/p&gt;
&lt;p&gt;Modify &lt;strong&gt;date&lt;/strong&gt;.  You can use command line command
&amp;quot;date -u --rfc-3339=seconds&amp;quot; to get a correctly formatted date string.&lt;/p&gt;
&lt;p&gt;Modify &lt;strong&gt;tags&lt;/strong&gt; to relevant keywords for your article.&lt;/p&gt;
&lt;p&gt;Modify &lt;strong&gt;slug&lt;/strong&gt; to be the unique name for your article.  We use that
as the basis for the file name of the .rst file. Like this
slugname-en.rst, slugname-es.rst, slugname-fr.rst are the 3 language
file names for the article with the slug: slugname.&lt;/p&gt;
&lt;p&gt;Modify &lt;strong&gt;authors&lt;/strong&gt; to your own name.&lt;/p&gt;
&lt;p&gt;Modify &lt;strong&gt;summary&lt;/strong&gt; to something appropriate to your article.&lt;/p&gt;
&lt;p&gt;Modify the name in the &lt;strong&gt;footer&lt;/strong&gt; line to yours also.&lt;/p&gt;
&lt;p&gt;Write your article, using RST markup  beginning at &lt;strong&gt;start here&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Note that there there are two convenience python scripts that can
generate something to start from for a new article.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Generate an article starting point with no image&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;newarticle&lt;span class="w"&gt; &lt;/span&gt;-h
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;usage: newarticle [-h] [-a AUTHOR] [-l {en,fr,es,all}] [-d DUP] [-r]
                  articlename

Generate a skeleton article file

positional arguments:
  articlename           article name without the &amp;quot;-en.rst&amp;quot;)

options:
  -h, --help            show this help message and exit
  -a AUTHOR, --author AUTHOR
                        Author for copyright and for authors (default &amp;quot;Pierre
                        Bernatchez)&amp;quot;
  -l {en,fr,es,all}, --lang {en,fr,es,all}
                        language of the new article (default: all)
  -d DUP, --dup DUP     Existing article name to duplicate category and tags
                        (default None)
  -r, --recipe          Treat this as a recipe. (Othewise generic)
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;OR&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Generate an article starting point with an image&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;newshot&lt;span class="w"&gt; &lt;/span&gt;-h
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Output&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;usage: newshot [-h] [-a AUTHOR] [-l {en,fr,es,all}] [-d DUP] [-j] [-r]
               articlename

Generate a skeleton article file which has a srcreenshot

positional arguments:
  articlename           article name without the &amp;quot;-en.rst&amp;quot;)

options:
  -h, --help            show this help message and exit
  -a AUTHOR, --author AUTHOR
                        Author for copyright and for authors (default &amp;quot;Pierre
                        Bernatchez)&amp;quot;
  -l {en,fr,es,all}, --lang {en,fr,es,all}
                        language of the new article (default: all)
  -d DUP, --dup DUP     Existing article name to duplicate category and tags
                        (default None)
  -j, --jpg             Reference image as a .jpg rather than a .png a
                        (default: False)
  -r, --recipe          Treat this as a recipe. (Othewise generic)
&lt;/pre&gt;&lt;/div&gt;
</content><category term="pelican"/><category term="initial"/><category term="article"/><category term="template"/></entry><entry><title>Theme «Lightweight» for pelican</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/theme-readme-en.html" rel="alternate"/><published>2024-12-06T20:02:44+00:00</published><updated>2024-12-06T20:02:44+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2024-12-06:/lang-version.en/theme-readme-en.html</id><summary type="html">&lt;p class="first last"&gt;Pelican Theme Read Me&lt;/p&gt;
</summary><content type="html">&lt;div class="section" id="description"&gt;
&lt;h2&gt;Description&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nc"&gt;:Created on:&lt;/span&gt; 14 February 2011
&lt;span class="nc"&gt;:Technologies used:&lt;/span&gt; xHTML5, CSS 1-3, polices TTF
&lt;span class="nc"&gt;:Colors Used:&lt;/span&gt; Cold Tones (grey/blue)
&lt;span class="nc"&gt;:Extensive design:&lt;/span&gt; Yes
&lt;span class="nc"&gt;:Tested Under:&lt;/span&gt; Mozilla Firefox 4.0b10, Chromium 9.0.597.83, ELinks 0.12pre5
&lt;span class="nc"&gt;:Language:&lt;/span&gt; English
&lt;span class="nc"&gt;:Details:&lt;/span&gt; See Screenshot and source
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This theme is derived From the french language lightweight theme.
It has been altered so that the home page lists only a few of the most recent articles.
It has been translated to english.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Screenshot&lt;/strong&gt;&lt;/p&gt;
&lt;img alt="Screenshot of lightweight theme in english" class="align-center" src="../images/screenshot-en.jpg" style="width: 776.4px; height: 358.2px;" /&gt;
&lt;/div&gt;
</content><category term="pelican"/><category term="theme"/><category term="readme"/></entry><entry><title>Pelican Web Site Generator Configuration</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/pelicansetup-en.html" rel="alternate"/><published>2024-12-02T17:30:00-05:00</published><updated>2024-12-02T17:30:00-05:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2024-12-02:/lang-version.en/pelicansetup-en.html</id><summary type="html">&lt;p class="first last"&gt;Pelican Web Site Generator Configuration&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Pelican is a static web site generator.
It is the tool we are using to maintain our static sites.&lt;/p&gt;
&lt;p&gt;This documet assumes we are using venvwrapper &lt;a class="footnote-reference" href="#venvwrapper" id="footnote-reference-1"&gt;[1]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Install Pelican&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Do it within our python virtual environment.
We named our environment &lt;em&gt;statsites&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Activate it, and install Pelican&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;venv&lt;span class="w"&gt; &lt;/span&gt;statsites
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;pelican
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Themes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In each of our pelicanconf.py configurations we select a theme for the given site.
To get a collection of themes to choose from, we cloned as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;clone&lt;span class="w"&gt; &lt;/span&gt;--recursive&lt;span class="w"&gt; &lt;/span&gt;https://github.com/getpelican/pelican-themes&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Site Theme Note&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In our own sites we have made a few adjustments to the lightweight theme to suit our purpose.
We maintain this derived theme and our web  content under our git version control  repository.
Our pelicanconf-en.py configuration file has  this reference.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;u&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/home/ubuntu/allrepos/mystatic_sites/derived-themes/lightweight-single-home-en&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Your site's theme will be for you to choose and/or modify.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Initialize Skeletal Site File Sytem&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Use 'pelican-quickstart' to generate initial static website content using pelican.&lt;/p&gt;
&lt;p&gt;pelican-quickstart creates the a skeletal site generation file
system beneath the current empty directory.&lt;/p&gt;
&lt;p&gt;Afterwards you create .rst files in content/anyname directories as blog articles.
Ccreate .rst files in content/pages as blog  pages.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Compilation&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
Generate the web site files once we have all our .rst source files.
For this we only need to use the Makefile.
The following will compile and emit all the web site content under output/ using pelican.&lt;/blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;html

Your&lt;span class="w"&gt; &lt;/span&gt;can&lt;span class="w"&gt; &lt;/span&gt;review&lt;span class="w"&gt; &lt;/span&gt;your&lt;span class="w"&gt; &lt;/span&gt;results&lt;span class="w"&gt; &lt;/span&gt;by&lt;span class="w"&gt; &lt;/span&gt;invoking&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;output/index.html&lt;span class="w"&gt; &lt;/span&gt;file.
&lt;/pre&gt;&lt;/div&gt;
&lt;table class="docutils footnote" frame="void" id="venvwrapper" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#footnote-reference-1"&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;We are using the package venvwrapper to simplify virtual environment management.
That fact is assumed in this document.
If you are not using it, you need to replace lines here such as: &amp;quot;venv statsites&amp;quot;,
with lines such as &amp;quot;source ${HOME}/.venv/statsites/bin/activate&amp;quot;.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</content><category term="pelican"/><category term="ubuntu"/><category term="python"/><category term="web site"/><category term="generator"/><category term="static"/><category term="how to"/><category term="configuration"/></entry><entry><title>Project Source Organization</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/sourceorg-en.html" rel="alternate"/><published>2024-12-02T17:30:00-05:00</published><updated>2024-12-02T17:30:00-05:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2024-12-02:/lang-version.en/sourceorg-en.html</id><summary type="html">&lt;p class="first last"&gt;Project Source Organization Notes&lt;/p&gt;
</summary><content type="html">&lt;p&gt;At this writing we are maintaining pelican generated static websites,
one for blog.bernatchez.net and one for www.ogopogo.biz.&lt;/p&gt;
&lt;p&gt;We use our script &amp;quot;compile_rst&amp;quot; to add a few generated .rst files to
the source site before using pelican to generate the site from source.&lt;/p&gt;
&lt;p&gt;We can generate a list of links to the files in a subdirectory.&lt;/p&gt;
&lt;p&gt;Accomplished like this in the Makefile.&lt;/p&gt;
&lt;pre class="code Make literal-block"&gt;
&lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nv"&gt;COMPILE_RST&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;-p&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'*.pdf'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;-s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;sitepdfs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;-o&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;pdfs_list&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;-i&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;That would generate a link for each .pdf file in sitepdfs/ and emit the result
to the file pdfs_list.rst&lt;/p&gt;
&lt;p&gt;Such a file is intended to be included within one or more of our manually produced .rst pages with a line like:&lt;/p&gt;
&lt;pre class="code rst literal-block"&gt;
&lt;span class="p"&gt;..&lt;/span&gt; &lt;span class="ow"&gt;include&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt; ../../pdfs_list.rst
&lt;/pre&gt;
&lt;p&gt;That would include our generated link list in that page.&lt;/p&gt;
&lt;p&gt;We can also generate music album like pages with links to the files in
a compilation subdirectory.&lt;/p&gt;
&lt;p&gt;Accomplished like this in the Makefile.&lt;/p&gt;
&lt;pre class="code Make literal-block"&gt;
&lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nv"&gt;COMPILE_RST&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;-p&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'*.mp3'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;-s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;compilations&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;-o&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;album&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;-a&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;This would generate - possibly - several album_N.rst files in the
pages/ subdirectory, where N is a sequence number.  You will get as
many pages as there are albums referenced in the m3 files in the
compilations directory.&lt;/p&gt;
&lt;p&gt;Invocations of compile_rst must take place every time the make html
target is requested.&lt;/p&gt;
&lt;p&gt;For example, the bernatchez_staticweb Makefile contains this&lt;/p&gt;
&lt;pre class="code Make literal-block"&gt;
&lt;span class="nf"&gt;html&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;

    &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;COMPILE_RST&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'*.mp3'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;compilations&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;album&lt;span class="w"&gt; &lt;/span&gt;-a&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;COMPILE_RST&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'*.tar.gz'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;tarballs&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;tarballs_list&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;COMPILE_RST&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'*.pdf'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;sitepdfs&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;pdfs_list&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;PELICAN&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;INPUTDIR&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;OUTPUTDIR&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;CONFFILE&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;PELICANOPTS&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;So that content/pages/album_N.rst files and tarballs_list.rst, pdfs_list.rst are
all regenerated prior to invoking pelican to generate the site.&lt;/p&gt;
&lt;div class="section" id="in-short"&gt;
&lt;h2&gt;In short&lt;/h2&gt;
&lt;p&gt;Files tarballs/*.tar.gz , sitepfds/*.pdf, and compilations/*.mp3 as
well as all the .rst files under the content subdirectory determine
what goes into our website.&lt;/p&gt;
&lt;p&gt;At this writing the content is only proof of concept data.&lt;/p&gt;
&lt;/div&gt;
</content><category term="pelican"/><category term="pelican"/><category term="site"/><category term="source"/><category term="organization"/></entry><entry><title>Pelican Theme Screenshots</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/themeexamples-en.html" rel="alternate"/><published>2024-12-02T17:30:00-05:00</published><updated>2024-12-02T17:30:00-05:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2024-12-02:/lang-version.en/themeexamples-en.html</id><summary type="html">&lt;p class="first last"&gt;Screenshots of pelican theme examples&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Decreasing order of preference&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;lightweight&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/lightweight&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example lightweight" src="../images/theme-lightweight.jpg" style="width: 1024px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;sneakyidea&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/sneakyidea&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example sneakyidea" src="../images/theme-sneakyidea.jpg" style="width: 1024px;" /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;basic&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/basic&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example basic" src="../images/theme-basic.jpg" style="width: 1024px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol class="arabic" start="4"&gt;
&lt;li&gt;&lt;p class="first"&gt;notmyidea-cms&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/notmyidea-cms&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example notmyidea-cms" src="../images/theme-notmyidea-cms.jpg" style="width: 1024px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;notebook&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/notebook&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example notebook" src="../images/theme-notebook.jpg" style="width: 1024px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;cebong&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/cebong&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example cebong" src="../images/theme-cebong.jpg" style="width: 1024px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol class="arabic" start="7"&gt;
&lt;li&gt;&lt;p class="first"&gt;relapse&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/relapse&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example relapse" src="../images/theme-relapse.jpg" style="width: 1024px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;bold&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/bold&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example bold" src="../images/theme-bold.jpg" style="width: 1024px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;bootstrap2-dark&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/bootstrap2-dark&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example bootstrap2-dark" src="../images/theme-bootstrap2-dark.jpg" style="width: 1024px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol class="arabic" start="10"&gt;
&lt;li&gt;&lt;p class="first"&gt;franticworld&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/franticworld&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example franticworld" src="../images/theme-franticworld.jpg" style="width: 1024px;" /&gt;
&lt;/li&gt;
&lt;/ol&gt;
</content><category term="pelican"/><category term="pelican"/><category term="theme"/><category term="screenshot"/></entry><entry><title>Theme Note</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/themenote-en.html" rel="alternate"/><published>2024-12-02T17:30:00-05:00</published><updated>2024-12-02T17:30:00-05:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2024-12-02:/lang-version.en/themenote-en.html</id><summary type="html">&lt;p class="first last"&gt;Theme Maintenance Note&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Notes regarding selecting and tweaking pelican themes used with our sites.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;To be able to use/tweak pelican themes for my pelican projects I
cloned the full collection of pelican themes to my local machine.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;clone&lt;span class="w"&gt; &lt;/span&gt;--recursive&lt;span class="w"&gt; &lt;/span&gt;https://github.com/getpelican/pelican-themes&lt;span class="w"&gt; &lt;/span&gt;/home/ubuntu/pelican-themes
&lt;/pre&gt;&lt;/div&gt;
&lt;ol class="arabic simple" start="2"&gt;
&lt;li&gt;I then replicated the tree to use as a basis for getting a diff to identify any changes that
I made during the course of tweaking themes I use.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cp&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes.orig
chmod&lt;span class="w"&gt; &lt;/span&gt;-w&lt;span class="w"&gt; &lt;/span&gt;--recursive&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes.orig&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;# To make my orig write protected for reliable diffs later.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;ol class="arabic simple" start="3"&gt;
&lt;li&gt;Do this once in a while as we tweak themes we are using, so we can keep a record of our tweaks.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/pelican-themes
diff&lt;span class="w"&gt; &lt;/span&gt;-Naru&lt;span class="w"&gt; &lt;/span&gt;../pelican-themes.orig&lt;span class="w"&gt; &lt;/span&gt;.&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;../pelican-themes.patch
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;-N --new-file treat absent files as empty&lt;/div&gt;
&lt;div class="line"&gt;-a --text treat all files as text&lt;/div&gt;
&lt;div class="line"&gt;-r --recursive recursively compare subdirectories&lt;/div&gt;
&lt;div class="line"&gt;-u -U --unified[=NUM] Output NUM lines of unified context (default 3)&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
</content><category term="pelican"/><category term="pelican"/><category term="site"/><category term="theme"/></entry><entry><title>Pelican Themes</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/pelicantheme-en.html" rel="alternate"/><published>2024-11-18T20:41:00-05:00</published><updated>2024-11-18T20:41:00-05:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2024-11-18:/lang-version.en/pelicantheme-en.html</id><summary type="html">&lt;p class="first last"&gt;Some pelican themes we tested&lt;/p&gt;
</summary><content type="html">&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;sneakyidea&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/sneakyidea&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example sneakyidea" src="../images/theme-sneakyidea.jpg" style="width: 512px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;lightweight&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/lightweight&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example lightweight" src="../images/theme-lightweight.jpg" style="width: 512px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;basic&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/basic&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example basic" src="../images/theme-basic.jpg" style="width: 512px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol class="arabic" start="4"&gt;
&lt;li&gt;&lt;p class="first"&gt;notmyidea-cms&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/notmyidea-cms&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example notmyidea-cms" src="../images/theme-notmyidea-cms.jpg" style="width: 512px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;bold&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;/home/ubuntu/pelican-themes/bold&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt="Example bold" src="../images/theme-bold.jpg" style="width: 512px;" /&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;
</content><category term="pelican"/><category term="web generator"/><category term="static"/><category term="pelican"/><category term="theme"/><category term="example"/></entry><entry><title>Github Clone Note</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/githubclonenote-en.html" rel="alternate"/><published>2015-03-19T11:47:31-04:00</published><updated>2015-03-19T11:47:31-04:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2015-03-19:/lang-version.en/githubclonenote-en.html</id><summary type="html">&lt;p class="first last"&gt;Steps After Fresh Clone Of Site Project From Github&lt;/p&gt;
</summary><content type="html">&lt;p&gt;If you have just cloned the &amp;quot;mypelican_static_sites&amp;quot; repostitory,
you need to take a few steps before generating the sites.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;pre-requisites&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Our builds for the sites maintained here rely on the &amp;quot;flitprojects&amp;quot;
project that is also under our github account's revision control.
That project relies on python virtual environments.  So we are
assuming that an adequate virtual environment is set up, and that we
have done flit build, and flit install into it of the
&amp;quot;flitprojects/articleware&amp;quot; package.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Newly cloned &amp;quot;mypelican_static_sites&amp;quot; setup steps&lt;/strong&gt;&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Install scripts to generate the pdf versions of all the articles.
These scripts are genereated so they are not kept under version control.
We use a bash script to identify the list of site subdirectories and
generate our scripts within each of those.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="code bash literal-block"&gt;
allputs.sh&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="c1"&gt;# this generates a pair of scripts in each subdirectory
# that contains article .rst files.&lt;/span&gt;
&lt;/pre&gt;
&lt;ol class="arabic simple" start="2"&gt;
&lt;li&gt;Once the scripts have been generated. We need to get all the .pdf
files generated.  We do that by going to any of the site subdirecgtories
and using make to generate the .pdf files.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="code bash literal-block"&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;www.bernatchez.net&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;pdfs
&lt;/pre&gt;
&lt;ol class="arabic simple" start="3"&gt;
&lt;li&gt;Generate your local versions of your sites so that you can
double check that they are good to go.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="code bash literal-block"&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;www.bernatchez.net&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;html&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;blog.bernatchez.net&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;html&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;www.ogopogo.biz&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;html&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;docs.pelican.bernatchez.net&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;html&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..
&lt;/pre&gt;
&lt;ol class="arabic simple" start="4"&gt;
&lt;li&gt;Generate the publishable versions of your sites and publish them.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="code bash literal-block"&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;www.bernatchez.net&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;pubhtml&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;blog.bernatchez.net&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;pubhtml&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;www.ogopogo.biz&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;pubhtml&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c1"&gt;# Only use the filesystem version of this one, so don't generate.
# We do not maintain the site with the bunny CDS.
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;docs.pelican.bernatchez.net&lt;span class="w"&gt; &lt;/span&gt;site&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'We do not maintain the site &amp;quot;docs.pelican.bernatchez.net&amp;quot; with the bunny CDS.'&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..
&lt;/pre&gt;
&lt;ol class="arabic simple" start="5"&gt;
&lt;li&gt;Make with &amp;quot;pubhtml&amp;quot; yields online locations within many of the
links inside the content.  This is incompatible with the make
&amp;quot;html&amp;quot; generated content whose links must all be file system
relative. This means that the content on the local file system is
no longer valid immediately after generating &amp;quot;pubhtml&amp;quot; content.
So we have to re-run make &amp;quot;html&amp;quot; once we have published the
content to revert the local content to what is should be.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="code bash literal-block"&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;www.bernatchez.net&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;html&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;blog.bernatchez.net&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;html&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;www.ogopogo.biz&lt;span class="w"&gt;
&lt;/span&gt;make&lt;span class="w"&gt; &lt;/span&gt;html&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..
&lt;/pre&gt;
</content><category term="pelican"/><category term="github"/><category term="clone"/><category term="how to"/></entry><entry><title>Troubleshooting Site Generation</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/troubleshoot-en.html" rel="alternate"/><published>2015-03-19T11:47:31-04:00</published><updated>2015-03-19T11:47:31-04:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2015-03-19:/lang-version.en/troubleshoot-en.html</id><summary type="html">&lt;p class="first last"&gt;Issues Surrounding Generation Of This Site&lt;/p&gt;
</summary><content type="html">&lt;p&gt;I intend to keep adding to this note as further issues crop up and workarounds
are discovered.&lt;/p&gt;
&lt;dl class="docutils"&gt;
&lt;dt&gt;1-  I found that when we use the same slug for different language versions of the same article.&lt;/dt&gt;
&lt;dd&gt;&lt;p class="first"&gt;pelican does a nice job of picking out the current default language's version for the site.
When no version exists which matches the current default language, then pelican emits warnings
and/or errors regarding the other language versions.&lt;/p&gt;
&lt;p&gt;The work around is to always make sure you have all the language versions you are supporting, or
just a single one.  When that is the case it seems to behave adequately.&lt;/p&gt;
&lt;p class="last"&gt;It seems sensible to translate attribute values too, other than slug of course.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
</content><category term="pelican"/><category term="troubleshooting"/></entry><entry><title>Web Site Articles Rendered In PDF</title><link href="https://docs.pelican.bernatchez.net/lang-version.en/pdfdoclist-en.html" rel="alternate"/><published>2015-03-11T12:47:00-04:00</published><updated>2015-03-11T12:47:00-04:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:docs.pelican.bernatchez.net,2015-03-11:/lang-version.en/pdfdoclist-en.html</id><summary type="html">&lt;p class="first last"&gt;List of articles from this site in PDF&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Site Articles Re-Rendered In PDF&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Site articles  in PDF format.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/about-en.pdf"&gt;about-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/article-meta-en.pdf"&gt;article-meta-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/articlestarter-en.pdf"&gt;articlestarter-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/clonenote-en.pdf"&gt;clonenote-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/contacts-en.pdf"&gt;contacts-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/newbunny-en.pdf"&gt;newbunny-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/newsite-en.pdf"&gt;newsite-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/pagefit-en.pdf"&gt;pagefit-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/patchhowto-en.pdf"&gt;patchhowto-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/pdfdocs-en.pdf"&gt;pdfdocs-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/pelicansetup-en.pdf"&gt;pelicansetup-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/pelicantheme-en.pdf"&gt;pelicantheme-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/personal-pypi-en.pdf"&gt;personal-pypi-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/privatepypi-en.pdf"&gt;privatepypi-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/project-readme-en.pdf"&gt;project-readme-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/sourceorg-en.pdf"&gt;sourceorg-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/themeexamples-en.pdf"&gt;themeexamples-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/themenote-en.pdf"&gt;themenote-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/themereadme-en.pdf"&gt;themereadme-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/troubleshoot-en.pdf"&gt;troubleshoot-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/venv-en.pdf"&gt;venv-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/venvwrap-en.pdf"&gt;venvwrap-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/virtualenv-en.pdf"&gt;virtualenv-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="../sitepdfs/welcome-en.pdf"&gt;welcome-en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><category term="PDF Articles"/><category term="PDF"/><category term="articles"/><category term="re-rendered"/></entry></feed>