Skip to content

Instantly share code, notes, and snippets.

View GrantSmithDoddle's full-sized avatar
😆

Grant Smith GrantSmithDoddle

😆
View GitHub Profile
@GrantSmithDoddle
GrantSmithDoddle / Mac Setup.md
Last active November 17, 2020 15:34
Personal preferences for Mac setup

My Mac setup

This is my setup process covering the projects I tend to work on most regularly. This lately I mostly develop Eleventy, Perch Runway, WordPress and Statamic. Although we have dropped Perch Runway due to the lack of support from the developers in favour of Statamic. Perch sites are still supported though.

The optional installs listed are my preferences, i.e. If your running WordPress you will need something to run a local server, I use Mamp Pro, thus it's a optional, there are various ways to run local servers, this is one method.

Summary

Install HomeBrew
Install Iterm 2

Statamic 3 Notes

These notes are for my hosting environment which is a Linux server running cPanel and Apache.

Deployment to webserver

This is what worked for me and if anyone suggests a better method I'll update accordingly.

Assuming files are committed to GitHub, a deploy key is setup and you are logged into the web server via SSH.

Release Procedure

Follow this document every time you are ready to release changes into production.

Overview

  • Always work in develop branch, never in the main branch.
  • When all changes are ready for a release on your development machine:
    • consult CHANGELOG.md and choose the new version number (see below)
  • merge into main from develop (with --no-ff) (see below)

Managing GitHub Deployment for Perch Runway Projects

The following is how Transition manages the GitHub Deployment process. We are assuming a private ssh key linking the Git Repository to the hosting server has been created, and SSH access to the server is setup.

This process results in previous versions of the site remaining on the server in case a rollback is required. Resources not included in the version control process are stored in a folder called non-syncing-resources, and symbolic links (otherwise known as symlink) are used to connect the resources.

New Deployment

  1. Log in to the server over SSH
  2. Create a new directory called git by running mkdir git and then cd into that directory
@GrantSmithDoddle
GrantSmithDoddle / category_submenu.html
Created September 26, 2019 14:53 — forked from bristlebird/category_submenu.html
Add category links as sub-menus to Perch CMS navigation
<!--*
// ====================================================================
// CATEGORY SUBMENU
// ====================================================================
// outputs set of category links for sub-menu (/perch/templates/categories/custom/category_submenu.html)
// called by perch_categories() in nav.php
*-->
<perch:before><ul class="sub-menu"></perch:before>
<li<perch:if id="catDepth" match="gt" value="1"> class="indent"</perch:if> ><a href="/<perch:category id="catPath" />"><perch:category id="catTitle" type="smarttext" /></a></li>
<perch:after></ul></perch:after>
@GrantSmithDoddle
GrantSmithDoddle / Sass Media Quieres Mixins
Created September 18, 2019 11:53
Sass media quieres
/* Small screen, non-retina */
=small
@media only screen and (min-width: 320px)
@content
=small-p
@media only screen and (min-width: 320px) and (orientation : portrait)
@content
=small-l
@GrantSmithDoddle
GrantSmithDoddle / Installing a Perch Runway Blog.md
Last active August 16, 2019 14:47
Basic tutorial for installing a Perch Runway Tutorial…
#Page information
<perch:group label="Page" collapse>
<perch:group label="Testimonial" collapse>
<perch:content id="title" type="text" label="Title / Heading" required title>
<perch:content id="slug" type="slug" for="title">
</perch:group>
#Company information
<perch:group label="Company" collapse>
<perch:content id="company_name" type="text" label="Company Name">
@GrantSmithDoddle
GrantSmithDoddle / Install Bootstrap.md
Created November 19, 2018 10:10
Install Bootstrap for theming.

#Install Bootstrap

  1. CD into directory
  2. Install Bootstrap / Jquery / Popper

cd directoryname
npm i bootstrap jquery popper.js --save

##Organise files