This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import ApolloClient from 'apollo-boost' | |
import { ApolloProvider } from 'react-apollo' | |
import { BrowserRouter, Route } from 'react-router-dom' | |
import './App.css' | |
import 'semantic-ui-css/semantic.min.css' | |
import Home from './views/home' | |
import Article from './views/article' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("dotenv").config(); | |
const path = require('path'); | |
/** | |
* Implement Gatsby's Node APIs in this file. | |
* | |
* See: https://www.gatsbyjs.org/docs/node-apis/ | |
*/ | |
exports.onCreatePage = ({ page, actions }) => { | |
const { createPage, deletePage } = actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import showdown from 'showdown' | |
import PropTypes from 'prop-types' | |
import Layout from '../components/layout.js' | |
import SEO from '../components/seo.js' | |
import { graphql, Link } from 'gatsby' | |
import hljs from 'highlight.js' | |
import 'highlight.js/styles/github.css' | |
const converter = new showdown.Converter({ ghCompatibleHeaderId: true }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'import React from 'react' | |
import PropTypes from 'prop-types' | |
import { Link } from 'gatsby' | |
// formats our slugs to be used in links to our display page | |
function formatSlug(title) { | |
return title | |
.toLowerCase() | |
.replace(/[^a-zA-Z ]/g, "") | |
.replace(/\s/g, '-') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import PropTypes from 'prop-types' | |
import Cosmic from 'cosmicjs' | |
import showdown from 'showdown' | |
const api = Cosmic() | |
const converter = new showdown.Converter({ ghCompatibleHeaderId: true }) | |
const initialState = { | |
open: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import PropTypes from 'prop-types' | |
import { graphql } from 'gatsby' | |
import Layout from '../components/layout' | |
import SEO from '../components/seo' | |
import Docs from '../components/docs' | |
const IndexPage = ({ data, pageContext }) => { | |
return ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("dotenv").config(); | |
/** | |
* Implement Gatsby's Node APIs in this file. | |
* | |
* See: https://www.gatsbyjs.org/docs/node-apis/ | |
*/ | |
exports.onCreatePage = ({ page, actions }) => { | |
const { createPage, deletePage } = actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
siteMetadata: { | |
title: `Gatsby Docs`, | |
description: `Create and View Minimalistic Documentation, powered by GatsbyJs and CosmicJS`, | |
author: `@jacobknaack`, | |
}, | |
plugins: [ | |
`gatsby-plugin-eslint`, | |
`gatsby-plugin-react-helmet`, | |
`gatsby-transformer-sharp`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
import base64 | |
import markdown | |
BASE_URL = 'api-url-goes-here' | |
USER_INFO = [{"username": "Jacob", "password": "password-goes-here", "email": "email-goes-here"}, {"username": "e-vaughn", | |
"password": "passwor-goes-here", "email": "email-goes-here"}, {"username": "Megan", "password": "password-goes-here", "email": "email-goes-here"}] | |
NIT_PICKERS = [] | |
# Check if proper users exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
import base64 | |
import markdown | |
import sys | |
if not sys.argv[1]: | |
raise Exception( | |
'NO USER SPECIFIED, please provide a user as second argument') | |
elif not sys.argv[2]: |