• Stars
    star
    133
  • Rank 272,600 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A minimalist Gatsby Theme for documentation sites built with MDX and Theme UI

gatsby-theme-documentation

A minimalist Gatsby Theme for documentation sites built with MDX and Theme UI.

Get up and running in seconds with a beautiful docs site so you can do what's more important: write docs.

image

Features

Installation

yarn add gatsby-theme-documentation

Install as a starter

Name Command
Base gatsby new johno/gatsby-starter-documentation
Dark gatsby new johno/gatsby-starter-documentation-dark
Tomato gatsby new johno/gatsby-starter-documentation-tomato

Read the full setup guide

Usage

// gatsby-config.js
module.exports = {
  plugins: [
    'gatsby-theme-documentation'
  ]
}

Customizing the sidebar

gatsby-theme-documentation uses a sidebar.mdx file to populate the navigation. In order to customize it you can shadow it by creating a file at src/gatsby-theme-documentation/sidebar.mdx.

Example sidebar.mdx

- [Introduction](/introduction/)
- [Getting Started](/getting-started/)
- [GitHub](https://github.com/johno/gatsby-theme-documentation)

Customizing the header

Similarly to sidebar customization, you can also change the header content by writing MDX. You can shadow the default header by creating a file at src/gatsby-theme-documentation/header.mdx

Example header.mdx

# ![Docs Logo](https://contrast.now.sh/white/black?width=80&height=40&text=DOCS)

- [GitHub](https://github.com/johno/gatsby-theme-documentation)
- [Twitter](https://twitter.com/4lpine)

Adding component shortcodes

You can add shortcodes to your docs site which can be used throughout your docs pages by extending the components passed to MDXProvider. You can do this by using component shadowing and creating the following file in the root of your project: src/gatsby-theme-documentation/components.js.

Example components.js

import baseComponents from 'gatsby-theme-documentation/src/components'

import MyCustomH1 from '../components/my-custom-h1'

export default {
  ...baseComponents,
  h1: MyCustomH1
}

Readme routing

In order to get documents rendered in directories on GitHub, it's common to specify a readme.md similarly to the index.html on normal websites. Since this theme is meant to work seamlessly with docs directories on GitHub, file/path/readme.md will be automatically turned into /file/path/index.html in the built site. Links will also be redirected to support the new url scheme.

Docs schema

This theme creates a Docs type which can be queried as an individual document or a collection. This data can be used to create additional pages, create summaries, etc.

Query an individual document

{
  docs(slug: {eq: "/some-page"}) {
    slug
    body
  }
}

Query a collection

{
  allDocs {
    slug
  }
}

More Repositories

1

pixyll

A simple, beautiful Jekyll theme that's mobile first
SCSS
2,037
star
2

furtive

A forward-thinking, lightweight, css microframework
HTML
609
star
3

immutable-css

A css linter for immutable selectors
JavaScript
376
star
4

digital-garden

🌻[WIP] Gatsby Theme to build your own digital garden 🌻🥀🌸
JavaScript
216
star
5

get-contrast

Get the contrast ratio and WCAG score between two colors in order to ensure accessibility
JavaScript
80
star
6

actions-push-subdirectories

Push subdirectories in a monorepo to separate, read-only repositories
Shell
61
star
7

deleted

A slightly different user experience for hard deletes.
JavaScript
58
star
8

random-a11y-combo

Get a random accessible color combination
JavaScript
50
star
9

ember-cli-gravatar

An Ember component for gravatar image tags
JavaScript
45
star
10

domain-regex

A regular expression for most valid domains (including the latest TLDs)
JavaScript
39
star
11

normalize-email

Normalize + and . emails -- [email protected] => [email protected]
JavaScript
36
star
12

ember-faker

Ember addon for including fake data in your app for testing or prototyping.
JavaScript
35
star
13

css-properties

List of all CSS properties
JavaScript
30
star
14

ember-remarkable

Ember addon for Remarkable markdown parsing helpers and components.
JavaScript
26
star
15

ruby_optimization_techniques

An Analysis of Ruby Optimization Techniques
CSS
23
star
16

scrutinize

Scrutinize a url by analyzing css, html, a11y, images, pagespeed, etc.
JavaScript
23
star
17

gatsby-theme-glossary

A minimalist Gatsby Theme for a glossary built with MDX and Theme UI
JavaScript
22
star
18

ember-linkify

Linkify urls in an Ember app with a fancy helper
JavaScript
22
star
19

gh-pinned-repos

Get the pinned repos for a github username
JavaScript
20
star
20

generator-p

A minimal yeoman generator for npm packages.
JavaScript
19
star
21

random-a11y-api

API for random-a11y
Ruby
19
star
22

rework-flex-grid

Rework CSS plugin for generating custom, lightweight flex grids.
JavaScript
19
star
23

postcss-remove-prefixes

Remove CSS vendor prefixes from your source.
JavaScript
19
star
24

gatsby-themes

[WIP] A collection of Gatsby themes
JavaScript
17
star
25

ember-cli-dates

Ember date helpers with locale support.
JavaScript
17
star
26

do-not-disturb

Turn on do not disturb mode for OS X
JavaScript
15
star
27

postcss-shorthand-expand

Remove shorthand properties in your CSS
JavaScript
14
star
28

ember-cli-loading

An Ember addon for SVG loading components.
Handlebars
14
star
29

ember-cli-material-design-icons

Components for Google's Material Design Icons library
JavaScript
13
star
30

clrs

A nicer color palette for Rails apps.
CSS
13
star
31

basscss-rails

Include BASSCSS in your Rails apps.
CSS
11
star
32

hypertosh

[WIP] HyperTerm theme with a nostalgic flair
JavaScript
11
star
33

gray

A grayscale color palette for prototyping the web.
CSS
11
star
34

nt

The minimal note taking script
Shell
11
star
35

egghead-lessons

HTML
10
star
36

mqify

Turn a css string and media query config into classes for each breakpoint
JavaScript
10
star
37

gulp-remarkable

A gulp wrapper for the remarkable markdown parser (CommonMark spec).
JavaScript
10
star
38

archivable

Archive your Rails models rather than delete them
Ruby
9
star
39

pundit

[WIP] Minimal authorization through a plain old JavaScript object
TypeScript
9
star
40

style-hooks

[WIP] Experimenting with pure JS styles using React Hooks
JavaScript
9
star
41

gatsby-theme-austere

A minimal blog theme built for those wanting to focus on their writing
JavaScript
9
star
42

ember-mailcheck

Suggest a domain when your users misspell it in an email address with mailcheck.js.
JavaScript
9
star
43

ruled

App to create debug grids using css and background properties
JavaScript
8
star
44

web-cannon

Useful information to reference while building websites for humans
8
star
45

fc

[WIP] A pleasurable snow tracking experience
JavaScript
8
star
46

ember-cli-pure

An Ember addon for including Pure CSS.
JavaScript
8
star
47

humanize-list

Comma delimit an array for human readability. The Oxford comma is optional.
JavaScript
8
star
48

shtml

[WIP] Style shell output in an html-like fashion
JavaScript
7
star
49

postcss-get-variables

PostCSS plugin to get an object containing CSS variables and their values.
JavaScript
7
star
50

coinr

Get latest ticker information for popular cryptocurrencies
JavaScript
7
star
51

gulp-css-scss

Gulp plugin for converting CSS to Scss.
JavaScript
7
star
52

urls_for_humans

Apply persistent, meaningful urls to your Rails app.
Ruby
7
star
53

random-hex-color

Generate a random hex color
JavaScript
7
star
54

jekyllsupply

A collection of the highest quality, open source Jekyll themes.
CSS
7
star
55

is-blank

Check whether a value is empty or blank, includes string whitespace support.
JavaScript
7
star
56

turn-it-off-and-on-again

A CLI tool to turn bower/npm off and on again.
Shell
6
star
57

johnotander.github.io

Where johnotander.com lives
6
star
58

draper_example

An example that uses the Draper gem for Rails Decorators.
Ruby
6
star
59

ember-flex-grid

Ember components for a responsive, mobile-first grid system based on flex.
JavaScript
6
star
60

get-classes-from-html

Get an array of classes from HTML
JavaScript
6
star
61

night-shift

Toggle OS X Night Shift
JavaScript
5
star
62

gulp-class-prefix

Add a class prefix to further sandbox CSS styling for third-party imports.
JavaScript
5
star
63

is-minified

Check whether a CSS or JS string is minified.
JavaScript
5
star
64

papyrus

[WIP] A minimalist browser built for readability
JavaScript
5
star
65

get-inline-styles

Get inlined CSS from an HTML string.
JavaScript
5
star
66

immutable-css-cli

CSS linter for immutable selectors.
JavaScript
5
star
67

css-variable

A CSS variable transformer, supports Less, Sass, stylus and custom properties
JavaScript
5
star
68

get-query-param

Get a particular query param from a url
JavaScript
4
star
69

browser.css

An awesome CSS and HTML browser window for debuting apps.
CSS
4
star
70

dot-com-jokes

Considerations from @dougwig and @nickbender
JavaScript
4
star
71

prettify-html

[WIP] Prettify your html
JavaScript
4
star
72

styled-api

[WIP] Constraint based styling api based on styled-system
JavaScript
4
star
73

movaxfc.com

[WIP] JAMStack website for Movax FC using Gatsby, Theme UI, and Airtable
JavaScript
4
star
74

is-present

Check whether a value is present (nonblank).
JavaScript
4
star
75

pseudo-elements

List of all CSS pseudo-elements.
JavaScript
4
star
76

chalk-rainbow

Get a colorful rainbow string using chalk
JavaScript
4
star
77

whois-cli

Node CLI to get WHOIS data for a given url
JavaScript
4
star
78

gatsby-starter-documentation-tomato

A minimalist starter for gatsby-theme-documentation
JavaScript
4
star
79

get-readme

Retrieve the readme contents from a directory
JavaScript
4
star
80

atom-underline-trailing-whitespace

An Atom package for providing a visual cue for trailing whitespace with a subtle underline.
CSS
4
star
81

emojiweather

Get the closest emoji representation of the weather
JavaScript
4
star
82

postcss-select

Filter CSS based on a given list of selectors
JavaScript
4
star
83

is-mac

Check whether a string is a valid MAC address.
JavaScript
3
star
84

css-color-list

Get a list of all named CSS colors.
JavaScript
3
star
85

dom-stats

Parse and return statistics for an html string
JavaScript
3
star
86

pseudo-classes

Get a list of all CSS pseudo-classes
JavaScript
3
star
87

gatsby-theme-example-component-extending

Gatsby Themes example using component extension via shadowing
JavaScript
3
star
88

email_format

Validates the email format with the email_regex gem.
Ruby
3
star
89

postcss-class-repeat

Repeat class selectors to increase specificity
JavaScript
3
star
90

gatsby-starter-digital-garden-dark

A Gatsby starter for your own dark-mode digital garden
JavaScript
3
star
91

normalize_url

Elixir package to normalize urls
Elixir
3
star
92

ember-cli-rework

Use Rework CSS postprocessing in your Ember app.
JavaScript
3
star
93

dotfiles

Dotfiles, ftw
Shell
3
star
94

updatr

[UNMAINTAINED] A script for updating all the things: node, npm, brew, rvm, jekyll, etc.
JavaScript
3
star
95

get-css-urls

Get CSS urls from a string.
JavaScript
3
star
96

tosh

[WIP] Build out your React UI with a nostalgic flair
JavaScript
3
star
97

rails_pg_restore

CLI to restore a Rails PostgresQL database from a backup. Infers db config from config/database.yml.
Ruby
3
star
98

actions-yarn

GitHub Actions for yarn with support for lerna
Dockerfile
3
star
99

svg-spin

Experiments with svg spinning
JavaScript
3
star
100

gatsby-starter-tosh

A blog starter for the Tosh Gatsby Theme
JavaScript
3
star