Posts Tagged “statamic”

Throwing together a blog

I’ve been working on this site for longer than I’d care to admit (years at this point). It’s been through a few domains, two content management systems, multiple versions of those content management systems, countless designs and several different hosts. I’m really happy with where it’s at and what I’ve learned putting it together.

I started this site off running Kirby on shared hosting. It’s served as a design and development playground for me as I’ve learned and applied new things. It started off without being version and now the source for it is stored on Github and now runs on Statamic.

I started off writing the CSS and JS for the site manually, before generating a Grunt build process, breaking out the styles to be more modular and rewriting them in SCSS. Dependencies are now sourced from npm and Bower.

Instead of running the site on shared hosting, it now runs on a LAMP Digital Ocean box using PHP7 and mod_pagespeed, both of which have made a tremendous difference in terms of site performance.

As it stands now, I’m thrilled with where this site sits, but I’m curious to see how else I can continue improving it.

External links and redirects in Statamic navigation

I put together a fieldset and template that allows external links to be added to the navigation of Statamic sites alongside internal links. To implement this in your site, the fieldset should look like the following:

title: Nav link
    display: Link
    required: true
    type: text
    type: hidden

This fieldset should be accompanied by a template named link.html which will need to be added to your site’s theme. The contents of the template are simply Statamic’s redirect example.

Now you should be able to create link pages in your Statamic admin panel that can then be added to your site’s navigation. The pages created in the panel should create page files that look like the following:

title: Example link page
fieldset: link
template: link

Is there an easier or more effective way to do this? Let me know.