Skip to content

Instantly share code, notes, and snippets.

View scottboms's full-sized avatar

Scott Boms scottboms

View GitHub Profile
@scottboms
scottboms / kirby__config.php
Last active December 11, 2020 01:41
Example Kirby 3 recipe for creating a JSON Feed representation of a page with custom route
<?php
// Kirby site config file
// site/config/config.php
return [
'routes' => [
[
// This sets up two different URLs as an array that will
// return the JSON Feed representation of a page in Kirby
'pattern' => ['feed', 'some-other-path/feed'],
'action' => function() {
@scottboms
scottboms / cache.php
Last active May 21, 2020 07:14
Core Kirby config file. See also related files
<?php
/**
* Allows you to use blueprints to tell
* Kirby whether to cache a page or not
*
* eg.
* In a page blueprint
* options:
* cache: false
@scottboms
scottboms / rsync-excludes.txt
Created April 17, 2020 18:19
rsync Excludes file for Kirby 3
.editorconfig
.git
.gitignore
.gitmodules
.DS_Store
README.md
rsync-excludes.txt
update-site.sh
site/accounts/
site/cache/
@scottboms
scottboms / update-site.sh
Created April 17, 2020 18:17
Simple rsync script to deploy a Kirby site over SSH with a non-standard port.
#!/bin/bash
ERRORST="Whoops! Maybe check the command and try that again."
if [ $# -eq 0 ]
then
echo "$ERRORST";
elif [[ "$1" == "help" ]]
then
echo "To run: update-site.sh deploy OR update-site.sh deploy go"

Keybase proof

I hereby claim:

  • I am scottboms on github.
  • I am scottboms (https://keybase.io/scottboms) on keybase.
  • I have a public key whose fingerprint is 3B11 0748 04AF E68C 4977 4EF8 459D B508 C349 180B

To claim this, I am signing this object: