<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>@Summitt Dweller’s Personal Blog - Netlify</title>
    <link>https://blog.summittdweller.com/tags/netlify/</link>
    <description>All entries in Netlify on Personal Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
    <lastBuildDate>Mon, 30 Jan 2023 14:45:01 -0600</lastBuildDate>
    <atom:link href="https://blog.summittdweller.com/tags/netlify/" rel="self" type="application/rss+xml" />
    
      
      <item>
        <title>Gating My Content</title>
        <link>https://blog.summittdweller.com/posts/2023/01/gating-content/</link>
        <pubDate>Mon, 30 Jan 2023 14:45:01 -0600</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/posts/2023/01/gating-content/</guid>
        <description>&lt;h1 id=&#34;gating-content-in-jamstack-sites&#34;&gt;Gating Content in JAMstack Sites&lt;/h1&gt;
&lt;p&gt;This section&amp;rsquo;s title was borrowed from a &lt;a href=&#34;https://www.stackbit.com/&#34;&gt;Stackbit&lt;/a&gt; article with the same title, &lt;a href=&#34;https://www.stackbit.com/blog/gating-content-jamstack&#34;&gt;Gating Content in JAMstack Sites&lt;/a&gt;.  Working through that article to password protect some of the content at &lt;a href=&#34;https://Wieting.TamaToledo.com&#34;&gt;https://Wieting.TamaToledo.com&lt;/a&gt; is my tech pursit today.&lt;/p&gt;
&lt;h1 id=&#34;nope-not-on-netlify&#34;&gt;Nope, Not on Netlify&lt;/h1&gt;
&lt;p&gt;&amp;#x1f626;
Last evening I took a shot at implementing the &lt;em&gt;Netlify Identity&lt;/em&gt; tricks from the aforementioned article, but could not easily get it to work.  The problem, I think, is that the &lt;a href=&#34;https://Wieting.TamaToledo.com&#34;&gt;https://Wieting.TamaToledo.com&lt;/a&gt; on &lt;em&gt;Netlify&lt;/em&gt; already uses &lt;em&gt;Netlify Identity&lt;/em&gt; for authentication of my &lt;em&gt;Netlify CMS&lt;/em&gt; forms, and adding a second, separate instance of that service isn&amp;rsquo;t trivial and perhaps isn&amp;rsquo;t even feasible.  I also tried implementing some quick &lt;a href=&#34;https://www.npmjs.com/package/staticrypt&#34;&gt;Staticrypt&lt;/a&gt; CLI protection but that also failed.  &lt;em&gt;Netlify&lt;/em&gt; does provide a really quick and painless solution, but it costs $20/month, at a minimum, to enable it.&lt;/p&gt;
&lt;h1 id=&#34;new-staticrypt-strategy&#34;&gt;New Staticrypt Strategy?&lt;/h1&gt;
&lt;p&gt;So, my next shot at this will involve creating a new &lt;a href=&#34;https://www.11ty.dev/&#34;&gt;Eleventy&lt;/a&gt; site just for the Wieting&amp;rsquo;s protected content.  Wish me luck and follow along here if you like.&lt;/p&gt;
&lt;h1 id=&#34;trying-azure-devops&#34;&gt;Trying Azure DevOps&lt;/h1&gt;
&lt;p&gt;I recently created a personal Azure account, registered to &lt;em&gt;summitt.dweller@gmail.com&lt;/em&gt;, and last evening (January 31, 2023) I took a dive into &lt;a href=&#34;&#34;&gt;Azure DevOps&lt;/a&gt; under that account.  The &amp;ldquo;welcome&amp;rdquo; email that I received says I now have an &amp;ldquo;organization&amp;rdquo; URL at &lt;a href=&#34;https://dev.azure.com/summittdweller&#34;&gt;https://dev.azure.com/summittdweller&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I jumped into Azure DevOps because it looks like within that environment I can establish a Content Management System (CMS) not unlike the &lt;em&gt;NetlifyCMS&lt;/em&gt; (or perhaps it IS NCMS) that I run for the Wieting Theatre, hosted with Netlify.com.  I really like &lt;em&gt;NetlifyCMS&lt;/em&gt;, but thus far I&amp;rsquo;ve had limited success with it, and ONLY at Netlify.com where the user authentication process is nicely streamlined.  I hope that Azure DevOps has user authentication that&amp;rsquo;s just as easy to manage, and at less cost.&lt;/p&gt;
&lt;p&gt;So, I guess the strategy now is to see what Azure DevOps has to offer, rather than venturing further with &lt;a href=&#34;https://www.npmjs.com/package/staticrypt&#34;&gt;Staticrypt&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;That&amp;rsquo;s a TEMPORAY wrap, this post isn&amp;rsquo;t finished just yet.&lt;/p&gt;
</description>
      </item>
      
    
      
      <item>
        <title>Moving to Netlify CMS</title>
        <link>https://blog.summittdweller.com/posts/2021/04/moving-to-netlify-cms/</link>
        <pubDate>Sun, 04 Apr 2021 20:14:08 -0500</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/posts/2021/04/moving-to-netlify-cms/</guid>
        <description>&lt;p&gt;In my last post, &lt;a href=&#34;posts/2021/03/adding-netlify-to-this-blog/&#34;&gt;Adding &lt;em&gt;Netlify CMS&lt;/em&gt; for Editing This Blog&lt;/a&gt;, I was able to successfully engage the &lt;a href=&#34;https://www.netlifycms.org/&#34;&gt;&lt;em&gt;Netlify CMS&lt;/em&gt;&lt;/a&gt; with a &amp;ldquo;local&amp;rdquo; copy of this blog.  But I never got the CMS to work in production with this blog&amp;rsquo;s App on &lt;a href=&#34;https://www.digitalocean.com/&#34;&gt;&lt;em&gt;DigitalOcean&lt;/em&gt;&lt;/a&gt; (&lt;em&gt;DO&lt;/em&gt;). I should note that &lt;em&gt;DO&lt;/em&gt;&amp;rsquo;s support folks were very helpful, but in the end I think all of the client-side stuff that &lt;em&gt;Netlify CMS&lt;/em&gt; is doing was more than they were willing (capable?) of helping me overcome. That&amp;rsquo;s probably my fault more than their&amp;rsquo;s; client-side isn&amp;rsquo;t my strong suit.&lt;/p&gt;
&lt;p&gt;In the week since then I have, however, been able to stand up a new working copy of the &lt;a href=&#34;https://wieting.Tama-Toledo.com&#34;&gt;&lt;em&gt;Wieting Theatre&lt;/em&gt; website&lt;/a&gt; on &lt;a href=&#34;https://www.netlify.com/&#34;&gt;&lt;em&gt;Netlify.com&lt;/em&gt;&lt;/a&gt;, where it enjoys the same kind of automated builds and automatic deployment that I previously found at &lt;em&gt;DO&lt;/em&gt;.  The big difference, at Netlify.com my &lt;em&gt;Netlify CMS&lt;/em&gt; depoloyment works locally AND in production, giving me the ability to allow content editors, even those who don&amp;rsquo;t have a &lt;em&gt;Netlify.com&lt;/em&gt; or &lt;em&gt;GitHub&lt;/em&gt; account, to do what they do best, edit their content.&lt;/p&gt;
&lt;h2 id=&#34;the-wieting-theatres-new-site-and-the-crb&#34;&gt;The &lt;em&gt;Wieting Theatre&lt;/em&gt;&amp;rsquo;s New Site, and the &lt;em&gt;CRB&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;So this post started as a brain dump, chronicling how I got &lt;a href=&#34;https://Wieting.Tama-Toledo.com&#34;&gt;https://Wieting.Tama-Toledo.com&lt;/a&gt; to work.  But, instead of hashing out how I &amp;ldquo;did&amp;rdquo; it, I&amp;rsquo;m going to show you how I&amp;rsquo;m doing something similar, for a site that features the &lt;em&gt;Compass Rose Band&lt;/em&gt;, or &lt;em&gt;CRB&lt;/em&gt;, my brother-in-law&amp;rsquo;s band out of Cedar Rapids, Iowa.&lt;/p&gt;
&lt;h2 id=&#34;netlify-identity&#34;&gt;Netlify Identity&lt;/h2&gt;
&lt;p&gt;I think the real key to all of this is a &lt;em&gt;Netlify.com&lt;/em&gt; agent called &lt;a href=&#34;https://docs.netlify.com/visitor-access/identity/&#34;&gt;&lt;em&gt;Netlify Identity&lt;/em&gt;&lt;/a&gt;. From the &lt;em&gt;Netlify.com&lt;/em&gt; site and documentation&amp;hellip;&lt;/p&gt;
&lt;!-- hugo: layouts/shortcodes/original.html --&gt;
&lt;div class=&#34;original&#34;&gt;
_Netlify Identity_ service brings a full suite of authentication functionality, backed by the _GoTrue_ API. This allows you to manage and authenticate users on your site or app, without requiring them to be users of _Netlify_ or any other service. You can use this for gated content, site administration, and more.
&lt;/div&gt;
&lt;!-- /hugo: layouts/shortcodes/original.html --&gt;
&lt;p&gt;In theory, &lt;em&gt;Netlify Identity&lt;/em&gt; can be deployed anywhere, but in practice, setting it up can be quite tricky (at least it was for me).  That&amp;rsquo;s where &lt;em&gt;Netlify.com&lt;/em&gt; shines, and that&amp;rsquo;s understandable since they created both &lt;em&gt;Netlify CMS&lt;/em&gt; and &lt;em&gt;Netlify Identity&lt;/em&gt;. The two creations play well together, and make life easier for a devops like me. Well played indeed.&lt;/p&gt;
&lt;p&gt;If you read my previous post you know that in a &lt;a href=&#34;https://gohugo.io&#34;&gt;&lt;em&gt;Hugo&lt;/em&gt;&lt;/a&gt; site, like this one, the &lt;code&gt;./static/admin/config.yml&lt;/code&gt; file holds all of your CMS info.  If you host content on &lt;em&gt;Netlify.com&lt;/em&gt; with &lt;em&gt;Netlify CMS&lt;/em&gt; and &lt;em&gt;Netlify Identity&lt;/em&gt; engaged, all you really need in that config file is something like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;backend:
  name: git-gateway
  branch: main
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The rest of the CMS &amp;ldquo;magic&amp;rdquo; takes place in a server-side access manager that you can find at your &lt;em&gt;Netlify.com&lt;/em&gt; site folder at &lt;code&gt;https://app.netlify.com/sites/[site-name]/identity&lt;/code&gt;.  The client-side of the access/identity equation can be handled with an app template, and you can choose from many starter templates found at &lt;a href=&#34;https://www.netlifycms.org/docs/start-with-a-template&#34;&gt;Start with a Template&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;external-oauth-without-netlifycom&#34;&gt;External OAuth without &lt;em&gt;Netlify.com&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;If you wish to proceed without using &lt;em&gt;Netlify.com&lt;/em&gt; as your host, you&amp;rsquo;ll find a number of options at &lt;a href=&#34;https://www.netlifycms.org/docs/external-oauth-clients/&#34;&gt;External OAuth Client&lt;/a&gt;. Beware, this option isn&amp;rsquo;t for a server-side guy like me, and the &lt;em&gt;Netlify.com&lt;/em&gt; option is quick, easy, and cheap&amp;hellip; at least I think so.&lt;/p&gt;
&lt;h2 id=&#34;building-a-new-compass-rose-band-site-on-netlifycom&#34;&gt;Building a New &lt;em&gt;Compass Rose Band&lt;/em&gt; Site on &lt;em&gt;Netlify.com&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;Rather than rehashing the story of my &lt;em&gt;Wieting Theatre&lt;/em&gt; migration to &lt;em&gt;Netlify.com&lt;/em&gt;, I&amp;rsquo;m going to repeat that process and capture the journey while migrating our existing &lt;em&gt;Compass Rose Band&lt;/em&gt; site from &lt;em&gt;DO&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id=&#34;using-netlifycom-and-one-click-hugo-cms&#34;&gt;Using &lt;em&gt;Netlify.com&lt;/em&gt; and &lt;code&gt;one-click-hugo-cms&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;From the &lt;a href=&#34;https://www.netlifycms.org/docs/start-with-a-template&#34;&gt;Start with a Template&lt;/a&gt; I clicked the &lt;code&gt;Deploy to Netlify&lt;/code&gt; button under the &amp;lsquo;Hugo Site Starter&amp;rsquo; option. This was super easy since &lt;em&gt;Netlify.com&lt;/em&gt; already knows me&amp;hellip; because I created a free account about a week ago. That selection took me to a screen where I was asked to identify a new &lt;em&gt;Github&lt;/em&gt; repostory. Again, super easy because I had already logged in to &lt;em&gt;Github&lt;/em&gt; earlier.&lt;/p&gt;
&lt;p&gt;The default name for this new repository is &lt;code&gt;one-click-hugo-cms&lt;/code&gt;, same as the template repository it will be built from. I choose to name my new repo &lt;code&gt;compass-rose-band-one-click&lt;/code&gt;, for obvious reasons. That repository can be found at &lt;a href=&#34;https://github.com/SummittDweller/compass-rose-band-one-click&#34;&gt;https://github.com/SummittDweller/compass-rose-band-one-click&lt;/a&gt; where the &lt;code&gt;README.md&lt;/code&gt; file is titled &amp;ldquo;Hugo template for Netlify CMS with Netlify Identity&amp;rdquo;. The initial repository contents looked like this:&lt;/p&gt;
&lt;p&gt;&lt;!-- hugo: layouts/_default/_markup/render-image.html --&gt;
&lt;figure&gt;
  &lt;img src=&#34;https://blog.summittdweller.com/img/one-click-hugo-cms.png&#34; alt=&#34;one-click-hugo-cms&#34;&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!-- /hugo: layouts/_default/_markup/render-image.html --&gt;&lt;/p&gt;
&lt;h3 id=&#34;replacing-the-site&#34;&gt;Replacing the &lt;code&gt;/site&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;A default &lt;em&gt;Hugo&lt;/em&gt; site is automatically built and deployed for you as part of the one-click process, and &lt;em&gt;Netlify.com&lt;/em&gt; will supply an address so you can see your creation. But that&amp;rsquo;s not the &lt;em&gt;Compass Rose Band&lt;/em&gt;! No problem, I found it quick and easy to replace the default template site by first cloning my new repo to my workstation, and replacing the &lt;code&gt;/site&lt;/code&gt; directory with my own contents.  It went like this&amp;hellip;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cd ~/GitHub&lt;/code&gt;  :left_arrow: This is where I keep local copies of all my GitHub projects.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git clone https://github.com/SummittDweller/compass-rose-band-one-click&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cd compass-rose-band-one-click&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git branch -m master main&lt;/code&gt;  :left_arrow: Optional step, changes my local branch name to &amp;lsquo;main&amp;rsquo;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rm -fr site/*&lt;/code&gt;  :left_arrow: Remove the template site, the contents of &lt;code&gt;/site&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cp -fr ~/GitHub/compass-rose-band/* site/.&lt;/code&gt;  :left_arrow: Copy my local CRB site&lt;sup&gt;*&lt;/sup&gt; to &lt;code&gt;/site&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;sup&gt;*&lt;/sup&gt;Note that copying in the manner excludes all . files and directories, so the &lt;code&gt;.git&lt;/code&gt; folder is NOT copied. This is IMPORTANT!&lt;/p&gt;
&lt;p&gt;At this point, your old site has a new home in &lt;code&gt;./site&lt;/code&gt; so if you navigate there and do &lt;code&gt;hugo server&lt;/code&gt; you should see a local instance of the site.  Like so&amp;hellip;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cd site&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hugo server&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Visit &lt;code&gt;localhost:1313&lt;/code&gt;, or whatever localhost site is indicated, to see your site.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;pushing-the-site-to-github&#34;&gt;Pushing the Site to &lt;em&gt;Github&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;So, now your &lt;em&gt;Netlify.com&lt;/em&gt; project lives in a directory like my &lt;code&gt;~/GitHub/compass-rose-band-one-click&lt;/code&gt;, and the corresponding &lt;em&gt;Hugo&lt;/em&gt; site contents are in the &lt;code&gt;./site&lt;/code&gt; folder there. To deploy this new copy of your site to &lt;em&gt;Netlify.com&lt;/em&gt; simply do like this&amp;hellip;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cd ~/GitHub/compass-rose-band-one-click&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git add .&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git commit -m &amp;quot;Now with CRB site contents in ./site&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git push -u origin main&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;deploying-the-site-on-netlifycom&#34;&gt;Deploying the Site on &lt;em&gt;Netlify.com&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;By default, pushing your changes to &lt;em&gt;Github&lt;/em&gt; will automatically deploy them to your &lt;em&gt;Netlify.com&lt;/em&gt; site, but you pushed to &lt;code&gt;main&lt;/code&gt;, not &lt;code&gt;master&lt;/code&gt;, so no synchornization is likely. But that&amp;rsquo;s easy to fix.&lt;/p&gt;
&lt;p&gt;Navigate your browser to your &lt;em&gt;Netlify.com&lt;/em&gt; &amp;ldquo;team&amp;rdquo; page, find your new project there, and click on &lt;code&gt;Site Settings&lt;/code&gt;. Next you&amp;rsquo;ll see options for things like changing the name of your project and site.  I changed mine to &lt;code&gt;compass-rose-band-one-click&lt;/code&gt; to match my &lt;em&gt;Github&lt;/em&gt; repo name.&lt;/p&gt;
&lt;p&gt;Visit the &lt;code&gt;Build &amp;amp; Deploy&lt;/code&gt; link in the menu on the left side of the page, find the &lt;code&gt;Deploy contexts&lt;/code&gt; info and click &lt;code&gt;Edit settings&lt;/code&gt; there so you can change the production branch setting from &lt;code&gt;master&lt;/code&gt; to &lt;code&gt;main&lt;/code&gt;.  Leave the default setting of &amp;ldquo;Any pull request against your production branch / branch deploy branches&amp;rdquo; selected.&lt;/p&gt;
&lt;p&gt;Next, visit the &amp;ldquo;Deploys&amp;rdquo; page in your &lt;em&gt;Netlify.com&lt;/em&gt; project page at &lt;code&gt;https://app.netlify.com/sites/[project-name]/deploys&lt;/code&gt;, mine is &lt;a href=&#34;https://app.netlify.com/sites/compass-rose-band-one-click/deploys&#34;&gt;https://app.netlify.com/sites/compass-rose-band-one-click/deploys&lt;/a&gt;, and click the &lt;code&gt;Trigger deploy&lt;/code&gt; button there.  You should then see a log of the deployment as it runs, and this time it should target your new &lt;code&gt;main&lt;/code&gt; branch with your updated &lt;code&gt;./site&lt;/code&gt; contents.&lt;/p&gt;
&lt;p&gt;If successful you should see a screen featuring a block like this one:&lt;/p&gt;
&lt;p&gt;&lt;!-- hugo: layouts/_default/_markup/render-image.html --&gt;
&lt;figure&gt;
  &lt;img src=&#34;https://blog.summittdweller.com/img/netlify-preview-deploy.png&#34; alt=&#34;Successfuly deployed on Netlify.com&#34;&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!-- /hugo: layouts/_default/_markup/render-image.html --&gt;&lt;/p&gt;
&lt;p&gt;Click on the &lt;code&gt;Preview deploy ⬈&lt;/code&gt; link and voilà, your site!&lt;/p&gt;
&lt;h2 id=&#34;nownetlify-cms&#34;&gt;Now&amp;hellip;&lt;em&gt;Netlify CMS&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s getting late on this Sunday night so I&amp;rsquo;ll share the first few lines from the latest copy of my new project&amp;rsquo;s &lt;code&gt;./site/static/admin/config.yml&lt;/code&gt; file for &lt;em&gt;Netlify CMS&lt;/em&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;backend:
  name: git-gateway
  branch: main

## To make local_backend mode work you must run &amp;#39;npx netlify-cms-proxy-server&amp;#39; in its own terminal window
##   from the project root.  See https://www.netlifycms.org/docs/beta-features/ for details.
local_backend: true

media_folder: site/static/img    
public_folder: /img
...
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;whats-all-that&#34;&gt;What&amp;rsquo;s All That?&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;m back, as promised, and you&amp;rsquo;re probably asking what all that stuff in the &lt;code&gt;config.yml&lt;/code&gt; file is doing? Well, as mentioned earlier, the simple &lt;code&gt;backend:&lt;/code&gt; section (first three lines) links the CMS to the &lt;code&gt;main&lt;/code&gt; branch of our new &lt;em&gt;Github&lt;/em&gt; project.  The rest isn&amp;rsquo;t required, unless you also want to use the CMS on a local clone of the project, like when making mass edits locally.&lt;/p&gt;
&lt;p&gt;Let me try to explain.&lt;/p&gt;
&lt;h3 id=&#34;local_backend-a-netlify-cms-beta-feature&#34;&gt;&lt;code&gt;local_backend:&lt;/code&gt; A &lt;em&gt;Netlify CMS&lt;/em&gt; Beta Feature&lt;/h3&gt;
&lt;p&gt;If you visit the &lt;em&gt;Netlify CMS&lt;/em&gt;&amp;rsquo; &lt;a href=&#34;https://www.netlifycms.org/docs/beta-features/&#34;&gt;Beta Features!&lt;/a&gt; pages you&amp;rsquo;ll see &lt;code&gt;local_backend&lt;/code&gt; mentioned near the very top. [&lt;em&gt;Note that as a beta feature this information is bound to move at some point.&lt;/em&gt;] That feature enables configuration of an option to make the CMS avaialble when working locally on a cloned, presumably, copy of the &lt;em&gt;Github&lt;/em&gt; repository.  The beta documentation mentions running &lt;code&gt;npx netlify-cms-proxy-server&lt;/code&gt; as part of the process.&lt;/p&gt;
&lt;h3 id=&#34;a-local-problem-with-site--no-not-really&#34;&gt;A Local Problem with &lt;code&gt;./site&lt;/code&gt;?  No, Not Really&lt;/h3&gt;
&lt;p&gt;So, in the local clone of my new &lt;em&gt;Compass Rose Band&lt;/em&gt; one-click &lt;em&gt;Hugo&lt;/em&gt; website, the &amp;ldquo;one-click&amp;rdquo; &lt;em&gt;Netlify CMS&lt;/em&gt; parts live in the project&amp;rsquo;s root directory, and the &lt;em&gt;Hugo&lt;/em&gt; site lives just &amp;ldquo;below&amp;rdquo; it in &lt;code&gt;./site&lt;/code&gt;.  Accordingly my &lt;code&gt;media_folder:&lt;/code&gt; setting shown above includes the &lt;code&gt;site/&lt;/code&gt; prefix, and the same is true of all the &lt;code&gt;config.yml&lt;/code&gt; keys that end in &lt;code&gt;folder:&lt;/code&gt;.  This is correct for production, and it also works with a local clone IF I launch things correctly!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Hugo&lt;/em&gt; and the &lt;code&gt;hugo server&lt;/code&gt; command that I need to preview local changes demands that I either &lt;code&gt;cd site&lt;/code&gt; before I run it, or override the command&amp;rsquo;s path by specifying &lt;code&gt;hugo server -s site&lt;/code&gt;.  Only this 2nd approach works!&lt;/p&gt;
&lt;p&gt;So the process that&amp;rsquo;s needed for local development and testing, including &lt;em&gt;Netlify CMS&lt;/em&gt; looks like this for me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If I don&amp;rsquo;t yet have the project locally I will begin with&amp;hellip;
&lt;code&gt;cd ~/GitHub; git clone --recursive https://github.com/SummittDweller/compass-rose-band-one-click; cd compass-rose-band-one-click&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If I already have a local clone I&amp;rsquo;ll do this&amp;hellip;
&lt;code&gt;cd ~/GitHub/compass-rose-band-one-click; git pull&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;From here on out there&amp;rsquo;s just one process, like so&amp;hellip;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;npx netlify-cms-proxy-server&lt;/code&gt;   :left_arrow: In a new terminal window. See next section of this post.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;atom .&lt;/code&gt;  :left_arrow: Launch &lt;em&gt;Atom&lt;/em&gt; in the working directory.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hugo server -s site&lt;/code&gt;  :left_arrow: &lt;strong&gt;Important:&lt;/strong&gt; Don&amp;rsquo;t forget the &lt;code&gt;-s site&lt;/code&gt; option!&lt;/li&gt;
&lt;li&gt;Create and edit files as needed. Changes should be immediately visible in &lt;code&gt;http://localhost:1313&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;To edit or create content using &lt;em&gt;Netlify CMS&lt;/em&gt;, just visit &lt;code&gt;http://localhost:1313/admin/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;When all changes are complete&amp;hellip;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git add .&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git commit -m &amp;quot;a brief message here&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;requires-npx-part-of-nodejs&#34;&gt;Requires &lt;em&gt;npx&lt;/em&gt;, Part of &lt;em&gt;Node.js&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;npx&lt;/code&gt; command mentioned above requires that &lt;em&gt;npx&lt;/em&gt; be installed, and it&amp;rsquo;s part of &lt;em&gt;Node.js&lt;/em&gt;.  To make it run properly I followed guidance from &lt;a href=&#34;https://treehouse.github.io/installation-guides/mac/node-mac.html&#34;&gt;https://treehouse.github.io/installation-guides/mac/node-mac.html&lt;/a&gt; to ensure both were installed.  In at least one instance I also had to run &lt;code&gt;brew upgrade node&lt;/code&gt; and &lt;code&gt;npm i -g npx&lt;/code&gt; to ensure that &lt;em&gt;Node.js&lt;/em&gt; was up-to-date, and that &lt;em&gt;npx&lt;/em&gt; was available as needed.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;npx netlify-cms-proxy-server&lt;/code&gt;, loads and runs the &lt;em&gt;netlify-cms-proxy-server&lt;/em&gt; script, and in doing so it will tie up your terminal window.  So, it&amp;rsquo;s best to &lt;strong&gt;do this in a separate terminal window!&lt;/strong&gt;  Don&amp;rsquo;t put the command in the background (using a &lt;code&gt;&amp;amp;&lt;/code&gt; flag at the end) as this won&amp;rsquo;t allow you to see if the command is working properly. When you run this command you should see some feedback from the script indicating what it is doing. The script binds to your working directory then effectively routes all &lt;em&gt;Netlify CMS&lt;/em&gt; actions, performed in this instance via &lt;code&gt;http://localhost:1313/admin/&lt;/code&gt;, to the local &lt;em&gt;git&lt;/em&gt; repo there.&lt;/p&gt;
&lt;h2 id=&#34;ok-now-we-need-a-proper-domain&#34;&gt;Ok, Now We Need a Proper Domain&lt;/h2&gt;
&lt;p&gt;So, in its original form the &lt;em&gt;Compass Rose Band&lt;/em&gt; site is aliased to three different domains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://compassroseband.net&#34;&gt;https://compassroseband.net&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://thecompassroseband.com&#34;&gt;https://thecompassroseband.com&lt;/a&gt;, and&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://thecompassroseband.net&#34;&gt;https://thecompassroseband.net&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I choose to try migrating these domains to the new &lt;em&gt;Netlify.com&lt;/em&gt; site one-at-a-time, starting with the least-used domain, &lt;em&gt;thecompassroseband.net&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;To do this I started by visiting my &lt;em&gt;Netlify.com&lt;/em&gt; account/team and the &lt;code&gt;Domains&lt;/code&gt; menu, then my project-specific domain settings at &lt;a href=&#34;https://app.netlify.com/teams/summittdweller/dns/thecompassroseband.net&#34;&gt;https://app.netlify.com/teams/summittdweller/dns/thecompassroseband.net&lt;/a&gt;.  In this page I&amp;rsquo;m given a list of 4 &lt;em&gt;Netlify.com&lt;/em&gt; name servers that I can use for this particular project.  I made note of the four before moving on.&lt;/p&gt;
&lt;p&gt;Next step was to visit my registrar, &lt;em&gt;enom.com&lt;/em&gt;, where I have a control screen for editing DNS records and name servers.  I set the name server values for &lt;em&gt;thecompassroseband.net&lt;/em&gt; there to the values that &lt;em&gt;Netlify.com&lt;/em&gt; provided. And then, we wait&amp;hellip; for the changes to propogate.&lt;/p&gt;
&lt;p&gt;Fortunately, &lt;em&gt;Netlify.com&lt;/em&gt; is on the ball&amp;hellip; when I visit my new site&amp;rsquo;s domain controls page, &lt;a href=&#34;https://app.netlify.com/sites/compass-rose-band-one-click/settings/domain&#34;&gt;https://app.netlify.com/sites/compass-rose-band-one-click/settings/domain&lt;/a&gt;, I find a widget that looks like this:&lt;/p&gt;
&lt;p&gt;&lt;!-- hugo: layouts/_default/_markup/render-image.html --&gt;
&lt;figure&gt;
  &lt;img src=&#34;https://blog.summittdweller.com/img/netlify-dns-propogation.png&#34; alt=&#34;DNS Propogation&#34;&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!-- /hugo: layouts/_default/_markup/render-image.html --&gt;&lt;/p&gt;
&lt;p&gt;The cog behind &amp;ldquo;Waiting on DNS propagation&amp;rdquo; is spinning while &lt;em&gt;Netlify.com&lt;/em&gt; waits for the transfer to happen.  So, I&amp;rsquo;m going to go for a walk and see what that cog looks like in an hour or two.&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;Clear as mud?  Give it a try, and hopefully it will begin to make sense.  Until next time&amp;hellip;&lt;/p&gt;
</description>
      </item>
      
    
      
      <item>
        <title>Adding Netlify CMS for Editing This Blog</title>
        <link>https://blog.summittdweller.com/posts/2021/03/adding-netlify-to-this-blog/</link>
        <pubDate>Sat, 27 Mar 2021 02:40:11 +0000</pubDate>
        <author>Mark McFate</author>
        <guid>https://blog.summittdweller.com/posts/2021/03/adding-netlify-to-this-blog/</guid>
        <description>&lt;p&gt;OK, I&amp;rsquo;m using the &amp;ldquo;&lt;em&gt;Rich Text&lt;/em&gt;&amp;rdquo; editor option in the body field here in my &amp;ldquo;posts&amp;rdquo; &lt;strong&gt;Netlify CMS&lt;/strong&gt; form for &lt;a href=&#34;https://blog.SummittDweller.com&#34;&gt;this blog&lt;/a&gt;.  Will it work?  We shall see!&lt;/p&gt;
&lt;h2 id=&#34;yup&#34;&gt;Yup!&lt;/h2&gt;
&lt;p&gt;I have to confess, this is pretty cool.  I&amp;rsquo;m even able to switch dynamically between the &lt;em&gt;Rich Text&lt;/em&gt; and &lt;em&gt;Markdown&lt;/em&gt; editors here!&lt;/p&gt;
&lt;h1 id=&#34;how-was-this-done&#34;&gt;How Was This Done?&lt;/h1&gt;
&lt;p&gt;Let me elaborate just a bit&amp;hellip;&lt;/p&gt;
&lt;h2 id=&#34;using-hugo&#34;&gt;Using Hugo&lt;/h2&gt;
&lt;p&gt;Since this blog is published using &lt;a href=&#34;https://gohugo.io&#34;&gt;Hugo&lt;/a&gt; I looked to the Netlify CMS guidance provided at &lt;a href=&#34;https://www.netlifycms.org/docs/hugo/&#34;&gt;https://www.netlifycms.org/docs/hugo/&lt;/a&gt; for help.&lt;/p&gt;
&lt;p&gt;First I added the requested &lt;code&gt;./static/admin&lt;/code&gt; directory, and the two files required there:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;index.html&lt;/code&gt;, and&lt;/li&gt;
&lt;li&gt;&lt;code&gt;config.yml&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;indexhtml&#34;&gt;index.html&lt;/h3&gt;
&lt;p&gt;The contents of my &lt;code&gt;index.html&lt;/code&gt; file is identical to what&amp;rsquo;s called for in the documentation.  Easy.  I like.&lt;/p&gt;
&lt;h3 id=&#34;configyml&#34;&gt;config.yml&lt;/h3&gt;
&lt;p&gt;This file demands considerable customization, so I turned to more &lt;em&gt;Netlify CMS&lt;/em&gt; documentation regarding &lt;a href=&#34;https://www.netlifycms.org/docs/widgets&#34;&gt;Widgets&lt;/a&gt; and the &lt;a href=&#34;https://www.netlifycms.org/docs/github-backend/&#34;&gt;Github Backend&lt;/a&gt; that I already use.&lt;/p&gt;
&lt;p&gt;As a result, my &lt;code&gt;config.yml&lt;/code&gt; file looks like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;backend:
  name: github
  repo: SummittDweller/blogs-SummittDweller
  branch: main 

media_folder: &amp;#39;static/img&amp;#39;
public_folder: /img

collections:
  - name: &amp;#39;posts&amp;#39;
    label: &amp;#39;Post&amp;#39;
    folder: &amp;#39;content/posts&amp;#39;
    create: true
    slug: &amp;#39;{{slug}}&amp;#39;
    path: &amp;#39;{{year}}/{{month}}/{{slug}}&amp;#39;
    preview_path: &amp;#39;{{year}}/{{month}}/{{slug}}&amp;#39;
    preview_path_date_field: publishDate
    sortable_fields: [ &amp;#39;publishDate&amp;#39;, &amp;#39;lastmod&amp;#39; ]
    sort: &amp;#39;publishDate:desc&amp;#39;
    view_groups:
      - label: Year
        field: publishDate
        # groups items based on the value matched by the pattern
        pattern: \d{4}
      - label: Drafts
        field: draft
    editor:
      preview: true
    fields:
      - label: Title
        name: title
      - label: Body
        name: body
        widget: markdown 
      - label: Publish Date
        name: publishDate
        widget: date      
      - label: Last Mod
        name: lastmod
        widget: datetime
      - label: Location
        name: location
        default: &amp;#39;Toledo, IA&amp;#39;
        required: false
      - label: Weight
        name: weight
        height: &amp;#34;Enter today&amp;#39;s date with a leading dash, like -YYYYMMDD.&amp;#34;
        required: true
        # default: -{{year}}{{month}}{{day}}
      - label: Draft Status
        name: draft
        widget: boolean
        default: false 
      - label: Description
        name: description
        required: false
      - label: Tags
        name: tags
        widget: list
        hint: &amp;#39;Enter comma separated values.&amp;#39;
        required: false
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;simple--elegant&#34;&gt;Simple = Elegant&lt;/h2&gt;
&lt;p&gt;At this moment I&amp;rsquo;m running &lt;code&gt;hugo server&lt;/code&gt; on my Mac and I&amp;rsquo;m editing this post in &lt;code&gt;https://localhost:1313/admin&lt;/code&gt;, basically in the &lt;em&gt;admin&lt;/em&gt; page of my blog on my localhost.  Beautimous!&lt;/p&gt;
</description>
      </item>
      
    
  </channel>
</rss>
