Giter VIP home page Giter VIP logo

the6thcolumnproject.github.io's Introduction

6thcolum

This is the repository of the the 6th column project website.

Contribution Guide

Index

Getting Started

The generated website is served out of the gh-pages branch of this repository.

  • src/pages/index.tsx is the entry point.

Dependencies

This Website is generated with Gatsby. Gatsby is written in JavaScript and uses React and GraphQL.

To set up your system you will need to install node.

Once node is installed, install Gatsby (globally).

npm install -g gatsby-cli

You will also need the gh-pages module installed before you can make any changes.
(:warning: Do the following command from the root directory of this project)

npm install gh-pages

Making Changes

  • Clone this repository (be sure you have the dependencies โ˜๏ธ. Particularly gh-pages)
  • Make changes to the files under the src/pages/ directory.
  • You may make changes to the sytlesheets in the src/css/ directory.

Launch an http server on localhost.
Using the following command you will launch a gatsby's node.js http server. It will update as you develop ๐Ÿ˜‰ the site.
(:warning: Do the following command from the root directory of this project)

gatsby develop

once the server starts up

mgf@serenity:[The6thColumnProject.github.io]:[main$โœ“]:[89228]> gatsby develop
success open and validate gatsby-configs - 0.026s
success load plugins - 1.272s
success onPreInit - 0.008s
success initialize cache - 0.013s
success copy gatsby files - 0.057s
success onPreBootstrap - 0.008s
success createSchemaCustomization - 0.026s
success source and transform nodes - 0.133s
success building schema - 0.297s
success createPages - 0.038s
success createPagesStatefully - 0.060s
success onPreExtractQueries - 0.004s
success update schema - 0.026s
success extract queries from components - 0.284s
success write out requires - 0.033s
success write out redirect data - 0.002s
success Build manifest and related icons - 0.002s
success onPostBootstrap - 0.019s
โ €
info bootstrap finished - 7.124 s
โ €
success run queries - 0.188s - 8/8 42.49/s
warn Browserslist: caniuse-lite is outdated. Please run next command `npm update`
โ €
You can now view The 6th Column Project in the browser.
โ €
  http://localhost:8000/
โ €
View GraphiQL, an in-browser IDE, to explore your site's data and schema
โ €
  http://localhost:8000/___graphql
โ €
Note that the development build is not optimized.
To create a production build, use gatsby build
โ €
success Building development bundle - 5.856s

Then point your browser to http://localhost:8000 to view the rendered site.

Building

You may build (generate) the site explicitly by running...

gatsby build

When you are satisfied with your changes and want to publish the changes to the live, external site run...

Deploying

npm run deploy

This will generate and push the site to this project's gh-pages branch for it to be served.

What's inside?

Files structure

 .
 โ”œโ”€โ”€ data                          // website data (included into graphQL)
 โ”‚   โ”œโ”€โ”€ author.json               // list of blog authors
 โ”‚   โ”œโ”€โ”€ avatars                   // authors avatars
 โ”‚   โ””โ”€โ”€ blog                      // all blog data (posts, images)
 โ”œโ”€โ”€ gatsby-config.js              // gatsby configuration
 โ”œโ”€โ”€ gatsby-node.js                // gatsby node hooks
 โ”œโ”€โ”€ generators                    // generators (`npm run generate`)
 โ”‚   โ”œโ”€โ”€ blog-post-generator.js    // `blog post` generator
 โ”‚   โ”œโ”€โ”€ component-generator.js    // `component` generator
 โ”‚   โ”œโ”€โ”€ page-generator.js         // `page` generator
 โ”‚   โ”œโ”€โ”€ plopfile.js               // generators entry
 โ”‚   โ”œโ”€โ”€ templates                 // all templates (handlebar notation)
 โ”‚   โ””โ”€โ”€ utils.js                  // utils scripts for generators
 โ”œโ”€โ”€ package.json
 โ”œโ”€โ”€ public                        // output folder (in .gitignore)
 โ”œโ”€โ”€ README.md                     // this file
 โ”œโ”€โ”€ src                           // sources
 โ”‚   โ”œโ”€โ”€ components                // all react components
 โ”‚   โ”œโ”€โ”€ css                       // styles
 โ”‚   โ”œโ”€โ”€ declarations.d.ts         // declarations for no typescript modules/files
 โ”‚   โ”œโ”€โ”€ graphql-types.d.ts        // graphql types (`npm run graphql-types`)
 โ”‚   โ”œโ”€โ”€ html.tsx                  // main html (required)
 โ”‚   โ”œโ”€โ”€ layouts                   // layouts
 โ”‚   โ”‚   โ””โ”€โ”€ default.tsx           // default layout (required)
 โ”‚   โ”œโ”€โ”€ pages                     // all pages
 โ”‚   โ””โ”€โ”€ templates                 // all templates (used for procedural page creation, see `gatsby-node.js`)
 โ”œโ”€โ”€ tools                         // miscs tools for dev
 โ”‚   โ””โ”€โ”€ update-post-date.js       // update post date hook
 โ”œโ”€โ”€ tsconfig.json                 // typescript configuration
 โ”œโ”€โ”€ tslint.json                   // tslint configuration
 โ””โ”€โ”€ package-lock.json             // npm lock file

Plop generators - npm run generate

To avoid any boring copy/paste, this starter-kit have many generators to permit simple bootstrap of current file pattern (eg. components/pages/blog posts). e.g. to add a new blog post first add the authors to data/authors.json and add authors' images to the data/avatars folder. Next execute 'npm run generate' and select 'Blog post'. Follow the prompts for a new post. Each blog post requires an image be added to the /data/blog/ folder prior to running 'gatsby develop'.

You can add/delete/modify any generators into /generators folder.

Be lazy and have fun!

Legal Information

Copyright ยฉ 2012-2021 The 6th Column Group, LLC [email protected]

the6thcolumnproject.github.io's People

Contributors

maxgfaraday avatar

Watchers

Gavin M. Bell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.