<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: LagosLife Buzz</title>
    <description>The latest articles on DEV Community by LagosLife Buzz (@lagoslifebuzz).</description>
    <link>https://dev.to/lagoslifebuzz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4183779%2F094f1252-9760-4ace-abce-ae828e5c0774.png</url>
      <title>DEV Community: LagosLife Buzz</title>
      <link>https://dev.to/lagoslifebuzz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lagoslifebuzz"/>
    <language>en</language>
    <item>
      <title>Building LagosLife Buzz: one publication gate for pages, feeds, and search</title>
      <dc:creator>LagosLife Buzz</dc:creator>
      <pubDate>Wed, 14 Oct 2026 07:29:17 +0000</pubDate>
      <link>https://dev.to/lagoslifebuzz/building-lagoslife-buzz-one-publication-gate-for-pages-feeds-and-search-4p8</link>
      <guid>https://dev.to/lagoslifebuzz/building-lagoslife-buzz-one-publication-gate-for-pages-feeds-and-search-4p8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;AI disclosure: This article was drafted by an AI agent and checked against the project’s implementation and release records. The code excerpt is simplified for explanation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A static content site can accidentally publish an unfinished article without putting it on the homepage. A feed can expose its summary. A search index can reveal its title. An old HTML file can survive after the record returns to draft.&lt;/p&gt;

&lt;p&gt;We maintain LagosLife Buzz, an independent fan publication about the LagosLife game. We are not affiliated with the game’s developer. Our implementation uses Python to generate HTML, a small Node adapter for discovery feeds, and Cloudflare Workers Static Assets for delivery.&lt;/p&gt;

&lt;p&gt;The most useful design decision has been giving every output the same definition of “published.” Here is the approach, including the parts a publication flag cannot solve.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Separate evidence from publication
&lt;/h2&gt;

&lt;p&gt;Our records have two different jobs: describing what the editor knows and deciding what visitors can see.&lt;/p&gt;

&lt;p&gt;Research notes might mean “checked the menu” or “reported by another outlet.” Neither means the article is ready. We therefore use an explicit &lt;code&gt;publication_status&lt;/code&gt; with five allowed values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; draft → review → published
                   ↓
                withdrawn

 private: retained locally, excluded from public article output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That diagram describes an editorial workflow, not a transition system enforced by the code. The validator checks the current state.&lt;/p&gt;

&lt;p&gt;This simplified excerpt shows the selection rule; production also validates record types, slugs, duplicate routes, and publication dates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;STATES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;draft&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;review&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;published&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;private&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;withdrawn&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;select_public&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;public&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;record&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;publication_status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;STATES&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Missing or unknown publication status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;published&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;record&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An unknown value fails the build. Quietly treating a typo as a draft would hide an editorial mistake until someone noticed a missing page.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Reuse the gate across languages
&lt;/h2&gt;

&lt;p&gt;The Python HTML builder imports the publication function. Our Node feed adapter calls that same Python module through a small JSON input/output interface.&lt;/p&gt;

&lt;p&gt;That introduces a Python dependency into feed generation, which we accept because Python is already required for the site build. In return, we avoid maintaining two subtly different versions of the rules.&lt;/p&gt;

&lt;p&gt;The selected records drive article pages, archives, search, and sitemap entries. The feed adapter additionally checks that each published record has a generated HTML page before emitting its feed item.&lt;/p&gt;

&lt;p&gt;One useful test case is a draft that still has historical publication dates. Those dates must never make it public again.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Remove stale output deliberately
&lt;/h2&gt;

&lt;p&gt;Filtering input does not remove yesterday’s files.&lt;/p&gt;

&lt;p&gt;Before rendering articles, our builder compares existing article routes with the published allowlist. It removes stale &lt;code&gt;index.html&lt;/code&gt; files only inside the expected one-level story and guide directories. It validates route shapes and avoids following directory symlinks.&lt;/p&gt;

&lt;p&gt;This narrow cleanup preserves archive pages, the FAQ, and unrelated files. It also leaves images in the asset library. Consequently, &lt;code&gt;private&lt;/code&gt; is an editorial state, not an access-control mechanism: confidential documents and images must stay outside the deployable asset directory.&lt;/p&gt;

&lt;p&gt;Test both halves: the withdrawn article disappears, while neighboring files survive.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Keep evidence dates distinct
&lt;/h2&gt;

&lt;p&gt;Publication dates live in a registry; original-source links and source-check notes live with content. Guides can also record the scope and limitations of a firsthand check.&lt;/p&gt;

&lt;p&gt;That distinction matters when a game changes quickly. Seeing a registration field supports a statement about the interface. It does not establish how the backend validates every possible submission.&lt;/p&gt;

&lt;p&gt;Our templates render source links beside supported paragraphs, a source list, and credited image captions. The &lt;a href="https://lagoslifebuzz.com/sources/?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=publication-gate-20261014" rel="noopener noreferrer"&gt;source and image directory&lt;/a&gt; is another view of those records. None of this automates fact-checking; it gives editors a place to preserve the evidence and readers a route back to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Treat image derivatives as build artifacts
&lt;/h2&gt;

&lt;p&gt;Original screenshots remain available at full size. A separate Pillow step generates uncropped WebP variants, capped at the original width, and records their dimensions and hashes in a manifest. Selected imagery also has AVIF variants.&lt;/p&gt;

&lt;p&gt;The normal build validates the manifest against the originals and derivative files. Replacing a screenshot without regenerating its variants stops the build instead of silently serving outdated images.&lt;/p&gt;

&lt;p&gt;Rendered pictures use &lt;code&gt;srcset&lt;/code&gt;, layout-specific &lt;code&gt;sizes&lt;/code&gt;, and explicit dimensions. Content-hashed filenames let us apply long-lived caching to the derivative namespace without applying that policy indiscriminately to every asset.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Verify the release beyond the build
&lt;/h2&gt;

&lt;p&gt;Our checks compare published routes across HTML, sitemap, and feeds; validate canonical URLs and editorial dates; and check for links to non-public records. We also inspect mobile layouts and source-image readability.&lt;/p&gt;

&lt;p&gt;Deployment remains a separate step: Wrangler uploads &lt;code&gt;dist/&lt;/code&gt;, and we check public routes afterward. A repository push alone does not deploy this setup.&lt;/p&gt;

&lt;p&gt;For a small publication, this keeps the architecture manageable. The recurring work is still editorial: checking sources, choosing relevant stories, and recording uncertainty. The build’s job is to make those decisions consistent everywhere the content appears.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>staticsite</category>
      <category>cloudflare</category>
    </item>
  </channel>
</rss>
