<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>@Summitt Dweller’s Personal Blog - Testing</title>
    <link>https://blog.summittdweller.com/tags/testing/</link>
    <description>All entries in Testing on Personal Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
    <lastBuildDate>Sat, 27 Mar 2021 02:40:11 +0000</lastBuildDate>
    <atom:link href="https://blog.summittdweller.com/tags/testing/" rel="self" type="application/rss+xml" />
    
      
      <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>
