<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="atom-style.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <id>https://corion.net/blog/tag/blogging/</id>
    <title>Corions Musings</title>
    <updated>2026-02-22T00:00:00Z</updated>
    <link href="https://corion.net/blog/tag/blogging.atom" rel="self" />
    <link href="https://corion.net/blog/tag/blogging/" rel="alternate" />
    <generator version="0.098">Statocles</generator>

    <entry>
        <id>https://corion.net/blog/2026/02/22/using-make-to-live-edit-statocles-posts-on-update/</id>
        <title>Using make to live-edit statocles posts on update</title>
        <link href="https://corion.net/blog/2026/02/22/using-make-to-live-edit-statocles-posts-on-update/" rel="alternate" />
        <content type="html"><![CDATA[
            <p>When I write a blog entry, I usually end in the following loop:</p>

<ol>
<li>Write/update the <code>.markdown</code> file</li>
<li>Regenerate the HTML using <code>statocles build</code>; this regenerates the whole site</li>
<li>Refresh my browser to view the current page</li>
</ol>

<p>Glueing together <a href="https://metacpan.org/pod/Mojo::File::ChangeNotify">Mojo::File::ChangeNotify</a>
and <a href="https://github.com/Corion/App-Mojo-AssetReloader">App::Mojo::AssetReloader</a> and a nice default rule using <code>make</code> for changed files makes updating the browser automatic and somewhat instant.</p>

<h3>The Makefile</h3>

<pre><code>BLOGPOSTS=$(wildcard blog/*/*/*/*/*.markdown)
HTML=$(patsubst %.markdown,.statocles/build/%.html,$(BLOGPOSTS))

all: $(HTML)

%.html: $(patsubst $(patsubst .statocles/build/,,$&lt;),.html,.markdown)
    statocles build
</code></pre>

<p>The main &quot;problem&quot; now is opening the loong URL in the browser
 manually. Having <code>make</code> also work with processes
 ( via <code>/proc/(pid)/cmdline</code> ) is something for a later day.</p>

<p>It would be great if <code>statocles</code> supported building a single page, but
so far, I&#39;ve resolved to rebuilding the whole site every time.</p>


                <p>Tags:
                    <a href="https://corion.net/blog/tag/perl/">perl</a>
                    <a href="https://corion.net/blog/tag/blogging/">blogging</a>
                </p>

        ]]></content>
        <updated>2026-02-22T00:00:00Z</updated>
        <category term="perl" />
        <category term="blogging" />
    </entry>
</feed>

