2022-01-23.md 13 KB

+++ title = "But that would be too easy" author = ["George Jones"] publishDate = 2022-01-23T00:00:00-05:00 lastmod = 2022-02-26T07:53:50-05:00 tags = ["writing"] categories = ["blog"] draft = false +++

This is a navel-gazing simple desultory philippic about adventures in yak-shaving. It is dedicated JTR's ox-hugo theme I've borrowed for the second time. Thanks!

"But you could just use wordpress"

he tells himself.

"Ahh, but then think of all the yak shaving you would miss."

he responds to himself.

"Opportunity cost, he thinks...".

"Yessss, preciousssss. The opportunity cost. Gollum. Gollum. Gollum."

These are notes-to-self on converting my blog to using JTR' new hugo template.

These are mostly of interest to (my future) self and JTR.

This is round 2 of how I use ox-hugo to pubish my blog. Round 1 is documented here https://curious.galthub.com/blog/hugo-org-github/

1 The work flow {#the-work-flow}

The general work flow is

  • .org file -> ox-hugo export -> .md in content/
  • .md in content/, images/ and static/ -> hugo -> .html in docs/
  • .html files in docs/ -> rsync -> web server public html directory

2 DONE [3/3] Action Items {#done-action-items}

2.1 DONE [7/7]Testing and figuring out what to chang {#done-testing-and-figuring-out-what-to-chang}

2.1.1 DONE Clone the JTR current template {#done-clone-the-jtr-current-template}

   git clone https://gitlab.com/taonaw/taonaw

2.1.2 DONE Set up new capture template {#done-set-up-new-capture-template}

   (setq org-capture-templates
      (quote (
              ...
             ("h" "hugo blog" entry (file "~/blog/drafts.org")
"*** TODO %^{title}
:PROPERTIES:
:EXPORT_FILE_NAME: %(format-time-string \"%Y-%m-%d\")
:EXPORT_HUGO_PUBLISHDATE: %(format-time-string \"%Y-%m-%d\"):
:END:

The short story ..

#+caption: [[https://FOO.COM/BAR/BAZ.JPG][\"Name of work\" by WHO is licensed under cc by 2.0]]
#+attr_html: :width 200px
[[file:images/BAZ.JPG]]

#+hugo: more

The long story...
"
             )

2.1.3 DONE Update config.toml {#done-update-config-dot-toml}

diff --git a/config.toml b/config.toml
index f9089c30..abc6cd5c 100644
--- a/config.toml
+++ b/config.toml
@@ -1,17 +1,17 @@
 enableRobotsTXT = true
 canonifyURLs = true
-baseurl = "https://helpdeskheadesk.net/"
+baseurl = "http://curious.galthub.com/"
 publishDir = "docs"
 languageCode = "en-us"
-title = "The Art of Not Asking Why"
+title = "Curious Musings"
 # themesDir = "themes"
 # theme = "hyde"
-disqusShortname = "taonaw"
+#disqusShortname = "curious"
 footnoteReturnLinkContents = "[^ back]"

 [author]
-    name = "JTR"
-    homepage = "helpdeskheadesk.net"
+    name = "George Jones"
+    homepage = "curious.galthub.com"

 # If Porting existing theme
 [original]
@@ -20,7 +20,7 @@ footnoteReturnLinkContents = "[^ back]"
     repo = "https://www.github.com/mdo/hyde"

 [params]
-    description = "A Blog by JTR: Tech, Life, and the Stuff in Between."
+    description = "A Blog by George Jones: Musings on life, computers, security, etc.."
 #    themeColor = "theme-base-0a"

 [paginator]

2.1.4 DONE Update the sidebar {#done-update-the-sidebar}

diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 6700d4d7..06ab109f 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -17,6 +17,9 @@
         {{ range .Site.Menus.main -}}
           <li><a href="{{.URL}}"> {{ .Name }} </a></li>
          {{- end }}
+        <!-- ELUDOM - list all my posts -->
+        <h4><a href="/blog/">All Posts ►</a></h4>
+
       </ul>
       <ul class="sidebar-nav">
           <h3>About</h3>
@@ -24,23 +27,25 @@
               <a href="{{ .Site.BaseURL }}/about">Author</a>
             </li>
             <li>
-	      <a href="{{ .Site.BaseURL }}/taonaw">TAONAW</a>
             </li>
+            <!-- ELUDOM - large image at bottom of sidebar -->
+            <img src="/thinker.png">
       </ul>
       <ul class="sidebar-icons">
         <li>
-	  <a href="http://helpdeskheadesk.net/index.xml"><i class="fa fa-rss-square fa-lg" aria-hidden="true"></i></a>
-	</li>
-	<li>
-	  <a href="https://mastodon.technology/@jrss"><i class="fab fa-mastodon fa-lg"></i></a>
+          <!-- ELUDOM - change link to RSS feed  -->
+          <a href="http://blog.galthub.com/index.xml"><i class="fa fa-rss-square fa-lg" aria-hidden="true"></i></a>
         </li>
         <li>
-	  <a href="https://keys.openpgp.org/search?q=brownexitus%40protonmail.com"><i class="fas fa-lock-open fa-lg"></i></a>
+          <!-- ELUDOM - change link to mastadon id  -->
+          <a href="https://fosstodon.com/@eludom"><i class="fab fa-mastodon fa-lg"></i></a>
         </li>
+        <!-- <li> -->
+        <!--   <a href="https://keys.openpgp.org/search?q=brownexitus%40protonmail.com"><i class="fas fa-lock-open fa-lg"></i></a> -->
+        <!-- </li> -->
       </ul>
     </nav>
   </div>
 </aside>

2.1.5 DONE Delete most of JTR' content {#done-delete-most-of-jtr-content}

  • Just delete the stuff you don't want in content/

  • Beware of browser caches with old tags (refresh)

2.1.6 DONE [6/6] Remove/replace JTR' custom artwork with Thinker {#done-remove-replace-jtr-custom-artwork-with-thinker}

  • DONE stop JTRs image from loadiing

    Comment out in /static/css/hyde.css, both

    /* background-image: url("/taonaw_logo.png"); */ twice

    George Jones :emacs: :orgmode: @eludom
    @jrss Having trouble figuring out where to remove your custom graphic from the sidebar.  Thought maybe favicon.png but I can't figure out where to remove it?
    
    JTR :emacs:☕
    @jrss@mastodon.technology
    
    @eludom taonaw_logo.png and title-logo.png in static I believe.
    
    George Jones :emacs: :orgmode: @eludom
    
    @jrss OK.   Killed it (comment) in .css.   SOMEONE (browser, hugo server, ...) was caching the image and refused to let go even after I renamed the files.
    
    • DONE add "thinker" at bottom of "about" in sidebar

    • Add immage static/thinker.png

    • Update the sidebar

    <ul class="sidebar-nav">
              <h3>About</h3>
                <li>
                  <a href="{{ .Site.BaseURL }}/about">Author</a>
                </li>
                ...
                <!-- ELUDOM - large image at bottom of sidebar -->
                <img src="/thinker.png">
    
       <img src="https://eludom.github.io/title-logo.png">
    
  • DONE load thinker image from somewhere other than github. Local?

    Make the following changes to layouts/partials/sidebar.html

    
                <!-- <img src="https://eludom.github.io/title-logo.png"> -->
                <img src="/thinker.png">
    

    and static/thinker.png

    • DONE Test on mastadon once live

      • The "normal" way to validate "twitter" cards is on the twitter web site https://cards-dev.twitter.com/validator
      • since I started using twitter cards on my blog posts, I've quit twitter. No account
      • The twitter validator requires a twitter login.
      • But mastadon (and others I'm sure) read and use the twitter card info in links/posts.
      • SOOO ... validate live by posting links to blog posts that have (should have) twitter cards to mastadon and see if they work. I tested with a private message to myself.
    • DONE Add my index of all posts back in

    Just add this to layouts/partials/sidebar.html

       <h4><a href="/blog/">All Posts ►</a></h4>
    
  • DONE Remove comment mechanism or sign up for service

    • Not there any more ?
    • Check again when I go live

2.2 DONE [2/2] Transition to new template {#done-transition-to-new-template}

2.2.1 DONE [6/6] Make a clean version of JTR new template {#done-make-a-clean-version-of-jtr-new-template}

  • DONE Do a clean checkout of JTR new template

    git clone https://gitlab.com/taonaw/taonaw
    git checkout -b20220122-barebones
    
    • DONE Pair down to almost no content

    • e.g. content_posts (mine go to content_Blog)

    • DONE Add my own minimal content (sidebar, title, a few posts)
    • DONE Make sure it works
    • DONE [2/3] Fix any problems
    • DONE Replace "Thinker" image with something attributed/credited

      Using the following, with attribution (alt tag), but local copy of image

          Short Link (Direct Image Link)
          <a href="https://www.pikpng.com/pngvi/mxwhTw_thinker-rodin-thinker-clipart/" target="_blank">Thinker - Rodin Thinker Clipart @pikpng.com</a>
      
      • DONE Comment mechanism not working, need account or delete it.
          Your Commento.io account has been suspended. Go to the Commento dashboard to resolve this.
      

      Comment out disqusShortname in config.toml

          # disqusShortname = "curious"
      

      layouts/_default/single.html

      defines

      {{ if .Site.DisqusShortname -}}
      <hr>
      <h2>Comments</h2>
      <script defer src="https://cdn.commento.io/js/commento.js"></script>
      <div id="commento"></div>
      {{- end }}
      
    • TODO Figure out why hugo thinks I don't have a #+title

      • ox-hugo export all seems to be broken. Complains that #+title not found. May have to export one by one.
    • DONE commit changes, possibly push branch

    • Note taken on [2022-01-22 Sat 11:10]

      • pushed to ssh://gitea@git.galthub.com_gmj_taonaw.git

    2.2.2 DONE [5/5] Pair down my old blog (keeping same .git) {#done-pair-down-my-old-blog--keeping-same-dot-git}

    • DONE create a branch of my content for merging in new stuff
    • DONE Delete most everything but content
    • DONE copy over templates etc from clean JTR version
    • DONE re-export my posts from curious.org

    • [ ] export everything

      • ox-hugo export all seems to be broken. Complains that #+title not found. May have to export one by one.
    • did it one by one with the help of emacs keyboard macros

    • DONE test

    2.3 DONE [4/4] Go live {#done-go-live}

    2.3.1 DONE Copy to live site {#done-copy-to-live-site}

    2.3.2 DONE test, fix any problems {#done-test-fix-any-problems}

    2.3.3 DONE have JTR look at it {#done-have-jtr-look-at-it}

    2.3.4 DONE fix any problems {#done-fix-any-problems}

    TODO 3 [0/1] Future additions {#future-additions}

    TODO 3.1 add in Wayback machines links per Karl Voit {#add-in-wayback-machines-links-per-karl-voit}

    https://karl-voit.at/2020/10/23/avoid-web-forums/