Skip to content

Instantly share code, notes, and snippets.

View rjgux's full-sized avatar
:shipit:

Richard George rjgux

:shipit:
View GitHub Profile
@rjgux
rjgux / index.js
Created May 31, 2019 18:45
SEOmatic & CraftQL with react-helmet
/*eslint no-useless-escape: 0 */
import React from "react"
import Helmet from "react-helmet"
import ReactHtmlParser from "react-html-parser"
import { graphql } from "gatsby"
const SEO = props => {
const { data } = props
const splitJsonLdStringIntoArray = data.metaJsonLdContainer
.replace(/\<\/script\>/g, "")

Site Move (With URL Changes)

Useful guide - How to 301 to a new domain

  • Delete .htaccess from new host in /public (removes redirect from viperinnovations to vipersubsea)
  • Deploy to new host (on DeployHQ)
  • Import database (details on Cipher, already added creds to db.php)
  • Check/test viperinnovations
  • Add 301 redirects to vipersubsea .htaccess
  • Update search console/analytics (see below)
@rjgux
rjgux / prior.md
Last active January 24, 2017 16:41

Prior Prep - Updates

Facility Hire

Staging, updated 20/01/2017 09:23

If you are interested in hiring any of our facilities at Prior Park Prep School for personal or business use, please contact our Assistant Bursar, Mrs Iona Sadler isadler@priorparkschools.com

Facilities available to hire are:

// Credit Chris Coyier - https://css-tricks.com/snippets/jquery/smooth-scrolling/
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top