<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Sync on blog.bdw.li</title>
    <link>https://blog.bdw.li/tags/sync/</link>
    <description>Recent content in Sync on blog.bdw.li</description>
    <language>en</language>
    <managingEditor>hello@bdw.li (jwb)</managingEditor>
    <webMaster>hello@bdw.li (jwb)</webMaster>
    <lastBuildDate>Fri, 22 May 2026 22:16:09 +0200</lastBuildDate>
    <atom:link href="https://blog.bdw.li/tags/sync/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Streamlined publishing</title>
      <link>https://blog.bdw.li/streamlined-publishing/?ref=rss</link>
      <pubDate>Thu, 02 Mar 2023 22:27:31 +0100</pubDate><author>hello@bdw.li (jwb)</author>
      <guid>https://blog.bdw.li/streamlined-publishing/?ref=rss</guid>
      <description>The daily struggle of a windows user.</description>
      <content:encoded><![CDATA[<p>Maybe I can make writing a habit by simply doing it once a day. But the process of publishing would need to be simpler.</p>
<p>I still struggle with a hybrid world. Hugo<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> is currently only running on my windows workstation and <code>rysnc</code> only works on my WSL.</p>
<p>I could try to debug my hugo installation on WSL, but I am too lazy to do that. I could also use <code>robocopy</code> instead of <code>rsync</code>, but I don&rsquo;t want to go that way either (working with ssh keys was a bit of a pain).</p>
<p>Now I created a quick &amp; dirty script to do my tedious tasks of publishing new posts:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># cleaning the public folder</span>
</span></span><span class="line"><span class="cl">Remove-Item ./public/* -Force -Recurse
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># generating new static content</span>
</span></span><span class="line"><span class="cl">hugo
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># uploading content</span>
</span></span><span class="line"><span class="cl">wsl rsync -avz --delete public/ user@server:/path
</span></span></code></pre></div><p>Thoughts on further improvement:</p>
<ul>
<li>Create a separate user with a passwordless key to remove the necessity to enter the ssh passphrase</li>
<li>The separate user would need to be restricted to the hugo html folder</li>
<li>Instead of <code>robocopy</code> I could look into the <code>winscp</code> cli commands</li>
<li>Thinking about a server installation of hugo &ndash; Currently posting is restricted to my workstation</li>
<li>Github Pages<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup> (or something similar) would also work, but I like that I am not depending on a third party service.</li>
</ul>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://gohugo.io" target="_blank" rel="noopener noreferrer">https://gohugo.io</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p><a href="https://gohugo.io/hosting-and-deployment/hosting-on-github" target="_blank" rel="noopener noreferrer">https://gohugo.io/hosting-and-deployment/hosting-on-github</a>&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded>
    </item>
  </channel>
</rss>
