Posts for: #Blog

Pinning Posts in Hugo

Alright, in this post I’m going to show you how to pin posts in Hugo. But before you keep reading, I request you review the template you’re using and ensure it’s going to allow you to pin posts in the first place.

The thing you’re looking for is the index declaration in your index.html.

Example:

{{- define "content" -}}
  <section id="posts" class="posts">
    {{/* (index .Site.Paginate) */}}
    {{- $paginator := .Paginate (where (where .Site.RegularPages "Type" "post") ".Params.hiddenfromhomepage" "!=" true) }}
    {{- range $paginator.Pages -}}
      {{ .Render "summary" }}
    {{ end -}}
  </section>

For instance, in the above snipped, line number four is where you can find the $paginator that will tell you whether you’ll be able to pin posts. If you see mine, you’re good. Most are probably going to do this. If you see anything with “sortby” then you’re probably fucked, because your template is probably forcing your shit to sort by date, rather than just paginate as Hugo does by default.

[]

Current State of the Blog

There have been changes. I’ve alluded to some, but I don’t think I’ve fully described others. So here’s the breakdown of how this shitpile is currently being handled.

I’ve moved away from Jekyll since the number of posts and my template had bogged down site generation to the point of being virtually impossible to update any longer. The limitations of the Ruby language become painfully evident with maintaining a reasonably sized Jekyll blog. The stop after that was Hugo. A static site generator similar to Jekyll but written in the quite-quick language “Go”. So far it’s been an excellent utility. There have been some growing pains having migrated to Hugo relatively early in the Hugo development process. There have been broken things that have required bandages along the way. I still have no regrets.

[]

Blog Updates

I’m shaping my blog, trimming bits here and there, and cultivating other areas that are too sparse. Look out for the NFO section. I’m adding whatever I can possibly add to it. I may add more. Probably adding links where I can.

I’ll write an actual “how-to” style post here soon. I promise. It’s bound to happen at some point.

[]

Blog Stats

PostLinesWordsCharacters
2012-02-02-Rebirth1367431
2012-02-12-Complicated-complications221791019
2012-02-14-Blogging-Simplified352791794
2012-02-14-Economic-Musings412861845
2012-02-14-Frantic1477465
2012-02-14-Jekyll17123714
2012-02-14-Unemployment-Rates-by-State683162282
2012-02-15-Manic-Scramble241971154
2012-02-16-Manycam-Prank25148967
2012-02-17-Anomolous474022396
2012-02-17-Learning-Awk402521670
2012-02-17-Nail-Gun1333331
2012-02-17-Shithead1534348
2012-02-17-The-Future252231354
2012-02-17-The-Search-Continues251551092
2012-02-18-Blogging-all-damn-day393021938
2012-02-18-Facebook-parenting-for-the-troubled-teen1764514
2012-02-18-Public-Apology-to-Barrett-Brown464262562
2012-02-19-Additions-Tweaks-Changes19155931
2012-02-19-As-love-should-be292251460
2012-02-19-Chillaxed342571594
2012-02-20-Exhaustion17125743
2012-02-21-Deadlines373572136
2012-02-21-Delirium585413277
2012-02-22-FreeBSD-9.023164979
2012-02-24-Announcements433712257
2012-02-26-And-so-it-begins453802403
2012-02-28-Countdown-to-disaster353181855
2012-02-29-Worn-down-already343321821
2012-03-01-JiZZy-Pakistan574452698
2012-03-01-Leap-year272291288
2012-03-02-redlegions-tips-for-working-midnights605573110
2012-03-03-Cybersecurity-rant555323183
2012-03-05-Busy-busy-busy323391838
2012-03-06-Sabu-hardcore-fbi-informant554042988
2012-03-06-ZOMG252411375
2012-03-09-Food-for-thought-kony2012221231026
2012-03-10-Life-isnt-passing-me-by251861051
2012-03-12-Grind251801236
2012-03-15-At-the-drive-in272001277
2012-03-15-Work-again-finally332891765
2012-03-16-Made-me-think-of-my-friends920185
2012-03-16-The-case-against-Israel584332997
2012-03-16-Tweaks302111250
2012-03-16-What-ive-been-doing423952357
2012-03-19-More-on-my-new-occupation25160943
2012-03-21-Things-moving-along22151941
2012-03-22-Me-at-the-controls921185
2012-03-22-New-jekyll-setup382411654
2012-03-22-Rollout-complete322011175
2012-03-23-Kinks-worked-out252141225
2012-03-23-Love-chicago1127250
2012-03-23-The-hunger-games1674446
2012-03-26-BacktraceSec-Dissolved452921986
2012-03-26-Oh-the-hubris2087752
2012-03-27-Jennifer-emick-ddos-for-fbi393391978
2012-03-28-Trayvon-martin-911-calls963974325
2012-03-30-The-devils-infosec-dictionary673052219
2012-03-30-Work-work-work251841153
2012-03-31-Jekyll-and-youtube-embedding341991532
2012-03-31-Jekyll-bootstrap-is-for-everyone17109847
2012-04-02-Insomnia-redux-vim-startup451641215
2012-04-03-Getting-font-face-to-work-on-all-browsers24111804
2012-04-03-Pragmatapro-font22149918
2012-04-03-What-they-say-what-they-mean332911957
2012-04-05-FuckFBIFriday351891455
2012-04-05-I-hate-you-all1137354
2012-04-06-Quick-and-dirty-mass-highlight-for-irssi32106884
2012-04-07-Irc-is-a-bad-place2091582
2012-04-07-Musings-on-information-security514503025
2012-04-07-Thanks1757425
2012-04-08-Happy-Easter916173
2012-04-11-Obomney-2012312211563
2012-04-11-Prosec-attacks-on-doxbin682702305
2012-04-12-Google-is-big-brother312641615
2012-04-12-what-cd-20-gb-mark1784551
2012-04-16-ESL-for-the-internet-elite885423371
2012-04-17-Depression-it-sucks454112542
2012-04-18-Absente-now-with-wormwood1688570
2012-04-20-Therapeutic-Photoshop1467503
2012-04-22-Kramdown-and-common-sense26145953
2012-04-23-How-to-find-mp3s-with-google2149977027
2012-04-23-Stoner-comic-dump531394004
2012-04-26-The-anti-anonymous-movement565453257
2012-04-27-Free-website-stress-tests1466474
2012-04-29-Absinthe-neato282471449
2012-04-30-This-is-now-stuck-in-your-head928282
2012-05-01-Blog-stats996334387
Total311120981140212

Seems like I’ve written more than that. Still interesting, though.

[]