Skip to content

Commit

Permalink
use head instead of helmet
Browse files Browse the repository at this point in the history
  • Loading branch information
mimiflynn committed Aug 1, 2024
1 parent b2f6bc8 commit 389528b
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 115 deletions.
2 changes: 1 addition & 1 deletion site/content/exercises/makecode/intro/E1/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Download code of selected project & just have fun with running the example.

Objective: Just copy and paste existing examples and have fun, fun, fun...

Homework: [Read thru all Adafruit features](https://learn.adafruit.com/adafruit-circuit-playground-express)
Homework: [Read through all Adafruit features](https://learn.adafruit.com/adafruit-circuit-playground-express)
1 change: 1 addition & 0 deletions site/content/teach.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
order: 5
title: Teach
subtitle:
description: Training tips for instructors
---

## Mission & Philosophy
Expand Down
50 changes: 27 additions & 23 deletions site/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,36 @@ const { createFilePath } = require(`gatsby-source-filesystem`);
exports.createPages = async ({ graphql, actions }) => {
const { createPage } = actions;

const result = await graphql(
`
{
allMdx {
nodes {
id
tableOfContents
frontmatter {
template
title
tags
level
exercise
category
}
internal {
contentFilePath
}
fields {
slug
}
const result = await graphql(`
{
site {
siteMetadata {
title
}
}
allMdx {
nodes {
id
tableOfContents
frontmatter {
template
title
tags
level
exercise
category
description
}
internal {
contentFilePath
}
fields {
slug
}
}
}
`
);
}
`);

if (result.errors) {
throw result.errors;
Expand Down
71 changes: 0 additions & 71 deletions site/src/components/seo.jsx

This file was deleted.

4 changes: 2 additions & 2 deletions site/src/pages/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import React from 'react';
import { graphql } from 'gatsby';

import Layout from '../components/layout';
import Seo from '../components/seo';

const NotFoundPage = ({ location }) => {
return (
<Layout location={location}>
<Seo title="404: Not Found" />
<h1>Not Found</h1>
<p>You just hit a route that doesn&#39;t exist... the sadness.</p>
</Layout>
Expand All @@ -16,6 +14,8 @@ const NotFoundPage = ({ location }) => {

export default NotFoundPage;

export const Head = () => <title>404: Not Found</title>;

export const pageQuery = graphql`
query {
site {
Expand Down
12 changes: 10 additions & 2 deletions site/src/pages/exercises/circuitpython/level-1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { graphql } from 'gatsby';
import ExerciseList from '../../../../components/exercises';
import Hero from '../../../../components/hero';
import Layout from '../../../../components/layout';
import Seo from '../../../../components/seo';

import SetUp from '../../../../../content/exercises/circuitpython/start-here.mdx';

Expand All @@ -21,7 +20,6 @@ const CPXLevel1Index = ({ data, location }) => {
title="CPX Training Workshop"
subtitle="CircuitPython - Level 1"
/>
<Seo title="CircuitPython | Level 1" />
<article className="content">
<SetUp />
</article>
Expand All @@ -33,6 +31,16 @@ const CPXLevel1Index = ({ data, location }) => {

export default CPXLevel1Index;

export const Head = () => (
<>
<title>CircuitPython | Level 1</title>
<meta
name="description"
content="Level 1 CircuitPython curriculum for beginners"
/>
</>
);

export const pageQuery = graphql`
query {
site {
Expand Down
12 changes: 10 additions & 2 deletions site/src/pages/exercises/circuitpython/level-2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { graphql } from 'gatsby';
import ExerciseList from '../../../../components/exercises';
import Hero from '../../../../components/hero';
import Layout from '../../../../components/layout';
import Seo from '../../../../components/seo';

import SetUp from '../../../../../content/exercises/circuitpython/start-here.mdx';

Expand All @@ -21,7 +20,6 @@ const CPXLevel2Index = ({ data, location }) => {
title="CPX Training Workshop"
subtitle="CircuitPython - Level 2"
/>
<Seo title="CircuitPython | Level 2" />
<article className="content">
<SetUp />
</article>
Expand All @@ -33,6 +31,16 @@ const CPXLevel2Index = ({ data, location }) => {

export default CPXLevel2Index;

export const Head = () => (
<>
<title>CircuitPython | Level 2</title>
<meta
name="description"
content="Level 2 CircuitPython curriculum for intermediate users"
/>
</>
);

export const pageQuery = graphql`
query {
site {
Expand Down
9 changes: 7 additions & 2 deletions site/src/pages/exercises/circuitpython/robotics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { graphql } from 'gatsby';
import ExerciseList from '../../../../components/exercises';
import Hero from '../../../../components/hero';
import Layout from '../../../../components/layout';
import Seo from '../../../../components/seo';

import '../../../../styles/global.css';
import '../../../../styles/style.css';
Expand All @@ -22,7 +21,6 @@ const MakeCodeIndex = ({ data, location }) => {
subtitle=""
image="../../images/desk.jpg"
/>
<Seo title="MakeCode" />
<article className="content">
<Summary />
</article>
Expand All @@ -34,6 +32,13 @@ const MakeCodeIndex = ({ data, location }) => {

export default MakeCodeIndex;

export const Head = () => (
<>
<title>CircuitPython | Robotics</title>
<meta name="description" content="CircuitPython Robotics Curriculum" />
</>
);

export const pageQuery = graphql`
query {
site {
Expand Down
9 changes: 7 additions & 2 deletions site/src/pages/exercises/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { graphql, Link } from 'gatsby';

import Hero from '../../components/hero';
import Layout from '../../components/layout';
import Seo from '../../components/seo';

const CurriculumPage = ({ location }) => {
return (
Expand All @@ -14,7 +13,6 @@ const CurriculumPage = ({ location }) => {
subtitle="An interactive introduction to coding. Learn the basics through
simple exercises designed to inspire."
/>
<Seo title="Learn" />
<article className="content">
<h2>Single Day Programs</h2>
<div>
Expand Down Expand Up @@ -107,6 +105,13 @@ const CurriculumPage = ({ location }) => {

export default CurriculumPage;

export const Head = () => (
<>
<title>CircuitPlayground Express Curriculum</title>
<meta name="description" content="CircuitPlayground Express Curriculum" />
</>
);

export const pageQuery = graphql`
query {
site {
Expand Down
9 changes: 7 additions & 2 deletions site/src/pages/exercises/makecode/intro/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { graphql } from 'gatsby';
import ExerciseList from '../../../../components/exercises';
import Hero from '../../../../components/hero';
import Layout from '../../../../components/layout';
import Seo from '../../../../components/seo';

import '../../../../styles/global.css';
import '../../../../styles/style.css';
Expand All @@ -17,7 +16,6 @@ const MakeCodeIndex = ({ data, location }) => {
return (
<Layout location={location}>
<div className="exercises-main">
<Seo title="MakeCode" />
<Hero
title="Circuit Playground Express with MakeCode"
subtitle=""
Expand All @@ -34,6 +32,13 @@ const MakeCodeIndex = ({ data, location }) => {

export default MakeCodeIndex;

export const Head = ({ pageContext }) => (
<>
<title>{pageContext.frontmatter.title}</title>
<meta name="description" content={pageContext.description} />
</>
);

export const pageQuery = graphql`
query {
site {
Expand Down
9 changes: 7 additions & 2 deletions site/src/pages/exercises/makecode/robotics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { graphql } from 'gatsby';
import ExerciseList from '../../../../components/exercises';
import Hero from '../../../../components/hero';
import Layout from '../../../../components/layout';
import Seo from '../../../../components/seo';

import '../../../../styles/global.css';
import '../../../../styles/style.css';
Expand All @@ -22,7 +21,6 @@ const MakeCodeIndex = ({ data, location }) => {
subtitle=""
image="../../images/desk.jpg"
/>
<Seo title="MakeCode" />
<article className="content">
<Summary />
</article>
Expand All @@ -34,6 +32,13 @@ const MakeCodeIndex = ({ data, location }) => {

export default MakeCodeIndex;

export const Head = () => (
<>
<title>MakeCode | Robotics</title>
<meta name="description" content="MakeCode Robotics Curriculum" />
</>
);

export const pageQuery = graphql`
query {
site {
Expand Down
13 changes: 11 additions & 2 deletions site/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Link, graphql } from 'gatsby';

import Hero from '../components/hero';
import Layout from '../components/layout';
import Seo from '../components/seo';

const SiteIndex = ({ location }) => {
return (
Expand All @@ -14,7 +13,6 @@ const SiteIndex = ({ location }) => {
subtitle="Introduction to programming with Adafruit's Circuit Playground
Express"
/>
<Seo title="Makerspace by Morgan Stanley" />
<article className="hero hero-learn">
<img
src="images/student-computer.jpg"
Expand Down Expand Up @@ -89,6 +87,17 @@ const SiteIndex = ({ location }) => {

export default SiteIndex;

export const Head = () => (
<>
<title>Makerspace by Morgan Stanley</title>
<meta
name="description"
content="Introduction to programming with Adafruit's Circuit Playground
Express"
/>
</>
);

export const pageQuery = graphql`
query {
site {
Expand Down
Loading

0 comments on commit 389528b

Please sign in to comment.