<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Allan Wolfe – Web Related</title>
    <link>/technology/webrelated/</link>
    <description>Recent content in Web Related on Allan Wolfe</description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Tue, 16 Feb 2021 00:00:00 +0000</lastBuildDate>
    
	  <atom:link href="/technology/webrelated/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Technology: A Website with Joomla</title>
      <link>/technology/webrelated/joomla-install/</link>
      <pubDate>Tue, 16 Feb 2021 00:00:00 +0000</pubDate>
      
      <guid>/technology/webrelated/joomla-install/</guid>
      <description>
        
        
        &lt;hr&gt;
&lt;h4 id=&#34;overview&#34;&gt;Overview&lt;/h4&gt;
&lt;p&gt;&lt;a&gt;&lt;img src=&#34;/webrelated/images/joomla-logo.png&#34; class=&#34;float-right&#34; style=&#34;border:2px solid gray;margin-left:15px;&#34; alt=&#34;Joomla!&#34;/&gt;&lt;/a&gt; Joomla is a PHP framework that stores content and configuration in the backend database MySQL.  Joomla&#39;s framework is a modular system where much of its functionality is plugged in by packaged extensions.  Joomla excels at its flexibility for managing content (aka articles) stored as entries in the database.  There is a web administrative interface that provides a graphical text editor to input articles for &#34;contributors&#34; and features for the &#34;administrator&#34; to manage the installation.  There is a security interface for accessing the administrative and alternatively the public interface from across the web.&lt;/p&gt;
&lt;p&gt;Why did I choose Joomla versus WorkPress or Drupal?  At the time, Joomla was the best documented to install, configure and maintain.  Even at that, Joomla to the newbie can be onerous to get stood up and make functional.  If you venture beyond the stock demo theme, you have to get to know the internals of the theme to know how to configure the web site to display its content correctly.  One theme might support 3 columns, another only 2.  One theme may use one name to identify an area of the page while another could call it something else. Generally, theme based documentation tend to be scant.&lt;/p&gt;
&lt;p&gt;Why have I moved from Joomla a CMS to Hugo/SSG (static site generator)?  All my content doesn&amp;rsquo;t tend to change.  I don&amp;rsquo;t have non-technical contributors who need a user-friendly interface.  Should I have the need for ecommerce, I&amp;rsquo;d likely incorporate that function on a Joomla installation with an ecommerce plugin and referentially point to that server from out of the static content.&lt;/p&gt;
&lt;h4 id=&#34;terms-and-concepts&#34;&gt;Terms and Concepts&lt;/h4&gt;
&lt;p&gt;It took time to understand the design concept of Joomla.  First feat was to learn basic terms used by Joomla.&lt;/p&gt;
&lt;h5 id=&#34;components&#34;&gt;Components&lt;/h5&gt;
&lt;p&gt;Content elements or applications that are usually displayed in the center of the main content area of a template.  This depends on the template design.&lt;/p&gt;
&lt;p&gt;Components are core elements of Joomla&amp;rsquo;s functionality.  These core elements include Content, Banners, Contact, News Feeds, Polls and Web Links.  There are third party components which are available through &lt;a href=&#34;https://extensions.joomla.org&#34;&gt;https://extensions.joomla.org&lt;/a&gt;.&lt;/p&gt;
&lt;h5 id=&#34;plugins&#34;&gt;Plugins&lt;/h5&gt;
&lt;p&gt;A plugin is a small, task oriented function that intercepts content before it is displayed and manipulates it in some way (e.g. WYSIWYG, authentication).&lt;/p&gt;
&lt;h5 id=&#34;modules&#34;&gt;Modules&lt;/h5&gt;
&lt;p&gt;A module extends the capabilities of Joomla giving the software new functionality.  Modules are small content items that can be displayed anywhere that your template allows it to be displayed by assigning them to positions and pages through the module manager.  You can find other modules at &lt;a href=&#34;https://forge.joomla.org&#34;&gt;https://forge.joomla.org&lt;/a&gt;. Here some things to note about modules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Modules not enabled will not display.&lt;/li&gt;
&lt;li&gt;Modules can be assigned to unused positions (positions not in the template) if you want to have them published but not displayed in a position (e.g. display a module in content using &lt;code&gt;{loadposition}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Multiple modules may be assigned to the same position.  They will be displayed in the order shown for modules in that position in Module Manager.&lt;/li&gt;
&lt;li&gt;If you want to display a module in more that one position, use the Module Manager to create another copy of it.&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&#34;positions&#34;&gt;Positions&lt;/h5&gt;
&lt;p&gt;Site templates divides the &amp;ldquo;pages&amp;rdquo; displayed on a site into a series of &amp;ldquo;positions&amp;rdquo;, each with a different name.&lt;/p&gt;
&lt;p&gt;You can add/remove positions by modifying the &lt;code&gt;index.php&lt;/code&gt;.  You assign a module to a position using the Module Manager.  Positions must be defined in &lt;code&gt;templateDetails.xml&lt;/code&gt;.&lt;/p&gt;
&lt;h5 id=&#34;sections-and-categories&#34;&gt;Sections and Categories&lt;/h5&gt;
&lt;p&gt;Sections and categories allow you to organize content items/articles.  Sections contain one or more category(ies). A page may contain one or more sections. Each article is associated to a named category.  Where is appears on your website depends on the matching of a category assigned to a page equaling the category assigned to the article.&lt;/p&gt;
&lt;p&gt;Using menus, you can link directly to sections, categories and content items.  You can also select numerous options for the display of content associated with each type of link.&lt;/p&gt;
&lt;h5 id=&#34;content-itemsarticles&#34;&gt;Content Items/Articles&lt;/h5&gt;
&lt;p&gt;Content items/articles are what you think as web pages in the traditional HTML markup sense.&lt;/p&gt;
&lt;h4 id=&#34;menu-item-types&#34;&gt;Menu Item Types&lt;/h4&gt;
&lt;h5 id=&#34;articles&#34;&gt;Articles&lt;/h5&gt;
&lt;p&gt;Access to articles you can choose fromo section, category, archive, articles, front page.  Within a section, category and archive, you can choose &amp;ldquo;list or &amp;ldquo;blog&amp;rdquo; layouts.&lt;/p&gt;
&lt;h5 id=&#34;blog-layout&#34;&gt;Blog Layout&lt;/h5&gt;
&lt;p&gt;Blog layout will show a listing of all articles of the selected blog type (section and category) in the main body position of your template.&lt;/p&gt;
&lt;h5 id=&#34;list-layout&#34;&gt;List Layout&lt;/h5&gt;
&lt;p&gt;Table layout will simply give you a tabular list of all titles in a particular section or category.&lt;/p&gt;
&lt;h5 id=&#34;wrapper&#34;&gt;Wrapper&lt;/h5&gt;
&lt;p&gt;Allows you to place stand alone applications and third party websites inside your site (frame).  It is defined using the &amp;ldquo;mainbody&amp;rdquo; tag.&lt;/p&gt;
&lt;h5 id=&#34;each-component&#34;&gt;Each Component&lt;/h5&gt;
&lt;p&gt;Each component has its own link&lt;/p&gt;
&lt;h5 id=&#34;external-link&#34;&gt;External Link&lt;/h5&gt;
&lt;p&gt;A link to an external site&lt;/p&gt;
&lt;h5 id=&#34;separator&#34;&gt;Separator&lt;/h5&gt;
&lt;p&gt;Just a line used for separating items in the menu itself.&lt;/p&gt;
&lt;h5 id=&#34;alias&#34;&gt;Alias&lt;/h5&gt;
&lt;p&gt;An alias lets you make a link matching an existing menu item.&lt;/p&gt;
&lt;h5 id=&#34;front-page&#34;&gt;Front Page&lt;/h5&gt;
&lt;p&gt;By default is the &amp;ldquo;home page&amp;rdquo;.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&#34;favorite-extentions&#34;&gt;Favorite Extentions&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Akeeba Backup&lt;/strong&gt; - Essential tool to have to get a backup of your web content.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Phoca Photo Gallery&lt;/strong&gt; - A great plugin to handle your photo in a gallery style.  Phoca has other extentions that are really worth while.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DJ Image Slider&lt;/strong&gt; - Supplies the automated image slider for a main page.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;J2 Store&lt;/strong&gt; - I never used this plugin, but considered implementing it.  This extension is well designed and actively supported.  It&amp;rsquo;s drawback is no integration for PayPal or Amazon payments.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Technology: Creating a Website with Hugo</title>
      <link>/technology/webrelated/hugo-install/</link>
      <pubDate>Tue, 16 Feb 2021 00:00:00 +0000</pubDate>
      
      <guid>/technology/webrelated/hugo-install/</guid>
      <description>
        
        
        &lt;hr&gt;
&lt;h4 id=&#34;overview&#34;&gt;Overview&lt;/h4&gt;
&lt;p&gt;&lt;img src=&#34;/webrelated/images/hugo-logo.jpg&#34; alt=&#34;Hugo&#34;&gt;&lt;/p&gt;
&lt;p&gt;I read &lt;a href=&#34;https://www.howtogeek.com/683199/how-to-use-the-hugo-static-site-generator-on-linux/&#34;&gt;this article on How-to-Geek&lt;/a&gt; and was intrigued by the concept of producing a static website without the hassle of coding HTML5 markup, fiddle-farting around with the related CSS.  This is how I created this website using Hugo software framework and the Go markdown language.  I&amp;rsquo;ve been quite impressed with its simplicity and my ability to concentrate on the content.  I really like the feature for initiating a pseudo web server that dynamically rebuilds the static pages that you can view in a web browser as you save content in a file along with integration into GitHub.&lt;/p&gt;
&lt;p&gt;I started with Youtube videos to get a jump on the basics for developing my website using Hugo.  Most of what I watched were produced by Chris Stayte and Mike Dane. I used these references in getting started:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://gohugo.io/getting-started/quick-start/&#34;&gt;https://gohugo.io/getting-started/quick-start/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://snapcraft.io/hugo&#34;&gt;https://snapcraft.io/hugo&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://mdcheatsheet.com/&#34;&gt;http://mdcheatsheet.com/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://www.markdownguide.org/basic-syntax&#34;&gt;https://www.markdownguide.org/basic-syntax&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://hugo-toha.github.io/posts/&#34;&gt;https://hugo-toha.github.io/posts/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://www.jakewiesler.com/blog/hugo-directory-structure&#34;&gt;https://www.jakewiesler.com/blog/hugo-directory-structure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://themes.gohugo.io/docsy/&#34;&gt;https://themes.gohugo.io/docsy/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://www.liwen.id.au/heg/&#34;&gt;https://www.liwen.id.au/heg/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Opened account at &lt;a href=&#34;https://github.com&#34;&gt;https://github.com&lt;/a&gt;. Installed the Git package on my Fedora desktop.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;sudo dnf install git
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I also set up my project on GitHub.&lt;/p&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Installed Hugo package on my Fedora desktop&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;sudo dnf install hugo
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;Downloaded the atom workbench package from (&lt;a href=&#34;https://atom.io&#34;&gt;https://atom.io&lt;/a&gt;) and installed it.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;sudo dnf install atom.x86_64.rpm
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I played with atom a bit, but wound up just text editing the file from the command line using the vi editor.  Gedit might be more flexible to use due to positioning within a paragraph is difficult using vi.&lt;/p&gt;
&lt;h4 id=&#34;setup-website-project-for-hugo&#34;&gt;Setup Website Project for Hugo&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;cd /path/to/hugo.devlt
hugo new site awolfe.info
cd awolfe.info
git init
git add .
git status
&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;installed-theme&#34;&gt;Installed Theme&lt;/h4&gt;
&lt;p&gt;The Docsy installation guide gave instructions for installing hugo-extended and  a couple other packages.  The Hugo package on Fedora contained the &amp;ldquo;extended&amp;rdquo; feature set and did not need the other packages mentioned to be installed.  I wound up needing npm, but I installed it later.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /path/to/hugo.devlt/awolfe.info/themes
git clone --recurse-submodules --depth 1 https://github.com/google/docsy.git
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To test the theme installation I did:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd docsy/userguide
hugo server --themesDir ../..
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When the Hugo server started, it listed a table of how many pages were built and gave me the URL to access the website.  I was able to verify the example (userguide) worked though Hugo but it complained over:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;found no layout file for &amp;quot;JSON&amp;quot; for kind `home`:  You should create a template file which matches Hugo layouts Lookup Rules for this combination.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This issue was due to the config.toml file not needing the JSON on the &amp;ldquo;home&amp;rdquo; spec.&lt;/p&gt;
&lt;p&gt;[CTL]-C on the command line stops the Hugo server.  Starting off, I had two instances of Hugo server running.  The first starts up on port 1313 with the second one starting on some random port.  After running the server for a while, or when I encounter some odd issue, I found I had to kill the server and restart it to correct the issue.&lt;/p&gt;
&lt;h4 id=&#34;initial-configuration-of-my-website&#34;&gt;Initial Configuration of My Website&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hugo&amp;rsquo;s configuration begins with the &lt;code&gt;config.toml&lt;/code&gt; file and certain subdirectories.  Hugo is fueled primarily by the &lt;code&gt;themes&lt;/code&gt; installation.  If you need to modify some component in the &amp;ldquo;themes&amp;rdquo; directory, you copy it out to &lt;em&gt;&lt;strong&gt;your&lt;/strong&gt;&lt;/em&gt; website project directory and modify it.  Anything in your website project subdirectories overrides what is in the &amp;ldquo;themes&amp;rdquo; directory.  This is purposeful, in that having the theme cloned from its project source at GitHub, you withstand a future update of the theme tromping over your modifications.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To start off, I copied the &lt;code&gt;config.toml&lt;/code&gt; file from out of the &lt;code&gt;userguide&lt;/code&gt; directory from the Docsy theme into my website configuration.  I then changed the obvious suspects.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;baseURL = &amp;quot;/&amp;quot;
title = &amp;quot;Allan Wolfe&amp;quot;
themes = [&amp;quot;docsy&amp;quot;]
&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;creating-menu-structure-and-articles&#34;&gt;Creating Menu Structure and Articles&lt;/h4&gt;
&lt;p&gt;Optionally, you can modify the default front matter template at &lt;code&gt;archetypes/default.md&lt;/code&gt;.  You can create a new page by:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;hugo new pagename.md
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I wound up just copying an _index.md and going at it for the next page.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hugo looks for an &lt;code&gt;_index.html&lt;/code&gt; in the root directory of your content directory. The root page is treated differently than the subordinate pages.  For each section, there is an _index.md file in the subdirectory that supports your section landing page.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The structure of your website is defined in terms of a subdirectory structure, each with an _index.md or index.md in its directory.  (I found with the Docsy theme, only the _index.md formatted the page correctly.)  You create a subdirectory as you organize multiple articles displayed on a single section page.  Those .md (markdown) files are named something other than _index.md or index.md.&lt;/p&gt;
&lt;p&gt;My default markdown file looked something like this for top menu level:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;---
title: &amp;quot;Blue Skies&amp;quot;
linkTitle: &amp;quot;Blue Skies&amp;quot;
date: 2018-02-15
menu:
  main:
    weight: 10
---
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and this for sub sections and articles:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;---
title: &amp;quot;Some Prolific Article&amp;quot;
linkTitle: &amp;quot;Some Prolific Article&amp;quot;
weight: 100
date: 2021-02-16
description: &amp;gt;
  Some description to appear on the referencing page and in the article.
---
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I saw the term &amp;ldquo;front matter&amp;rdquo; used.  I learned that this term originated with the idea of writing a book.  Front matter in book publishing means simply the first sections of the book such as the title page, copyright page and table of contents.  &amp;ldquo;Back matter&amp;rdquo; means those sections at the end of a book such as the index or appendix.  Front matter here is merely a reference to the YAML header of a markdown file (i.e. the key/value pairs between the &amp;ldquo;&lt;code&gt;---&lt;/code&gt;&amp;rdquo; markers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is worth mentioning that the markdown files can be in the TOML, JSON or ORG format. The difference is the use of delimiters.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;All of the contents of the article is placed below the second &amp;ldquo;&lt;code&gt;---&lt;/code&gt;&amp;rdquo; marker.  Go will recognize either HTML markup or Go markdown notation in the content area below the second &amp;ldquo;&lt;code&gt;---&lt;/code&gt;&amp;rdquo; marker.  This is a really great flexible feature.  You present the content in the easiest way possible and only complicate it as needed (eg, inserting in markup for audio control to embed playing an audio file).  The Go language doesn&amp;rsquo;t provide for all of what you can do in HTML markup but is preferred when possible &amp;ndash; K.I.S.S. (keep it simple stupid) principle.&lt;/p&gt;
&lt;p&gt;One frustration I had was figuring out why the format of my pages were not what I saw in the Docsy example code.  Since I went with my own menu item names, I had to copy out the particular &lt;code&gt;themes/docsy/layouts&lt;/code&gt; subdirectory for the format I wanted into my project&amp;rsquo;s layout with the directory name the same as the menu item directory name.&lt;/p&gt;
&lt;p&gt;For the document based menu items, I copied over &lt;code&gt;themes/docsy/layouts/docs&lt;/code&gt; directory.  Since the &amp;ldquo;Blog&amp;rdquo; was the same name as what was defined in the theme layout, I didn&amp;rsquo;t need to copy it over.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /path/to/hugo.devlt/awolfe.info
cp -R ./themes/layouts/docs ./layouts/technology
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;static&lt;/code&gt; directory is reserved for files that are referenced but not interpreted (e.g. image files, but no markdown or HTML files).  You can create subdirectories to better organize such things as image or pdf files for inclusion in your markdown or for download.  In your markdown, you can referentially reference these files beginning with &amp;ldquo;&lt;code&gt;/&lt;/code&gt;&amp;rdquo; followed by the subdirectory you created.  &amp;ldquo;&lt;code&gt;static&lt;/code&gt;&amp;rdquo; is not in the path of your relative reference.&lt;/p&gt;
&lt;p&gt;Another feature of Go/Hugo is the ability to create your own code snippets called &amp;ldquo;shortcodes&amp;rdquo;.  Shortcodes are stored at &lt;code&gt;layouts/shortcodes&lt;/code&gt; and referenced in your markdown using double curly brackets.  See the &lt;a href=&#34;https://gohugo.io/content-management/shortcodes/&#34;&gt;Hugo documentation&lt;/a&gt; for more information.&lt;/p&gt;
&lt;h4 id=&#34;enabling-the-search-function&#34;&gt;Enabling the Search Function&lt;/h4&gt;
&lt;p&gt;Of all the work done to stand up my website, enabling search was the most confusing.  Hugo provides some built-in integration with some commercial search engines for the private space such as Google&amp;rsquo;s GCSE or Algolia.  I chose to go with Lunr.js since my web server is small and I didn&amp;rsquo;t want to tax it with cranking out search results.  I preferred to decentralize it to the client since my index file would be relatively small.  Hugo provides support for Lunr.js, but the documentation could be improved.  There is also a dependancy here on the theme implements the function.  I used the Docsy theme and it had its own documentation that provided some different perspective on how it integrated search into its theme and how to configure for it.  Here is what I did to get it to work for me.&lt;/p&gt;
&lt;p&gt;First, NPM (a javascript package manager) is needed to be installed in order to install certain packages that Hugo needs for producing an index file for downloading to the client. (I also found it needed some additional packages to publish the static content).&lt;/p&gt;
&lt;p&gt;On Fedora Linux:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo dnf install -y gcc c++ make
curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -
sudo dnf install npm
node -v      ## check that node installed correctly
npm -v       ## check that npm installed correctly
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Gulp was needed to generate the index in JSON format.  To install Gulp:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo npm install gulp-cli -g
gulp -v      ## Check that gulp installed and functions
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Modified the Hugo project config.toml:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /path/to/hugo.devlt/awolfe.info
vi config.toml
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Commented out the GCSE ID, turning off Algolia and enabling lunr.js:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Google Custom Search Engine ID. Remove or comment out to disable search.
#gcs_engine_id = &amp;quot;011217106833237091527:la2vtv2emlw&amp;quot;

# Enable Algolia DocSearch
algolia_docsearch = false

# Enable local search (i.e. client side search using lunr.js))
offlineSearch = true
offlineSearchMacResults = 25
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Gulp is used to create the search***.json file in the build of the /public static files. The guides I read instructed to manually run Gulp before compiling the static files with Hugo.  It wasn&amp;rsquo;t worth the effort to manually create the index search file since Hugo does that as part of the build process anyway.&lt;/p&gt;
&lt;h4 id=&#34;build-static-pages&#34;&gt;Build Static Pages&lt;/h4&gt;
&lt;p&gt;Publishing the static pages was fairly simple.  I experienced some whining out of Hugo that required adding some extra packages using npm to install them.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /path/to/hugo.devlt/awolfe.info
npm --save-dev gulp postcss postcss-cli autoprefixer hugo-search-index
hugo 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The output defaults to a &lt;code&gt;./public&lt;/code&gt; directory.  The &lt;code&gt;npm --save-dev&lt;/code&gt; saves the package to the project directory &lt;code&gt;node_modules&lt;/code&gt; directory.  In trying to install globally produced some errors that I didn&amp;rsquo;t have just installing locally.  I&amp;rsquo;m not creating multiple websites anyway.&lt;/p&gt;
&lt;p&gt;After publishing, starting the Hugo server again, I tested the search feature and reviewed the structure and content of my web site before copying the /public directory to my web server.&lt;/p&gt;
&lt;h4 id=&#34;github-push&#34;&gt;GitHub Push&lt;/h4&gt;
&lt;p&gt;Update your GitHub repository:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /path/to/hugo.devlt/awolfe.info
git push -u origin myproject
&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;final-notes&#34;&gt;Final Notes&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;If you wish to exclude a page from the search index file, add this line to the front matter of the .md file:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;exclude_search: true&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you wish to mark an article as &amp;ldquo;draft&amp;rdquo;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;draft: true
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Other References&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Ecommerce on Hugo&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Chris Marshall has an interesting design, though no code for a &lt;a href=&#34;https://www.howtogeek.com/683199/how-to-use-the-hugo-static-site-generator-on-linux/&#34;&gt;Scalable Static Ecommerce Architecture (SSEA)&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;(https://www.howtogeek.com/683199/how-to-use-the-hugo-static-site-generator-on-linux/)&#34;&gt;SnipCart&lt;/a&gt; has a tutorial on constructing a static ecommerce &amp;ldquo;ecosystem&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.smashingmagazine.com/2019/08/shopping-cart-html5-web-storage/&#34;&gt;Smashing Magazine&lt;/a&gt; has a client-side chopping cart solution integrated into the Hugo framework.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Photo Gallery in Hugo&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://lab.iamrohit.in/p/liwenyip/hugo-easy-gallery&#34;&gt;Hugo Easy Gallery&lt;/a&gt; the photo gallery solution I used on this website.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
