commit bf8823b998617a63f25ff7664b0a1da348b72c7c Author: Ivan Li Date: Fri Jul 15 21:19:36 2022 +0800 Initial commit from gatsby: (https://github.com/LekoArts/gatsby-starter-minimal-blog.git) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..10a645f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,8 @@ +# These are supported funding model platforms + +github: [LekoArts] +patreon: lekoarts +open_collective: # Replace with a single Open Collective username +ko_fi: lekoarts +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +custom: # Replace with a single custom sponsorship URL \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..00b2c30 --- /dev/null +++ b/.gitignore @@ -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 +**/node_modules/** + +# 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 + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.* +!.env.example + +.cache +**/.cache +public + +.idea +.vscode +.DS_Store \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ac2ef2f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,310 @@ +# Change Log + +## 1.3.12 + +### Patch Changes + +- Updated dependencies [[`1598dd6`](https://github.com/LekoArts/gatsby-themes/commit/1598dd660e3ba795b50c4aeb11550806e0b7b6ba)]: + - @lekoarts/gatsby-theme-minimal-blog@4.0.0 + +## 1.3.11 + +### Patch Changes + +- Updated dependencies [[`1785dcf`](https://github.com/LekoArts/gatsby-themes/commit/1785dcfad131ab9270c401e6a3bb450f7cb01288)]: + - @lekoarts/gatsby-theme-minimal-blog@3.0.0 + +## 1.3.10 + +### Patch Changes + +- [`716fde2`](https://github.com/LekoArts/gatsby-themes/commit/716fde287d20e80e834d451825b55af249e0168a) [#579](https://github.com/LekoArts/gatsby-themes/pull/579) Thanks [@LekoArts](https://github.com/LekoArts)! - chore: Add gatsby-plugin-gatsby-cloud to starters + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.3.9](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.3.8...minimal-blog@1.3.9) (2020-11-11) + +**Note:** Version bump only for package minimal-blog + +## [1.3.8](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.3.7...minimal-blog@1.3.8) (2020-11-04) + +**Note:** Version bump only for package minimal-blog + +## [1.3.7](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.3.6...minimal-blog@1.3.7) (2020-11-02) + +**Note:** Version bump only for package minimal-blog + +## [1.3.6](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.3.5...minimal-blog@1.3.6) (2020-11-01) + +**Note:** Version bump only for package minimal-blog + +## [1.3.5](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.3.4...minimal-blog@1.3.5) (2020-10-25) + +**Note:** Version bump only for package minimal-blog + +## [1.3.4](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.3.3...minimal-blog@1.3.4) (2020-10-25) + +**Note:** Version bump only for package minimal-blog + +## [1.3.3](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.3.2...minimal-blog@1.3.3) (2020-10-25) + +**Note:** Version bump only for package minimal-blog + +## [1.3.2](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.3.1...minimal-blog@1.3.2) (2020-10-10) + +**Note:** Version bump only for package minimal-blog + +## [1.3.1](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.3.0...minimal-blog@1.3.1) (2020-09-25) + +**Note:** Version bump only for package minimal-blog + +# [1.3.0](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.2.7...minimal-blog@1.3.0) (2020-09-25) + +### Features + +- **minimal-blog:** Add Canonical URL support ([#494](https://github.com/LekoArts/gatsby-themes/issues/494)) ([0e9d7ac](https://github.com/LekoArts/gatsby-themes/commit/0e9d7ac04fdf9a7d30cca8c7ccf7565d3955502f)) + +## [1.2.7](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.2.6...minimal-blog@1.2.7) (2020-09-25) + +**Note:** Version bump only for package minimal-blog + +## [1.2.6](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.2.5...minimal-blog@1.2.6) (2020-09-16) + +**Note:** Version bump only for package minimal-blog + +## [1.2.5](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.2.4...minimal-blog@1.2.5) (2020-09-10) + +**Note:** Version bump only for package minimal-blog + +## [1.2.4](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.2.3...minimal-blog@1.2.4) (2020-08-28) + +**Note:** Version bump only for package minimal-blog + +## [1.2.3](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.2.2...minimal-blog@1.2.3) (2020-08-27) + +**Note:** Version bump only for package minimal-blog + +## [1.2.2](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.2.1...minimal-blog@1.2.2) (2020-08-27) + +**Note:** Version bump only for package minimal-blog + +## [1.2.1](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.2.0...minimal-blog@1.2.1) (2020-08-27) + +**Note:** Version bump only for package minimal-blog + +# [1.2.0](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.13...minimal-blog@1.2.0) (2020-07-09) + +### Bug Fixes + +- **minimal-blog:** Use function for SpotifyPlayer example component ([bd2c343](https://github.com/LekoArts/gatsby-themes/commit/bd2c343580c041383a98822de2c622a7d944d93d)) + +### Features + +- Add bundle-analyzer and lazy-load react-live ([#450](https://github.com/LekoArts/gatsby-themes/issues/450)) ([667fd33](https://github.com/LekoArts/gatsby-themes/commit/667fd33ce6af546cf2250af1e22395a26f45d6a2)) + +## [1.1.13](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.12...minimal-blog@1.1.13) (2020-07-09) + +**Note:** Version bump only for package minimal-blog + +## [1.1.12](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.11...minimal-blog@1.1.12) (2020-07-04) + +**Note:** Version bump only for package minimal-blog + +## [1.1.11](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.10...minimal-blog@1.1.11) (2020-07-03) + +**Note:** Version bump only for package minimal-blog + +## [1.1.10](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.9...minimal-blog@1.1.10) (2020-07-02) + +**Note:** Version bump only for package minimal-blog + +## [1.1.9](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.8...minimal-blog@1.1.9) (2020-06-11) + +### Bug Fixes + +- Normalize CSS in themes & examples ([#422](https://github.com/LekoArts/gatsby-themes/issues/422)) ([9a2600c](https://github.com/LekoArts/gatsby-themes/commit/9a2600cc45d0f6729799183116f1b87d3c943749)) + +## [1.1.8](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.7...minimal-blog@1.1.8) (2020-06-11) + +### Bug Fixes + +- **gatsby-theme-minimal-blog:** font-size on mobile iOS ([#421](https://github.com/LekoArts/gatsby-themes/issues/421)) ([ab65ecc](https://github.com/LekoArts/gatsby-themes/commit/ab65ecceaabefc0f2f77c6f9602280a7214c34d1)) + +## [1.1.7](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.6...minimal-blog@1.1.7) (2020-06-08) + +**Note:** Version bump only for package minimal-blog + +## [1.1.6](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.5...minimal-blog@1.1.6) (2020-05-29) + +**Note:** Version bump only for package minimal-blog + +## [1.1.5](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.4...minimal-blog@1.1.5) (2020-05-12) + +**Note:** Version bump only for package minimal-blog + +## [1.1.4](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.3...minimal-blog@1.1.4) (2020-05-04) + +**Note:** Version bump only for package minimal-blog + +## [1.1.3](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.2...minimal-blog@1.1.3) (2020-05-02) + +**Note:** Version bump only for package minimal-blog + +## [1.1.2](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.1...minimal-blog@1.1.2) (2020-05-02) + +**Note:** Version bump only for package minimal-blog + +## [1.1.1](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.1.0...minimal-blog@1.1.1) (2020-04-28) + +**Note:** Version bump only for package minimal-blog + +# [1.1.0](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.17...minimal-blog@1.1.0) (2020-04-27) + +### Features + +- Update theme-ui to v0.3.x ([#371](https://github.com/LekoArts/gatsby-themes/issues/371)) ([67a05ac](https://github.com/LekoArts/gatsby-themes/commit/67a05ac3e1deaddfe38591739e7f50f56d49d109)), closes [/theme-ui.com/migrating#v03](https://github.com//theme-ui.com/migrating/issues/v03) [#262](https://github.com/LekoArts/gatsby-themes/issues/262) + +## [1.0.17](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.16...minimal-blog@1.0.17) (2020-04-24) + +**Note:** Version bump only for package minimal-blog + +## [1.0.16](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.15...minimal-blog@1.0.16) (2020-04-24) + +**Note:** Version bump only for package minimal-blog + +## [1.0.15](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.14...minimal-blog@1.0.15) (2020-04-13) + +**Note:** Version bump only for package minimal-blog + +## [1.0.14](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.13...minimal-blog@1.0.14) (2020-04-13) + +**Note:** Version bump only for package minimal-blog + +## [1.0.13](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.12...minimal-blog@1.0.13) (2020-04-12) + +**Note:** Version bump only for package minimal-blog + +## [1.0.12](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.11...minimal-blog@1.0.12) (2020-04-12) + +**Note:** Version bump only for package minimal-blog + +## [1.0.11](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.10...minimal-blog@1.0.11) (2020-04-12) + +**Note:** Version bump only for package minimal-blog + +## [1.0.10](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.9...minimal-blog@1.0.10) (2020-04-01) + +**Note:** Version bump only for package minimal-blog + +## [1.0.9](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.8...minimal-blog@1.0.9) (2020-03-31) + +**Note:** Version bump only for package minimal-blog + +## [1.0.8](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.7...minimal-blog@1.0.8) (2020-03-04) + +**Note:** Version bump only for package minimal-blog + +## [1.0.7](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.6...minimal-blog@1.0.7) (2020-03-04) + +**Note:** Version bump only for package minimal-blog + +## [1.0.6](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.5...minimal-blog@1.0.6) (2020-02-29) + +**Note:** Version bump only for package minimal-blog + +## [1.0.5](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.4...minimal-blog@1.0.5) (2020-02-29) + +### Bug Fixes + +- Add table styles to minimal-blog ([6e3d750](https://github.com/LekoArts/gatsby-themes/commit/6e3d750b01d0398fc2dd5b3d043754389a0f46ff)) + +## [1.0.4](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.3...minimal-blog@1.0.4) (2020-02-27) + +**Note:** Version bump only for package minimal-blog + +## [1.0.3](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.2...minimal-blog@1.0.3) (2020-02-27) + +**Note:** Version bump only for package minimal-blog + +## [1.0.2](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.1...minimal-blog@1.0.2) (2020-02-16) + +**Note:** Version bump only for package minimal-blog + +## [1.0.1](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@1.0.0...minimal-blog@1.0.1) (2020-01-23) + +**Note:** Version bump only for package minimal-blog + +# [1.0.0](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.2.1...minimal-blog@1.0.0) (2020-01-23) + +### Features + +- Change config format on minimal-blog theme ([#234](https://github.com/LekoArts/gatsby-themes/issues/234)) ([bdeb670](https://github.com/LekoArts/gatsby-themes/commit/bdeb670797da5faa2d4084c3c128f0e38dbbf582)) + +### BREAKING CHANGES + +- The navigation and externalLinks options are no longer on the siteMetadata but now in the theme options itself. + +## [0.2.1](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.2.0...minimal-blog@0.2.1) (2020-01-17) + +**Note:** Version bump only for package minimal-blog + +# [0.2.0](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.1.8...minimal-blog@0.2.0) (2020-01-07) + +### Features + +- **gatsby-theme-minimal-blog-core:** Custom slug for blog posts via frontmatter ([05cff1e](https://github.com/LekoArts/gatsby-themes/commit/05cff1ec0bcd2ba2fb3b7cfbb8a55f626ab9abd8)), closes [#217](https://github.com/LekoArts/gatsby-themes/issues/217) + +## [0.1.8](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.1.7...minimal-blog@0.1.8) (2020-01-06) + +### Bug Fixes + +- **gatsby-theme-minimal-blog:** Styling fixes ([240571e](https://github.com/LekoArts/gatsby-themes/commit/240571e39a4b12d6b6585c89062579dd2dc03a0f)) + +## [0.1.7](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.1.6...minimal-blog@0.1.7) (2020-01-04) + +**Note:** Version bump only for package minimal-blog + +## [0.1.6](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.1.5...minimal-blog@0.1.6) (2020-01-03) + +**Note:** Version bump only for package minimal-blog + +## [0.1.5](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.1.4...minimal-blog@0.1.5) (2019-12-31) + +**Note:** Version bump only for package minimal-blog + +## [0.1.4](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.1.3...minimal-blog@0.1.4) (2019-12-03) + +**Note:** Version bump only for package minimal-blog + +## [0.1.3](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.1.2...minimal-blog@0.1.3) (2019-12-01) + +**Note:** Version bump only for package minimal-blog + +## [0.1.2](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.1.1...minimal-blog@0.1.2) (2019-11-27) + +**Note:** Version bump only for package minimal-blog + +## [0.1.1](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.1.0...minimal-blog@0.1.1) (2019-11-26) + +**Note:** Version bump only for package minimal-blog + +# [0.1.0](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.0.4...minimal-blog@0.1.0) (2019-11-25) + +### Features + +- **gatsby-theme-minimal-blog:** Lazy load code component ([#167](https://github.com/LekoArts/gatsby-themes/issues/167)) ([fbfedee](https://github.com/LekoArts/gatsby-themes/commit/fbfedee5988636d2e4a3a2ea817e8bdf8628d4f5)), closes [#161](https://github.com/LekoArts/gatsby-themes/issues/161) [#163](https://github.com/LekoArts/gatsby-themes/issues/163) [#164](https://github.com/LekoArts/gatsby-themes/issues/164) [#165](https://github.com/LekoArts/gatsby-themes/issues/165) [#166](https://github.com/LekoArts/gatsby-themes/issues/166) + +## [0.0.4](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.0.3...minimal-blog@0.0.4) (2019-11-16) + +**Note:** Version bump only for package minimal-blog + +## [0.0.3](https://github.com/LekoArts/gatsby-themes/compare/minimal-blog@0.0.2...minimal-blog@0.0.3) (2019-11-16) + +**Note:** Version bump only for package minimal-blog + +## 0.0.2 (2019-11-16) + +### Features + +- Add gatsby-theme-minimal-blog ([#151](https://github.com/LekoArts/gatsby-themes/issues/151)) ([344a52c](https://github.com/LekoArts/gatsby-themes/commit/344a52c)) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7f8f482 --- /dev/null +++ b/LICENSE @@ -0,0 +1,14 @@ +The BSD Zero Clause License (0BSD) + +Copyright (c) 2020 LekoArts + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100755 index 0000000..e9a09d2 --- /dev/null +++ b/README.md @@ -0,0 +1,286 @@ +

+ + LekoArts + +

+

+ Gatsby Starter: Minimal Blog +

+ +

+ + Minimal Blog is released under the 0BSD license. + + + GitHub Sponsors + + + Website + + + Follow @lekoarts_de + +

+ +Typography driven, feature-rich blogging theme with minimal aesthetics. Includes tags/categories support and extensive features for code blocks such as live preview, line numbers, and line highlighting. Using the Gatsby Theme [`@lekoarts/gatsby-theme-minimal-blog`](https://github.com/LekoArts/gatsby-themes/tree/main/themes/gatsby-theme-minimal-blog). + +[**Demo Website**](https://minimal-blog.lekoarts.de) + +Also be sure to check out other [Free & Open Source Gatsby Themes](https://themes.lekoarts.de) and my [Personal Website](https://www.lekoarts.de?utm_source=minimal-blog&utm_medium=Starter). + +## ✨ Features + +- MDX +- Fully customizable through the usage of Gatsby Themes (and Theme UI) +- Light Mode / Dark Mode +- Typography driven, minimal style +- Tags/Categories support +- Code highlighting with [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) and [react-live](https://github.com/FormidableLabs/react-live) support. Also allows adding line numbers, line highlighting, language tabs, and file titles. +- RSS Feed for blog posts +- SEO (Sitemap, OpenGraph tags, Twitter tags) +- WebApp Manifest + +## 🚀 Getting Started + +[Deploy to Gatsby Cloud](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/LekoArts/gatsby-starter-minimal-blog) + +### 1. **Create a Gatsby site.** + +Use `git` to clone the site and navigate into it: + +```sh +git clone https://github.com/LekoArts/gatsby-starter-minimal-blog project-name +cd project-name +``` + +### 2. **Install dependencies.** + +If you use npm 7 or above use the `--legacy-peer-deps` flag. If you use npm 6 you can use `npm install`. + +```sh +npm install --legacy-peer-deps +``` + +### 3. **Open the code and start customizing!** + +Start the site by running `npm run develop`. + +Your site is now running at `http://localhost:8000`! + +If you want to learn more about how you can use a Gatsby starter that is configured with a Gatsby theme, you can check out this [shorter](https://www.gatsbyjs.com/docs/how-to/plugins-and-themes/using-a-gatsby-theme/) or [longer](https://www.gatsbyjs.com/tutorial/using-a-theme/) tutorial. The tutorials don't exactly apply to this starter however the concepts are the same. + +## 📝 Using and modifying this starter + +**Important Note:** Please read the guide [Shadowing in Gatsby Themes](https://www.gatsbyjs.com/docs/how-to/plugins-and-themes/shadowing/) to understand how to customize the underlying theme! + +This starter creates a new Gatsby site that installs and configures the theme [`@lekoarts/gatsby-theme-minimal-blog`](https://github.com/LekoArts/gatsby-themes/tree/main/themes/gatsby-theme-minimal-blog). + +Have a look at the theme's README and files to see what options are available and how you can shadow the various components including Theme UI. Generally speaking you will want to place your files into `src/@lekoarts/gatsby-theme-minimal-blog/` to shadow/override files. The Theme UI config can be configured by shadowing its files in `src/gatsby-plugin-theme-ui/`. + +### Code Highlighting + +Since the underlying theme ships with [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) and [react-live](https://github.com/FormidableLabs/react-live) certain additional features were added to code blocks. You can find an overview / usage example in the [example repository](https://github.com/LekoArts/gatsby-themes/tree/main/examples/minimal-blog/content/posts/fantastic-beasts-and-where-to-find-them/index.mdx)! If you want to change certain code styles or add additional language tabs, you need to shadow the file `src/@lekoarts/gatsby-theme-minimal-blog/styles/code.js`. + +**Language tabs:** + +When you add a language (such as e.g. `js` or `javascript`) to the code block, a little tab will appear at the top left corner. + +```` +```js +// code goes here +``` +```` + +**Code titles:** + +You can display a title (e.g. the file path) above the code block. + +```` +```jsx:title=your-title +// code goes here +``` +```` + +Or without a specific language: + +```` +```:title=your-title +// code goes here +``` +```` + +**Line highlighting:** + +You can highlight single or multiple (or both) lines in a code block. You need to add a language. + +```` +```js {2,4-5} +const test = 3 +const foo = 'bar' +const harry = 'potter' +const hermione = 'granger' +const ron = 'weasley' +``` +```` + +**Hide line numbers:** + +If you want to hide line numbers you can either globally disable them (see Theme options) or on a block-by-block basis. You can also combine that with the other attributes. + +```` +```noLineNumbers +// code goes here +``` +```` + +**react-live:** + +Add `react-live` to the code block (and render the component) to see a preview below it. + +```` +```js react-live +const onClick = () => { + alert("You opened me"); +}; +render(); +``` +```` + +### Adding content + +#### Adding a new blog post + +New blog posts will be shown on the index page (the three most recent ones) of this theme and on the blog overview page. They can be added by creating MDX files inside `content/posts`. General setup: + +1. Create a new folder inside `content/posts` +1. Create a new `index.mdx` file, and add the frontmatter +1. Add images to the created folder (from step 1) you want to reference in your blog post +1. Reference an image as your `banner` in the frontmatter +1. Write your content below the frontmatter +1. Add a `slug` to the frontmatter to use a custom slug, e.g. `slug: "/my-slug"` (Optional) +1. Use `defer` to opt-in into Deferred Static Generation (DSG) (optional) + +**Frontmatter reference:** + +```md +--- +title: Introduction to "Defence against the Dark Arts" +date: 2019-11-07 +description: Defence Against the Dark Arts (abbreviated as DADA) is a subject taught at Hogwarts School of Witchcraft and Wizardry and Ilvermorny School of Witchcraft and Wizardry. +defer: false +tags: + - Tutorial + - Dark Arts +banner: ./defence-against-the-dark-arts.jpg +canonicalUrl: https://random-blog-about-curses.com/curses-counter-curses-and-more +--- +``` + +**The fields `description`, `banner`, `defer` and `canonicalUrl` are optional!** If no description is provided, an excerpt of the blog post will be used. If no banner is provided, the default `siteImage` (from `siteMetadata`) is used. If no `canonicalUrl` is provided, it will not be included in the header. + +The `date` field has to be written in the format `YYYY-MM-DD`! + +#### Adding a new page + +Additional pages can be created by placing MDX files inside `contents/pages`, e.g. an "About" or "Contact" page. You'll manually need to link to those pages, for example by adding them to the navigation (in `siteMetadata`). General instructions: + +1. Create a new folder inside `content/pages` +1. Create a new `index.mdx` file, and add the frontmatter +1. Write your content below the frontmatter +1. Optionally add files/images to the folder you want to reference from the page +1. Use `defer` to opt-in into Deferred Static Generation (DSG) (optional) + +**Frontmatter reference:** + +```md +--- +title: About +slug: "/about" +defer: false +--- +``` + +### Changing the "Hero" text + +To edit the hero text ("Hi, I'm Lupin...), create a file at `src/@lekoarts/gatsby-theme-minimal-blog/texts/hero.mdx` to edit the text. + +### Changing the "Projects" part + +To edit the projects part below "Latest posts", create a file at `src/@lekoarts/gatsby-theme-minimal-blog/texts/bottom.mdx` to edit the contents. + +### Extending the footer of the post + +Inside the [`` component](https://github.com/LekoArts/gatsby-themes/blob/main/themes/gatsby-theme-minimal-blog/src/components/post.tsx) there's also a `` component that you can shadow to display elements between the end of the post and the global footer. By default it returns `null`. Create a file at `src/@lekoarts/gatsby-theme-minimal-blog/components/post-footer.jsx` to edit this section. The `` component receives the complete `post` prop that `` also receives. + +### Changing your fonts + +By default, the underlying theme and thus this starter uses "IBM Plex Sans" as its font. It's used throughout the site and set as a `font-family` on the `html` element. + +If you want to change your default font or add any additional fonts, you'll need to change two things: + +1. The configuration for `gatsby-omni-font-loader` => Responsible for loading the font CSS files +1. The Theme UI config and its `fonts` key (see [Theme UI Typography Docs](https://theme-ui.com/theming#typography)) => Responsible for setting the `font-family` in the example + +After adjusting the configuration for `gatsby-omni-font-loader` you'll need to shadow the theme's Theme UI config and overwrite the `fonts` key. For the sake of this explanation it's assumed that you replaced "IBM Plex Sans" with "Roboto Mono". + +Create a file at `src/gatsby-plugin-theme-ui/index.js` with the following contents: + +```js +import { merge } from "theme-ui"; +import originalTheme from "@lekoarts/gatsby-theme-minimal-blog/src/gatsby-plugin-theme-ui/index"; + +const theme = merge(originalTheme, { + fonts: { + body: `"Roboto Mono", monospace`, + }, +}); + +export default theme; +``` + +As defined in the [Theme Specification](https://theme-ui.com/theme-spec#typography) `body` is the default body font family. + +**Another example:** You didn't replace "IBM Plex Sans" but added "Roboto Mono" additionally since you want to use it for your headings. + +Then you'd not overwrite `body` but add a `heading` key: + +```js +import { merge } from "theme-ui"; +import originalTheme from "@lekoarts/gatsby-theme-minimal-blog/src/gatsby-plugin-theme-ui/index"; + +const theme = merge(originalTheme, { + fonts: { + heading: `"Roboto Mono", monospace`, + }, +}); + +export default theme; +``` + +### Change your `static` folder + +The `static` folder contains the icons, social media images and `robots.txt`. Don't forget to change these files, too! You can use [Real Favicon Generator](https://realfavicongenerator.net/) to generate the image files inside `static`. + +## 🤔 Questions or problems? + +If you have general questions or need help with Gatsby, please go to one of the [support platforms](https://www.gatsbyjs.com/contributing/community/#where-to-get-support) mentioned in Gatsby's documentation. If you have a specific question about this project, you can head to the [GitHub Discussions](https://github.com/LekoArts/gatsby-themes/discussions) of the repository. + +## 🎓 Learning Gatsby + +Looking for more guidance? Full documentation for Gatsby lives [on Gatsby's website](https://www.gatsbyjs.com/). + +### Themes + +To learn more about Gatsby themes specifically, I recommend checking out the [theme docs](https://www.gatsbyjs.com/docs/themes/). + +### General + +- **For most developers, I recommend starting with the [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.com/docs/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 Gatsby's documentation](https://www.gatsbyjs.com/docs/).** In particular, check out the _How-to Guides_ and _Reference_ items in the primary navigation. + +## 🌟 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) or [GitHub Sponsor](https://github.com/sponsors/LekoArts)! diff --git a/content/pages/about/index.mdx b/content/pages/about/index.mdx new file mode 100644 index 0000000..a9efd33 --- /dev/null +++ b/content/pages/about/index.mdx @@ -0,0 +1,8 @@ +--- +title: About +slug: "/about" +--- + +Hi! + +I'm LekoArts, a designer turned software engineer passionate about open source & teaching. Learn more about Gatsby & React on [my website](https://www.lekoarts.de?utm_source=minimal-blog&utm_medium=Starter). diff --git a/content/posts/curses-and-counter-courses/index.mdx b/content/posts/curses-and-counter-courses/index.mdx new file mode 100644 index 0000000..a2f09f1 --- /dev/null +++ b/content/posts/curses-and-counter-courses/index.mdx @@ -0,0 +1,12 @@ +--- +title: "Curses and Counter-curses (Bewitch Your Friends and Befuddle Your Enemies with the Latest Revenges: Hair Loss, Jelly-Legs, Tongue-Tying, and Much, Much More)" +date: 2019-10-25 +slug: "/curses-counter-curses-and-more" +canonicalUrl: "https://random-blog-about-curses.com" +--- + +Thestral dirigible plums, Viktor Krum hexed memory charm Animagus Invisibility Cloak three-headed Dog. Half-Blood Prince Invisibility Cloak cauldron cakes, hiya Harry! Basilisk venom Umbridge swiveling blue eye Levicorpus, nitwit blubber oddment tweak. Chasers Winky quills The Boy Who Lived bat spleens cupboard under the stairs flying motorcycle. Sirius Black Holyhead Harpies, you’ve got dirt on your nose. Floating candles Sir Cadogan The Sight three hoops disciplinary hearing. Grindlewald pig’s tail Sorcerer's Stone biting teacup. Side-along dragon-scale suits Filch 20 points, Mr. Potter. + +> Mobilicorpus reducto liberacorpus crucio. Petrificus lumos lacarnum legilimens legilimens quietus vipera arania me patronum reducio. Episkey reducio quietus mobilicorpus fidelius aparecium. Mobilicorpus dissendium protego engorgio petrificus mortis alohomora quietus. + +Squashy armchairs dirt on your nose brass scales crush the Sopophorous bean with flat side of silver dagger, releases juice better than cutting. Full moon Whomping Willow three turns should do it lemon drops. Locomotor trunks owl treats that will be 50 points, Mr. Potter. Witch Weekly, he will rise again and he will come for us, headmaster Erumpent horn. Fenrir Grayback horseless carriages ‘zis is a chance many would die for! diff --git a/content/posts/fantastic-beasts-and-where-to-find-them/SpotifyPlayer.js b/content/posts/fantastic-beasts-and-where-to-find-them/SpotifyPlayer.js new file mode 100755 index 0000000..c6a0c93 --- /dev/null +++ b/content/posts/fantastic-beasts-and-where-to-find-them/SpotifyPlayer.js @@ -0,0 +1,39 @@ +/* eslint react/no-unknown-property: 0 */ +/* eslint react/prefer-stateless-function: 0 */ + +/** + * Spotify player iframe widget + * + * @author Alexander Wallin + * @see https://developer.spotify.com/technologies/widgets/spotify-play-button/ + */ + +import * as React from "react" + +// Size presets, defined by Spotify +const sizePresets = { + large: { + width: 300, + height: 380, + }, + compact: { + width: 300, + height: 80, + }, +} + +function SpotifyPlayer({ uri, view, theme, size }) { + return ( +