Skip to content

Commit

Permalink
Lets bem.info begin
Browse files Browse the repository at this point in the history
  • Loading branch information
tadatuta committed Feb 27, 2019
1 parent 5314642 commit f66e476
Show file tree
Hide file tree
Showing 14 changed files with 2,394 additions and 33 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is for unifying the coding style for different editors and IDEs.
# More information at http://EditorConfig.org

# No .editorconfig files above the root directory
root = true

[*]
charset = utf-8
indent_size = 2
end_of_line = lf
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
30 changes: 19 additions & 11 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
siteMetadata: {
title: `Gatsby Default Starter`,
title: `BEM`,
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
author: `@gatsbyjs`,
},
Expand All @@ -13,18 +13,26 @@ module.exports = {
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
// `gatsby-transformer-sharp`,
// `gatsby-plugin-sharp`,
// {
// resolve: `gatsby-plugin-manifest`,
// options: {
// name: `gatsby-starter-default`,
// short_name: `starter`,
// start_url: `/`,
// background_color: `#663399`,
// theme_color: `#663399`,
// display: `minimal-ui`,
// icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
// },
// },
{
resolve: `gatsby-plugin-manifest`,
resolve: `gatsby-plugin-typescript`,
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `#663399`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
isTSX: true, // defaults to false
// jsxPragma: `jsx`, // defaults to "React"
allExtensions: true, // defaults to false
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
Expand Down
22 changes: 16 additions & 6 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/
const path = require('path');
const model = require('./model/model');

// You can delete this file if you're not using it
module.exports.createPages = ({ actions, graphql }) => {
const { createPage } = actions;

const articleTemplate = path.resolve(`src/templates/article.tsx`)

model.forEach(page => createPage({
path: page.url,
component: articleTemplate,
context: {
model,
page
},
}));
}
Loading

0 comments on commit f66e476

Please sign in to comment.