-
-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add
gatsby-theme-emma-core
(#49)
Basically the same process as: gatsbyjs/gatsby#16166 > A Gatsby theme for creating a blog child theme. It includes all of the data structures you need to get up and running building a blog and includes no additional theming or style opinions. Just for the Emma theme. Which means: You can totally customize the design now, but keep the data structure. So awesome <3 As the Theme UI styling for example happens in `emma`, not `emma-core`.
- Loading branch information
Showing
24 changed files
with
815 additions
and
584 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.cache | ||
node_modules | ||
public | ||
projects | ||
|
||
.idea | ||
.vscode | ||
.DS_Store | ||
|
||
index.d.ts | ||
types.ts | ||
|
||
__tests__ | ||
|
||
|
||
tsconfig.json | ||
jest.config.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<p align="center"> | ||
<a href="https://themes.lekoarts.de"> | ||
<img alt="Gatsby Theme" src="https://img.lekoarts.de/gatsby/gatsby-themes-illustration.png" /> | ||
</a> | ||
</p> | ||
<h1 align="center"> | ||
@lekoarts/gatsby-theme-emma-core | ||
</h1> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/LekoArts/gatsby-themes/blob/master/LICENSE"> | ||
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="@lekoarts/gatsby-theme-emma-core is released under the MIT license." /> | ||
</a> | ||
<a href="https://www.npmjs.org/package/@lekoarts/gatsby-theme-emma-core"> | ||
<img src="https://img.shields.io/npm/v/@lekoarts/gatsby-theme-emma-core.svg" alt="Current npm package version." /> | ||
</a> | ||
<a href="https://npmcharts.com/compare/@lekoarts/gatsby-theme-emma-core?minimal=true"> | ||
<img src="https://img.shields.io/npm/dm/@lekoarts/gatsby-theme-emma-core.svg" alt="Downloads per month on npm." /> | ||
</a> | ||
<a href="https://npmcharts.com/compare/@lekoarts/gatsby-theme-emma-core?minimal=true"> | ||
<img src="https://img.shields.io/npm/dt/@lekoarts/gatsby-theme-emma-core.svg" alt="Total downloads on npm." /> | ||
</a> | ||
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" /> | ||
<a href="https://twitter.com/intent/follow?screen_name=lekoarts_de"> | ||
<img src="https://img.shields.io/twitter/follow/lekoarts_de.svg?label=Follow%20@lekoarts_de" alt="Follow @lekoarts_de" /> | ||
</a> | ||
</p> | ||
|
||
Core Theme for [`@lekoarts/gatsby-theme-emma`](https://github.com/LekoArts/gatsby-themes/tree/master/themes/gatsby-theme-emma). This theme implements the `Project` and `Page` node interfaces and exports templates (+ queries) which you can shadow. | ||
|
||
[**Demo Website**](https://emma.lekoarts.de) ([Source Code](https://github.com/LekoArts/gatsby-starter-portfolio-emma)) | ||
|
||
Also be sure to checkout other [Free & Open Source Gatsby Themes](https://themes.lekoarts.de) | ||
|
||
## Installation | ||
|
||
```sh | ||
npm install @lekoarts/gatsby-theme-emma-core | ||
``` | ||
|
||
## Usage | ||
|
||
### Theme options | ||
|
||
| Key | Default Value | Description | | ||
| -------------- | ------------------ | --------------------------------------------------------------------------------------------------------- | | ||
| `basePath` | `/` | Root url for the theme | | ||
| `projectsPath` | `content/projects` | Location of projects | | ||
| `pagesPath` | `content/pages` | Location of additional pages (optional) | | ||
| `mdx` | `true` | Configure `gatsby-plugin-mdx` (if your website already is using the plugin pass `false` to turn this off) | | ||
|
||
The usage of `content/pages` is optional. If no page/MDX file is found the navigation will be hidden. | ||
|
||
#### Example usage | ||
|
||
```js | ||
// gatsby-config.js | ||
module.exports = { | ||
plugins: [ | ||
{ | ||
resolve: `@lekoarts/gatsby-theme-emma-core`, | ||
options: { | ||
// basePath defaults to `/` | ||
basePath: `/sideproject`, | ||
// projectsPath defaults to `content/projects` | ||
projectsPath: `content/cool-projects` | ||
} | ||
} | ||
] | ||
}; | ||
``` | ||
|
||
## 🌟 Supporting me | ||
|
||
Thanks for using this project! I'm always interested in seeing what people do with my projects, so don't hesitate to tag me on [Twitter](https://twitter.com/lekoarts_de) and share the project with me. | ||
|
||
Please star this project, share it on Social Media or consider supporting me on [Patreon](https://www.patreon.com/lekoarts)! | ||
|
||
If you want to hire me for **contract/freelance work**, you can do so! [Get in touch with me!](https://www.lekoarts.de/en/contact) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
const withDefaults = require(`./utils/default-options`) | ||
|
||
module.exports = themeOptions => { | ||
const options = withDefaults(themeOptions) | ||
const { mdx = true } = themeOptions | ||
|
||
return { | ||
siteMetadata: { | ||
siteTitle: `Emma`, | ||
siteTitleAlt: `Emma - @lekoarts/gatsby-theme-emma`, | ||
siteHeadline: `Emma - Gatsby Theme from @lekoarts`, | ||
siteUrl: `https://emma.lekoarts.de`, | ||
siteDescription: `Minimalistic portfolio with full-width grid, page transitions, support for additional MDX pages, and a focus on large images`, | ||
siteLanguage: `en`, | ||
siteImage: `/banner.jpg`, | ||
author: `@lekoarts_de`, | ||
basePath: options.basePath, | ||
projectsPath: options.projectsPath, | ||
pagesPath: options.pagesPath, | ||
}, | ||
plugins: [ | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
name: options.projectsPath, | ||
path: options.projectsPath, | ||
}, | ||
}, | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
name: options.pagesPath, | ||
path: options.pagesPath, | ||
}, | ||
}, | ||
mdx && { | ||
resolve: `gatsby-plugin-mdx`, | ||
options: { | ||
gatsbyRemarkPlugins: [ | ||
{ | ||
resolve: `gatsby-remark-images`, | ||
options: { | ||
maxWidth: 820, | ||
quality: 90, | ||
linkImagesToOriginal: false, | ||
}, | ||
}, | ||
], | ||
plugins: [ | ||
{ | ||
resolve: `gatsby-remark-images`, | ||
options: { | ||
maxWidth: 820, | ||
quality: 90, | ||
linkImagesToOriginal: false, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
`gatsby-transformer-sharp`, | ||
`gatsby-plugin-sharp`, | ||
`gatsby-plugin-typescript`, | ||
].filter(Boolean), | ||
} | ||
} |
Oops, something went wrong.