CINXE.COM

A simple solution for publishing scheduled posts - tips & tricks - HUGO

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>A simple solution for publishing scheduled posts - tips &amp; tricks - HUGO</title> <meta name="description" content="This week I set out to come up with a way to automatically published future-dated posts to your website. At first, I was looking at the static post scheduler from Serverless. This is a neat solution, but I didn’t like t&amp;hellip;"> <meta name="generator" content="Discourse 3.4.0.beta3-dev - https://github.com/discourse/discourse version 5bf5d1335680f28a8eb65c488353be9585eed08e"> <link rel="icon" type="image/png" href="https://global.discourse-cdn.com/flex036/uploads/gohugo/optimized/2X/6/66a05218f64425b2fa59ede30c1b4b7dc1fdf5f9_2_32x32.ico"> <link rel="apple-touch-icon" type="image/png" href="https://global.discourse-cdn.com/flex036/uploads/gohugo/optimized/2X/c/c2d3414c64e766d814100b32063948e604298a70_2_180x180.png"> <meta name="theme-color" media="all" content="#0a1922"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover"> <link rel="canonical" href="https://discourse.gohugo.io/t/a-simple-solution-for-publishing-scheduled-posts/11842" /> <link rel="search" type="application/opensearchdescription+xml" href="https://discourse.gohugo.io/opensearch.xml" title="HUGO Search"> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/color_definitions_hugo-light_1_3_09733212c5bcbf3d2262e9135364889a94410a8e.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" class="light-scheme"/> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/desktop_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="desktop" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/checklist_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="checklist" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-adplugin_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-adplugin" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-ai_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-ai" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-akismet_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-akismet" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-cakeday_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-cakeday" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-details_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-details" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-lazy-videos_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-lazy-videos" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-local-dates_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-local-dates" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-narrative-bot_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-narrative-bot" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-presence_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-presence" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-solved_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-solved" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/footnote_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="footnote" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/hosted-site_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="hosted-site" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/poll_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="poll" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/spoiler-alert_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="spoiler-alert" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/discourse-ai_desktop_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="discourse-ai_desktop" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/poll_desktop_d02c2ac443d5119470bb87ccc1761df2dc8dc4ce.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="poll_desktop" /> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/desktop_theme_2_554e2f649b5332218939d027878568e9fb5cb3e9.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="2" data-theme-name="custom header links"/> <link href="https://yyz2.discourse-cdn.com/flex036/stylesheets/desktop_theme_3_ba320989966c049743dec43ab8cc84324bf2a254.css?__ws=discourse.gohugo.io" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="3" data-theme-name="hugo light"/> <meta id="data-ga-universal-analytics" data-tracking-code="UA-7131036-7" data-json="{&quot;cookieDomain&quot;:&quot;auto&quot;}" data-auto-link-domains=""> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-7131036-7" nonce="6V4lb5EwBYgeZZqevM3Is1a6q"></script> <script defer src="https://global.discourse-cdn.com/flex036/assets/google-universal-analytics-v4-e154af4adb3c483a3aba7f9a7229b8881cdc5cf369290923d965a2ad30163ae8.gz.js" data-discourse-entrypoint="google-universal-analytics-v4" nonce="6V4lb5EwBYgeZZqevM3Is1a6q"></script> <link rel="alternate nofollow" type="application/rss+xml" title="RSS feed of &#39;A simple solution for publishing scheduled posts&#39;" href="https://discourse.gohugo.io/t/a-simple-solution-for-publishing-scheduled-posts/11842.rss" /> <meta property="og:site_name" content="HUGO" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary" /> <meta name="twitter:image" content="https://global.discourse-cdn.com/flex036/uploads/gohugo/original/2X/b/b91c8ab3a3c1c8679127cf049b46fa919e9e0e5c.png" /> <meta property="og:image" content="https://global.discourse-cdn.com/flex036/uploads/gohugo/original/2X/b/b91c8ab3a3c1c8679127cf049b46fa919e9e0e5c.png" /> <meta property="og:url" content="https://discourse.gohugo.io/t/a-simple-solution-for-publishing-scheduled-posts/11842" /> <meta name="twitter:url" content="https://discourse.gohugo.io/t/a-simple-solution-for-publishing-scheduled-posts/11842" /> <meta property="og:title" content="A simple solution for publishing scheduled posts" /> <meta name="twitter:title" content="A simple solution for publishing scheduled posts" /> <meta property="og:description" content="This week I set out to come up with a way to automatically published future-dated posts to your website. At first, I was looking at the static post scheduler from Serverless. This is a neat solution, but I didn’t like the need to create a pull request in order to publish the post. Especially considering Hugo already respects the publishdate parameter to determine if it should publish a post or not, it seemed a little redundant to also schedule the publish date in a PR. The solution I came up w..." /> <meta name="twitter:description" content="This week I set out to come up with a way to automatically published future-dated posts to your website. At first, I was looking at the static post scheduler from Serverless. This is a neat solution, but I didn’t like the need to create a pull request in order to publish the post. Especially considering Hugo already respects the publishdate parameter to determine if it should publish a post or not, it seemed a little redundant to also schedule the publish date in a PR. The solution I came up w..." /> <meta property="og:article:section" content="tips &amp; tricks" /> <meta property="og:article:section:color" content="ED207B" /> <meta name="twitter:label1" value="Reading time" /> <meta name="twitter:data1" value="2 mins 🕑" /> <meta name="twitter:label2" value="Likes" /> <meta name="twitter:data2" value="11 ❤" /> <meta property="article:published_time" content="2018-05-04T16:43:26+00:00" /> <meta property="og:ignore_canonical" content="true" /> <script type="application/ld+json">{"@context":"http://schema.org","@type":"QAPage","name":"A simple solution for publishing scheduled posts","mainEntity":{"@type":"Question","name":"A simple solution for publishing scheduled posts","text":"This week I set out to come up with a way to automatically published future-dated posts to your website.\n\nAt first, I was looking at the <a href=\"https://serverless.com/blog/static-site-post-scheduler/\" rel=\"nofollow noopener\">static post scheduler<\/a> from Serverless. This is a neat solution, but I didn’t like the need to create a pull request in order to publish the post. Especially consid&hellip;","upvoteCount":3,"answerCount":0,"datePublished":"2018-05-04T16:43:26.018Z","author":{"@type":"Person","name":"dwalkr","url":"https://discourse.gohugo.io/u/dwalkr"}}}</script> </head> <body class="crawler browser-update"> <script defer="" src="https://yyz2.discourse-cdn.com/flex036/theme-javascripts/417061e7eee24be4fb6a457975f0dce96a82d9e6.js?__ws=discourse.gohugo.io" data-theme-id="5" nonce="6V4lb5EwBYgeZZqevM3Is1a6q"></script> <header> <a href="/"> HUGO </a> </header> <div id="main-outlet" class="wrap" role="main"> <div id="topic-title"> <h1> <a href="/t/a-simple-solution-for-publishing-scheduled-posts/11842">A simple solution for publishing scheduled posts</a> </h1> <div class="topic-category" itemscope itemtype="http://schema.org/BreadcrumbList"> <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a href="/c/tips-tricks/38" class="badge-wrapper bullet" itemprop="item"> <span class='badge-category-bg' style='background-color: #ED207B'></span> <span class='badge-category clear-badge'> <span class='category-name' itemprop='name'>tips &amp; tricks</span> </span> </a> <meta itemprop="position" content="1" /> </span> </div> </div> <div itemscope itemtype='http://schema.org/DiscussionForumPosting'> <meta itemprop='headline' content='A simple solution for publishing scheduled posts'> <link itemprop='url' href='https://discourse.gohugo.io/t/a-simple-solution-for-publishing-scheduled-posts/11842'> <meta itemprop='datePublished' content='2018-05-04T16:43:26Z'> <meta itemprop='articleSection' content='tips &amp; tricks'> <meta itemprop='keywords' content=''> <div itemprop='publisher' itemscope itemtype="http://schema.org/Organization"> <meta itemprop='name' content='HUGO'> </div> <div id='post_1' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/dwalkr'><span itemprop='name'>dwalkr</span></a> </span> <link itemprop="mainEntityOfPage" href="https://discourse.gohugo.io/t/a-simple-solution-for-publishing-scheduled-posts/11842"> <span class="crawler-post-infos"> <time datetime='2018-05-04T16:43:26Z' class='post-time'> May 4, 2018, 4:43pm </time> <meta itemprop='dateModified' content='2018-05-04T16:43:26Z'> <span itemprop='position'>1</span> </span> </div> <div class='post' itemprop='text'> <p>This week I set out to come up with a way to automatically published future-dated posts to your website.</p> <p>At first, I was looking at the <a href="https://serverless.com/blog/static-site-post-scheduler/" rel="nofollow noopener">static post scheduler</a> from Serverless. This is a neat solution, but I didn’t like the need to create a pull request in order to publish the post. Especially considering Hugo already respects the <code>publishdate</code> parameter to determine if it should publish a post or not, it seemed a little redundant to also schedule the publish date in a PR.</p> <p>The solution I came up with is to future-date posts that I want to publish in the future, and then just automatically run a rebuild+redeploy of the site at regular intervals.</p> <p>I wrote an article for Forestry talking about the strategy and provided two solutions for accomplishing this: <a href="https://forestry.io/blog/automatically-publish-scheduled-posts-for-static-site/" rel="nofollow noopener">Automatically Publish Scheduled Posts For Your Static Site</a></p> <p>The first solution is to use a CircleCI workflow to automatically run your deployment, which is super easy to set up if you’re already deploying with CircleCI (<a href="https://forestry.io/blog/automate-deploy-w-circle-ci/" rel="nofollow noopener">I wrote an article about that too!</a>)</p> <p><a href="https://github.com/dwalkr/serverless-autopublish" rel="nofollow noopener">The second solution</a> is a serverless function that will work with any CI tool you have hooked up to your Github repo, because it just pushes a commit at the interval you specify. Maybe it’s not the most elegant solution, but it’s pretty universal. (Do I get bonus points for writing it in Go?)</p> <p>If you’ve been trying to figure out how to schedule posts with your Hugo site, I hope you find this useful!</p> <p><em>DIsclaimer: I work for <a href="http://Forestry.io" rel="nofollow noopener">Forestry.io</a></em></p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="3" /> <span class='post-likes'>3 Likes</span> </div> </div> <div id='post_2' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/kaushalmodi'><span itemprop='name'>kaushalmodi</span></a> </span> <link itemprop="image" href="https://global.discourse-cdn.com/flex036/uploads/gohugo/original/2X/c/c0628dbad585740bcaa101e0a24004752ed1d19c.png"> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-04T16:49:01Z' class='post-time'> May 4, 2018, 4:49pm </time> <meta itemprop='dateModified' content='2018-05-04T16:55:55Z'> <span itemprop='position'>2</span> </span> </div> <div class='post' itemprop='text'> <p>I just have this little IFTTT recipe <img src="https://emoji.discourse-cdn.com/twitter/smile.png?v=9" title=":smile:" class="emoji" alt=":smile:"></p> <p><em>(Click below image to see the full recipe.)</em></p> <p><div class="lightbox-wrapper"><a class="lightbox" href="https://global.discourse-cdn.com/flex036/uploads/gohugo/original/2X/c/c0628dbad585740bcaa101e0a24004752ed1d19c.png" title="image.png" rel="nofollow noopener"><img src="https://global.discourse-cdn.com/flex036/uploads/gohugo/optimized/2X/c/c0628dbad585740bcaa101e0a24004752ed1d19c_2_513x500.png" alt="image" width="513" height="500" data-small-upload="https://global.discourse-cdn.com/flex036/uploads/gohugo/optimized/2X/c/c0628dbad585740bcaa101e0a24004752ed1d19c_2_10x10.png"><div class="meta"> <svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use xlink:href="#far-image"></use></svg><span class="filename">image.png</span><span class="informations">513×2241 68.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use xlink:href="#discourse-expand"></use></svg> </div></a></div></p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="4" /> <span class='post-likes'>4 Likes</span> </div> <div class='crawler-linkback-list' itemscope itemtype='http://schema.org/ItemList'> <div itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <a itemprop='url' href="https://discourse.gohugo.io/t/daily-deployment-of-future-posts/20077/4">Daily deployment of future posts</a> <meta itemprop='position' content='2'> </div> </div> </div> <div id='post_3' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/dwalkr'><span itemprop='name'>dwalkr</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-04T16:50:39Z' class='post-time'> May 4, 2018, 4:50pm </time> <meta itemprop='dateModified' content='2018-05-04T16:50:39Z'> <span itemprop='position'>3</span> </span> </div> <div class='post' itemprop='text'> <p>That’s nice! What do you use to deploy the site?</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_4' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/kaushalmodi'><span itemprop='name'>kaushalmodi</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-04T16:52:51Z' class='post-time'> May 4, 2018, 4:52pm </time> <meta itemprop='dateModified' content='2018-05-04T16:52:51Z'> <span itemprop='position'>4</span> </span> </div> <div class='post' itemprop='text'> <aside class="quote no-group" data-username="dwalkr" data-post="3" data-topic="11842"> <div class="title"> <div class="quote-controls"></div> <img loading="lazy" alt="" width="24" height="24" src="https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dwalkr/48/5807_2.png" class="avatar"> dwalkr:</div> <blockquote> <p>What do you use to deploy the site?</p> </blockquote> </aside> <p>The hint’s in there <img src="https://emoji.discourse-cdn.com/twitter/wink.png?v=12" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"></p> <p>ʎɟᴉlʇǝN :ɹǝʍsu∀</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_5' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/dwalkr'><span itemprop='name'>dwalkr</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-04T16:55:00Z' class='post-time'> May 4, 2018, 4:55pm </time> <meta itemprop='dateModified' content='2018-05-04T16:55:00Z'> <span itemprop='position'>5</span> </span> </div> <div class='post' itemprop='text'> <p><img src="https://emoji.discourse-cdn.com/twitter/man_facepalming.png?v=5" title=":man_facepalming:" class="emoji" alt=":man_facepalming:"> TIL how thumbnails work</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="1" /> <span class='post-likes'>1 Like</span> </div> </div> <div id='post_6' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/kaushalmodi'><span itemprop='name'>kaushalmodi</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-04T16:56:32Z' class='post-time'> May 4, 2018, 4:56pm </time> <meta itemprop='dateModified' content='2018-05-04T16:56:32Z'> <span itemprop='position'>6</span> </span> </div> <div class='post' itemprop='text'> <p>Ah, thanks for that feedback… You are right… it’s not evident that that image is hyperlinked to the full image… added a little note for that.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_7' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/Jura'><span itemprop='name'>Jura</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-09T14:50:57Z' class='post-time'> May 9, 2018, 2:50pm </time> <meta itemprop='dateModified' content='2018-05-09T14:50:57Z'> <span itemprop='position'>7</span> </span> </div> <div class='post' itemprop='text'> <p>I’ve never been a big user of scheduled blog posts. For what topics do you guys/gals use scheduled posts? For instance, only special anniversary posts or also regular content?</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_8' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/kaushalmodi'><span itemprop='name'>kaushalmodi</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-09T14:53:02Z' class='post-time'> May 9, 2018, 2:53pm </time> <meta itemprop='dateModified' content='2018-05-09T14:53:02Z'> <span itemprop='position'>8</span> </span> </div> <div class='post' itemprop='text'> <aside class="quote no-group" data-username="Jura" data-post="7" data-topic="11842"> <div class="title"> <div class="quote-controls"></div> <img loading="lazy" alt="" width="24" height="24" src="https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jura/48/13581_2.png" class="avatar"> Jura:</div> <blockquote> <p>For what topics do you guys/gals use scheduled posts?</p> </blockquote> </aside> <p>I don’t use scheduled posts, but I schedule to rebuild my site everyday so that <a href="https://ox-hugo.scripter.co/doc/examples/" rel="noopener nofollow ugc">this page</a> has the most current “last updated” dates (fetched using GitHub/Gitlab API via <code>getJSON</code>).</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_9' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/hellbox'><span itemprop='name'>hellbox</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-09T14:56:15Z' class='post-time'> May 9, 2018, 2:56pm </time> <meta itemprop='dateModified' content='2018-05-09T14:56:15Z'> <span itemprop='position'>9</span> </span> </div> <div class='post' itemprop='text'> <p>Thanks for writing this, <a class="mention" href="/u/dwalkr">@dwalkr</a>. I’m currently porting <a href="http://seattlereviewofbooks.com" rel="nofollow noopener">seattlereviewofbooks.com</a> to Hugo, and we’ll both need a friendly editor, and a future publishing solution — our entire site is run on future publishing. I’ll look into some of these options when I’m ready to figure that part out.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_10' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/TotallyInformation'><span itemprop='name'>TotallyInformation</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-09T15:23:38Z' class='post-time'> May 9, 2018, 3:23pm </time> <meta itemprop='dateModified' content='2018-05-09T15:23:38Z'> <span itemprop='position'>10</span> </span> </div> <div class='post' itemprop='text'> <aside class="quote no-group" data-username="Jura" data-post="7" data-topic="11842" data-full="true"> <div class="title"> <div class="quote-controls"></div> <img loading="lazy" alt="" width="24" height="24" src="https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jura/48/13581_2.png" class="avatar"> Jura:</div> <blockquote> <p>I’ve never been a big user of scheduled blog posts. For what topics do you guys/gals use scheduled posts? For instance, only special anniversary posts or also regular content?</p> </blockquote> </aside> <p>I typically don’t use them. However, I do tend to write posts in splurges since one idea will kick off a load of others. It is generally best for SEO purposes, if you are seen to be posting regularly. So if you care about such things, you can write a bunch of posts when you feel inspired but spread the dates out then keep rebuilding daily.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_11' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/iveptawebadmin'><span itemprop='name'>iveptawebadmin</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-17T18:37:40Z' class='post-time'> May 17, 2018, 6:37pm </time> <meta itemprop='dateModified' content='2018-05-17T18:37:40Z'> <span itemprop='position'>11</span> </span> </div> <div class='post' itemprop='text'> <p>I do the same thing and it works great! I set my build time to 3 AM since it was before anyone here would wake up and care, and it was past midnight for editors who like to burn the midnight oil.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="1" /> <span class='post-likes'>1 Like</span> </div> </div> <div id='post_12' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/iveptawebadmin'><span itemprop='name'>iveptawebadmin</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-17T18:39:35Z' class='post-time'> May 17, 2018, 6:39pm </time> <meta itemprop='dateModified' content='2018-05-17T18:39:35Z'> <span itemprop='position'>12</span> </span> </div> <div class='post' itemprop='text'> <p>We use it for upcoming events, usually some number of days before the event. We also use this for regular posts along with an editorial calendar and future content planning.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_13' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/Jura'><span itemprop='name'>Jura</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-18T13:21:20Z' class='post-time'> May 18, 2018, 1:21pm </time> <meta itemprop='dateModified' content='2018-05-18T13:21:20Z'> <span itemprop='position'>13</span> </span> </div> <div class='post' itemprop='text'> <p>Thanks for the comments. I like the idea of scheduling posts in advance, and automatically rebuild the website at certain intervals. But I’m not a big fan of all the cache purges that are needed to make that work. I need my website to be quick too. <img src="https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=5" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_14' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/dwalkr'><span itemprop='name'>dwalkr</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-05-18T14:40:50Z' class='post-time'> May 18, 2018, 2:40pm </time> <meta itemprop='dateModified' content='2018-05-18T14:40:50Z'> <span itemprop='position'>14</span> </span> </div> <div class='post' itemprop='text'> <p>This is a good point. The shotgun solution is easy, but something more targeted (like a script that could know if/when there are scheduled posts to publish) wouldn’t deplete the cache so often</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_15' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/RickCogley'><span itemprop='name'>RickCogley</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2018-06-27T13:32:20Z' class='post-time'> June 27, 2018, 1:32pm </time> <meta itemprop='dateModified' content='2018-06-27T13:32:20Z'> <span itemprop='position'>15</span> </span> </div> <div class='post' itemprop='text'> <p><a class="mention" href="/u/dwalkr">@dwalkr</a> thanks for the post about scheduling circleci builds. That made it simple to schedule a daily build so I can undraft finished posts with a future date.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="1" /> <span class='post-likes'>1 Like</span> </div> </div> <div id='post_16' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/raw'><span itemprop='name'>raw</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2023-09-18T02:36:23Z' class='post-time'> September 18, 2023, 2:36am </time> <meta itemprop='dateModified' content='2023-09-18T02:36:23Z'> <span itemprop='position'>16</span> </span> </div> <div class='post' itemprop='text'> <p>FWIW, I use a similar approach, except with the GitHub CI to host Hugo via Cloudflare Pages. The advice on the Cloudflare Discord was to use a webhook, so like <a class="mention" href="/u/kaushalmodi">@kaushalmodi</a> I have a IFTTT that simply pings my CF Pages webhook in the middle of the night to rebuild.</p> <p>(and when I’m getting ready to commit, I locally build with <code>hugo server --buildFuture</code>.)</p> <p>what i want to set up next is for my preview builds on CF Pages to also run with the <code>--buildFuture</code> flag, so then I can QC everything on a staging server before the prod server updates…just haven’t gotten around to this yet.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_17' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/Arif'><span itemprop='name'>Arif</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2023-09-18T15:00:46Z' class='post-time'> September 18, 2023, 3:00pm </time> <meta itemprop='dateModified' content='2023-09-19T20:57:57Z'> <span itemprop='position'>17</span> </span> </div> <div class='post' itemprop='text'> <p>You can use a cron job service to run the webhook. I use <a href="https://cron-job.org/" rel="noopener nofollow ugc">Cron Job</a>.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="1" /> <span class='post-likes'>1 Like</span> </div> </div> <div id='post_18' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/fgandiya'><span itemprop='name'>fgandiya</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2023-09-20T10:01:41Z' class='post-time'> September 20, 2023, 10:01am </time> <meta itemprop='dateModified' content='2023-09-20T10:01:41Z'> <span itemprop='position'>18</span> </span> </div> <div class='post' itemprop='text'> <p>To schedule posts i just have a cron job that runs every morning which I schedule all my future posts to.</p> <p>I used to have a custom CI script which would modify the cron settings to then publish the post at any given time but that got complicated.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_19' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discourse.gohugo.io/u/saitor'><span itemprop='name'>saitor</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2024-07-17T06:42:59Z' class='post-time'> July 17, 2024, 6:42am </time> <meta itemprop='dateModified' content='2024-07-17T06:42:59Z'> <span itemprop='position'>19</span> </span> </div> <div class='post' itemprop='text'> <p>If you’re looking for a different solution that rebuilds your site at the specific time a post has to go live or a post has to be expired, here’s a tutorial:</p> <aside class="onebox allowlistedgeneric" data-onebox-src="https://businessaddons.com/guides/automate-hugo-site-rebuilds-efficient-scheduling-guide/"> <header class="source"> <img src="https://businessaddons.com/images/favicon/favicon-32.png" class="site-icon" width="32" height="32"> <a href="https://businessaddons.com/guides/automate-hugo-site-rebuilds-efficient-scheduling-guide/" target="_blank" rel="noopener nofollow ugc">BusinessAddons.com</a> </header> <article class="onebox-body"> <img width="500" height="500" src="https://businessaddons.com/images/guides/scheduling-hugo-posts-app-script-future-date-deployment-chart-flow.jpg" class="thumbnail onebox-avatar"> <h3><a href="https://businessaddons.com/guides/automate-hugo-site-rebuilds-efficient-scheduling-guide/" target="_blank" rel="noopener nofollow ugc">Scheduling Hugo Builds with AppScript and Node | BusinessAddons.com</a></h3> <p>Comprehensive guide on automating Hugo builds using AppScript, NodeJS and a build hooks.</p> </article> <div class="onebox-metadata"> </div> <div style="clear: both"></div> </aside> <p>Been using this solution for over a year, and finally wrote about it!</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> </div> <div id="related-topics" class="more-topics__list " role="complementary" aria-labelledby="related-topics-title"> <h3 id="related-topics-title" class="more-topics__list-title"> Related topics </h3> <div class="topic-list-container" itemscope itemtype='http://schema.org/ItemList'> <meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'> <table class='topic-list'> <thead> <tr> <th>Topic</th> <th></th> <th class="replies">Replies</th> <th class="views">Views</th> <th>Activity</th> </tr> </thead> <tbody> <tr class="topic-list-item" id="topic-list-item-50743"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='1'> <span class="link-top-line"> <a itemprop='url' href='https://discourse.gohugo.io/t/i-figured-how-to-schedule-posts-builds-for-hugo/50743' class='title raw-link raw-topic-link'>I figured how to schedule posts/builds for Hugo!</a> </span> <div class="link-bottom-line"> <a href='/c/tips-tricks/38' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #ED207B'></span> <span class='badge-category clear-badge'> <span class='category-name'>tips &amp; tricks</span> </span> </a> <div class="discourse-tags"> <a href='https://discourse.gohugo.io/tag/netlify' class='discourse-tag'>netlify</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>0</span> </td> <td class="views"> <span class='views' title='views'>123</span> </td> <td> July 17, 2024 </td> </tr> <tr class="topic-list-item" id="topic-list-item-33892"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='2'> <span class="link-top-line"> <a itemprop='url' href='https://discourse.gohugo.io/t/scheduling-posts/33892' class='title raw-link raw-topic-link'>Scheduling posts</a> </span> <div class="link-bottom-line"> <a href='/c/support/34' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #652D90'></span> <span class='badge-category clear-badge'> <span class='category-name'>support</span> </span> </a> <div class="discourse-tags"> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>4</span> </td> <td class="views"> <span class='views' title='views'>502</span> </td> <td> July 18, 2021 </td> </tr> <tr class="topic-list-item" id="topic-list-item-20077"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='3'> <span class="link-top-line"> <a itemprop='url' href='https://discourse.gohugo.io/t/daily-deployment-of-future-posts/20077' class='title raw-link raw-topic-link'>Daily deployment of future posts</a> </span> <div class="link-bottom-line"> <a href='/c/tips-tricks/38' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #ED207B'></span> <span class='badge-category clear-badge'> <span class='category-name'>tips &amp; tricks</span> </span> </a> <div class="discourse-tags"> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>6</span> </td> <td class="views"> <span class='views' title='views'>1030</span> </td> <td> August 12, 2019 </td> </tr> <tr class="topic-list-item" id="topic-list-item-2512"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='4'> <span class="link-top-line"> <a itemprop='url' href='https://discourse.gohugo.io/t/how-to-automate-future-publish/2512' class='title raw-link raw-topic-link'>How to automate future publish?</a> </span> <div class="link-bottom-line"> <a href='/c/support/34' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #652D90'></span> <span class='badge-category clear-badge'> <span class='category-name'>support</span> </span> </a> <div class="discourse-tags"> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>4</span> </td> <td class="views"> <span class='views' title='views'>3110</span> </td> <td> January 24, 2016 </td> </tr> <tr class="topic-list-item" id="topic-list-item-14405"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='5'> <span class="link-top-line"> <a itemprop='url' href='https://discourse.gohugo.io/t/future-posts-in-variable-within-a-regular-build/14405' class='title raw-link raw-topic-link'>Future posts in variable within a regular build</a> </span> <div class="link-bottom-line"> <a href='/c/feature/36' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #0E76BD'></span> <span class='badge-category clear-badge'> <span class='category-name'>feature</span> </span> </a> <div class="discourse-tags"> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>4</span> </td> <td class="views"> <span class='views' title='views'>1019</span> </td> <td> September 26, 2018 </td> </tr> </tbody> </table> </div> </div> </div> <footer class="container wrap"> <nav class='crawler-nav'> <ul> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/' itemprop="url">Home </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/categories' itemprop="url">Categories </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/guidelines' itemprop="url">Guidelines </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/tos' itemprop="url">Terms of Service </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/privacy' itemprop="url">Privacy Policy </a> </span> </li> </ul> </nav> <p class='powered-by-link'>Powered by <a href="https://www.discourse.org">Discourse</a>, best viewed with JavaScript enabled</p> </footer> <div class="buorg"><div>Unfortunately, <a href="https://www.discourse.org/faq/#browser">your browser is unsupported</a>. Please <a href="https://browsehappy.com">switch to a supported browser</a> to view rich content, log in and reply.</div></div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10