Skip to content

Commit ad21579

Browse files
committed
revamped-engine init
1 parent f0d5946 commit ad21579

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+21374
-17711
lines changed

.eslintrc.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
module.exports = {
22
env: {
33
browser: true,
4-
es6: true
4+
es6: true,
55
},
66
plugins: ['react'],
77
globals: {
8-
graphql: false
8+
graphql: false,
99
},
1010
parserOptions: {
1111
sourceType: 'module',
1212
ecmaFeatures: {
1313
experimentalObjectRestSpread: true,
14-
jsx: true
15-
}
16-
}
14+
jsx: true,
15+
},
16+
},
1717
}

.gitignore

-7
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,3 @@ yarn-error.log
6767
.pnp.js
6868
# Yarn Integrity file
6969
.yarn-integrity
70-
71-
.vscode
72-
.vscode/*
73-
!.vscode/settings.json
74-
!.vscode/tasks.json
75-
!.vscode/launch.json
76-
!.vscode/extensions.json

.gitmodules

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
[submodule "stackcheats"]
3-
path = stackcheats
2+
[submodule "stacksheets"]
3+
path = stacksheets
44
url = [email protected]:stackcheats/stacksheets.git

.prettierrc

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2+
"trailingComma": "es5",
23
"semi": false,
3-
"singleQuote": true,
4-
"useTabs": true,
5-
"tabWidth": 4
6-
}
4+
"singleQuote": true
5+
}

.travis.yml

+8-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
language: node_js
22

3-
git:
4-
submodules: false
5-
6-
before_install:
7-
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
8-
- git submodule update --init --recursive
9-
103
os:
11-
- linux
4+
- linux
5+
- osx
126

137
node_js:
14-
- '8.9.0'
8+
- 'node'
9+
- 'lts/*'
10+
- '7'
11+
- '8'
1512

1613
script:
17-
- npm install
18-
- npm run lint
19-
20-
after_success:
21-
- npm run deploy:github
14+
- npm install
15+
- npm run lint

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 Athiththan
3+
Copyright (c) 2015 Gatsbyjs
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

gatsby-browser.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
// custom typefaces
12
import 'typeface-montserrat'
23
import 'typeface-merriweather'
34

4-
require('prismjs/themes/prism-solarizedlight.css')
5-
require('prismjs/plugins/line-numbers/prism-line-numbers.css')
5+
import { wrapRootElement as wrap } from './wrap-root-element'
66

7-
import './src/styles/sidebar-menu.css'
8-
import './src/styles/styles.css'
9-
import './src/styles/gist.css'
10-
import './src/styles/code-surfer.css'
7+
// styles
8+
import './src/styles/style.scss'
9+
10+
export const wrapRootElement = wrap

gatsby-config.js

+120-87
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,158 @@
1-
const root = require('path').resolve.bind(null, __dirname)
2-
3-
const stackcheats_path = root('stackcheats/stack')
4-
51
module.exports = {
6-
siteMetadata: {
7-
title: `stackcheats`,
8-
author: `Athiththan Kathirgamasegarana`,
9-
description: `A blog platform developed as a fun (part-time) and turned out to be a personal meta site. Check out the publoshed stories, sheets and tech guides related to opensource`,
10-
sheetPath: stackcheats_path,
11-
siteUrl: `https://stackcheats.github.io`,
12-
social: {
13-
twitter: `athiththan11`
14-
},
15-
twitterUsername: "@athiththan11",
16-
keywords: ['Stackcheats', 'Blogs', 'Stories', 'Cheatsheets'],
17-
},
18-
plugins: [
19-
`gatsby-plugin-theme-ui`,
2+
siteMetadata: {
3+
title: `StackCheats`,
4+
author: `Athiththan Kathirgamasegaran`,
5+
description: `A Personal Blog Platform of Athiththan Kathirgamasegaran`,
6+
siteUrl: `https://stackcheats.github.io/`,
7+
social: {
8+
twitter: `athiththan11`,
9+
},
10+
},
11+
plugins: [
2012
{
2113
resolve: `gatsby-source-filesystem`,
2214
options: {
23-
path: `${stackcheats_path}/sheets`,
24-
name: `blog`
25-
}
26-
},
27-
{
28-
resolve: `gatsby-source-filesystem`,
29-
options: {
30-
path: `${stackcheats_path}/cheats`,
31-
name: `cheatsheet`
32-
}
15+
path: `${__dirname}/stacksheets/content/blog`,
16+
name: `blog`,
17+
},
3318
},
3419
{
3520
resolve: `gatsby-source-filesystem`,
3621
options: {
37-
path: `${stackcheats_path}/assets`,
38-
name: `assets`
39-
}
40-
},
41-
{
42-
resolve: `gatsby-source-filesystem`,
43-
options: {
44-
path: `${stackcheats_path}/covers`,
45-
name: `covers`
46-
}
47-
},
48-
{
49-
resolve: `gatsby-mdx`,
50-
options: {
51-
defaultLayouts: {
52-
posts: require.resolve('./src/components/Layout.js')
53-
}
54-
}
55-
},
22+
path: `${__dirname}/stacksheets/content/assets`,
23+
name: `assets`,
24+
},
25+
},
5626
{
5727
resolve: `gatsby-plugin-mdx`,
58-
options: {
59-
extensions: ['.mdx', '.md'],
28+
options: {
29+
extensions: ['.mdx', '.md'],
30+
// a workaround to solve mdx-remark plugin compat issue
31+
// https://github.com/gatsbyjs/gatsby/issues/15486
32+
plugins: [`gatsby-remark-images`],
6033
gatsbyRemarkPlugins: [
6134
{
62-
resolve: `gatsby-remark-embed-gist`,
35+
resolve: `gatsby-remark-images`,
6336
options: {
64-
username: 'athiththan11',
65-
includeDefaultCss: false
66-
}
37+
maxWidth: 590,
38+
},
6739
},
6840
{
6941
resolve: `gatsby-remark-responsive-iframe`,
7042
options: {
71-
wrapperStyle: `margin-bottom: 1.0725rem`
72-
}
43+
wrapperStyle: `margin-bottom: 1.0725rem`,
44+
},
7345
},
7446
{
75-
resolve: `gatsby-remark-prismjs`,
76-
options: {
77-
classPrefix: 'language-',
78-
inlineCodeMaker: null,
79-
aliases: {},
80-
showLineNumbers: false,
81-
noInlineHighlight: false
82-
}
83-
},
84-
{
85-
resolve: `gatsby-remark-images`,
86-
options: {
87-
maxWidth: 590
88-
}
47+
resolve: `gatsby-remark-copy-linked-files`,
8948
},
90-
`gatsby-remark-copy-linked-files`,
91-
`gatsby-remark-smartypants`
92-
]
93-
}
94-
},
49+
50+
{
51+
resolve: `gatsby-remark-smartypants`,
52+
},
53+
],
54+
},
55+
},
9556
`gatsby-transformer-sharp`,
96-
`gatsby-plugin-sharp`,
57+
`gatsby-plugin-sharp`,
58+
`gatsby-plugin-sass`,
9759
{
9860
resolve: `gatsby-plugin-google-analytics`,
9961
options: {
100-
trackingId: `UA-144714384-1`
101-
}
62+
//trackingId: `ADD YOUR TRACKING ID HERE`,
63+
},
64+
},
65+
{
66+
resolve: `gatsby-plugin-feed`,
67+
options: {
68+
query: `
69+
{
70+
site {
71+
siteMetadata {
72+
title
73+
description
74+
siteUrl
75+
}
76+
}
77+
}
78+
`,
79+
feeds: [
80+
{
81+
serialize: ({ query: { site, allMdx } }) => {
82+
return allMdx.edges.map((edge) => {
83+
return Object.assign(
84+
{},
85+
edge.node.frontmatter,
86+
{
87+
description: edge.node.excerpt,
88+
data: edge.node.frontmatter.date,
89+
url:
90+
site.siteMetadata.siteUrl +
91+
edge.node.fields.slug,
92+
guid:
93+
site.siteMetadata.siteUrl +
94+
edge.node.fields.slug,
95+
custom_elements: [
96+
{
97+
'content:encoded':
98+
edge.node.html,
99+
},
100+
],
101+
}
102+
)
103+
})
104+
},
105+
106+
/* if you want to filter for only published posts, you can do
107+
* something like this:
108+
* filter: { frontmatter: { published: { ne: false } } }
109+
* just make sure to add a published frontmatter field to all posts,
110+
* otherwise gatsby will complain
111+
**/
112+
query: `
113+
{
114+
allMdx(
115+
limit: 1000,
116+
sort: { order: DESC, fields: [frontmatter___date] },
117+
) {
118+
edges {
119+
node {
120+
fields { slug }
121+
frontmatter {
122+
title
123+
date
124+
}
125+
html
126+
}
127+
}
128+
}
129+
}
130+
`,
131+
output: '/rss.xml',
132+
title: 'Gatsby RSS feed',
133+
},
134+
],
135+
},
102136
},
103-
// `gatsby-plugin-feed`,
104137
{
105138
resolve: `gatsby-plugin-manifest`,
106139
options: {
107-
name: `stackcheats.io`,
108-
short_name: `stackcheats`,
140+
name: `StackCheats`,
141+
short_name: `StackCheats`,
109142
start_url: `/`,
110143
background_color: `#ffffff`,
111144
theme_color: `#663399`,
112145
display: `minimal-ui`,
113-
icon: `stackcheats/stack/assets/stackcheats-icon.png`
114-
}
146+
icon: `stacksheets/content/assets/gatsby-icon.png`,
147+
},
115148
},
116-
// `gatsby-plugin-offline`,
149+
`gatsby-plugin-offline`,
117150
`gatsby-plugin-react-helmet`,
118151
{
119152
resolve: `gatsby-plugin-typography`,
120153
options: {
121-
pathToConfigModule: `src/utils/typography`
122-
}
123-
}
124-
]
154+
pathToConfigModule: `src/utils/typography`,
155+
},
156+
},
157+
],
125158
}

0 commit comments

Comments
 (0)