This commit is contained in:
Ken
2019-08-16 06:47:09 -07:00
commit ae34d3aa28
12 changed files with 13390 additions and 0 deletions
+69
View File
@@ -0,0 +1,69 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# dotenv environment variables file
.env
# gatsby files
.cache/
public
# Mac files
.DS_Store
# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
+7
View File
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
}
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2019 Gatsbyjs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+97
View File
@@ -0,0 +1,97 @@
<p align="center">
<a href="https://www.gatsbyjs.org">
<img alt="Gatsby" src="https://www.gatsbyjs.org/monogram.svg" width="60" />
</a>
</p>
<h1 align="center">
Starter for the official Gatsby blog theme
</h1>
Quickly get started using the Gatsby blog theme! This starter creates a new Gatsby site that is preconfigured to work with the [official Gatsby blog theme](https://www.npmjs.com/package/gatsby-theme-blog).
## 🚀 Quick start
1. **Create a Gatsby site.**
Use the Gatsby CLI to create a new site, specifying the blog theme starter.
```sh
# create a new Gatsby site using the blog theme starter
gatsby new my-themed-blog https://github.com/gatsbyjs/gatsby-starter-blog-theme
```
2. **Start developing.**
Navigate into your new sites directory and start it up.
```sh
cd my-themed-blog/
gatsby develop
```
3. **Open the code and start customizing!**
Your site is now running at `http://localhost:8000`!
To get started, check out the guide to [using the Gatsby blog theme starter](http://gatsbyjs.org/docs/themes/using-a-gatsby-theme), or the longer, [more detailed tutorial](http://gatsbyjs.org/tutorial/using-a-theme).
## 🧐 What's inside?
Here are the top-level files and directories you'll see in a site created using the blog theme starter:
```
gatsby-starter-blog-theme
├── content
│ ├── assets
│ │ └── avatar.png
│ └── posts
│ ├── hello-world.mdx
│ └── my-second-post.mdx
├── src
│ └── gatsby-theme-blog
│ ├── components
│ │ └── bio-content.js
│ └── gatsby-theme-ui
│ └── colors.js
├── .gitignore
├── .prettierrc
├── gatsby-config.js
├── LICENSE
├── package-lock.json
├── package.json
└── README.md
```
1. **`/content`**: A content folder holding assets that the theme expects to exist. This will vary from theme to theme -- this starter is set up to get you started with the blog theme, which expects an image asset for your avatar, and blog post content. Replace the avatar image file, delete the demo posts, and add your own!
2. **`/src`**: You will probably want to customize your site to personalize it. The files under `/src/gatsby-theme-blog` _shadow_, or override, the files of the same name in the `gatsby-theme-blog` package. To learn more about this, check out the [guide to getting started with using the blog theme starter](http://gatsbyjs.org/docs/themes/using-a-gatsby-theme).
3. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for.
4. **`.prettierrc`**: This file tells [Prettier](https://prettier.io/) which configuration it should use to lint files.
5. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins youd like to include, etc. When using themes, it's where you'll include the theme plugin, and any customization options the theme provides.
6. **`LICENSE`**: Gatsby is licensed under the MIT license.
7. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(You wont change this file directly).**
8. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the projects name, author, etc). This manifest is how npm knows which packages to install for your project.
9. **`README.md`**: A text file containing useful reference information about your project.
## 🎓 Learning Gatsby
Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.org/).
Here are some places to start:
### Themes
- To learn more about Gatsby themes specifically, we recommend checking out the [theme docs](https://www.gatsbyjs.org/docs/themes/).
### General
- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
- **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.org/docs/).** In particular, check out the _Reference Guides_ and _Gatsby API_ sections in the sidebar.
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

+31
View File
@@ -0,0 +1,31 @@
---
title: Hello World (example)
date: 2019-04-15
---
Hello, world! This is a demo post for `gatsby-theme-blog`.
Delete me, and get writing!
```js:title=gatsby-config.js
module.exports = {
__experimentalThemes: [
"gatsby-theme-blog", // highlight-line
"gatsby-theme-notes"
]
};
```
This is another paragraph after the code block.
## This is a secondary heading
```jsx
import React from "react";
import { ThemeProvider } from "theme-ui";
import theme from "./theme";
export default props => (
<ThemeProvider theme={theme}>{props.children}</ThemeProvider>
);
```
+10
View File
@@ -0,0 +1,10 @@
---
title: My Second Post! (example)
date: 2019-05-15
---
Wow! I love blogging so much already.
Did you know that "despite its name, salted duck eggs can also be made from chicken eggs, though the taste and texture will be somewhat different, and the egg yolk will be less rich."? ([Wikipedia Link](http://en.wikipedia.org/wiki/Salted_duck_egg))
Yeah, I didn't either.
+24
View File
@@ -0,0 +1,24 @@
module.exports = {
plugins: [
{
resolve: `gatsby-theme-blog`,
options: {},
},
],
// Customize your site metadata:
siteMetadata: {
title: `My Blog Title`,
author: `My Name`,
description: `My site description...`,
social: [
{
name: `twitter`,
url: `https://twitter.com/gatsbyjs`,
},
{
name: `github`,
url: `https://github.com/gatsbyjs`,
},
],
},
}
+16
View File
@@ -0,0 +1,16 @@
{
"name": "gatsby-starter-blog-theme",
"private": true,
"version": "0.0.1",
"scripts": {
"develop": "gatsby develop",
"start": "gatsby develop",
"build": "gatsby build"
},
"dependencies": {
"gatsby": "^2.13.65",
"gatsby-theme-blog": "^1.0.2",
"react": "^16.9.0",
"react-dom": "^16.9.0"
}
}
@@ -0,0 +1,16 @@
import React, { Fragment } from "react"
import { Styled } from "theme-ui"
/**
* Change the content to add your own bio
*/
export default () => (
<Fragment>
This is where <Styled.a href="http://example.com/">your name</Styled.a>
{` `}
goes.
<br />
Or whatever, you make the rules.
</Fragment>
)
@@ -0,0 +1,25 @@
import merge from "deepmerge"
import defaultThemeColors from "gatsby-theme-blog/src/gatsby-plugin-theme-ui/colors"
/*
* Want to change your theme colors?
* Try uncommenting the color overrides below
* to go from default purple to a blue theme
*/
// const darkBlue = `#007acc`
// const lightBlue = `#66E0FF`
// const blueGray = `#282c35`
export default merge(defaultThemeColors, {
// text: blueGray,
// primary: darkBlue,
// heading: blueGray,
// modes: {
// dark: {
// background: blueGray,
// primary: lightBlue,
// highlight: lightBlue,
// },
// },
})
+13074
View File
File diff suppressed because it is too large Load Diff