All Projects → hasura → Gatsby Gitbook Starter

hasura / Gatsby Gitbook Starter

Licence: mit
Generate GitBook style modern docs/tutorial websites using Gatsby + MDX

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gatsby Gitbook Starter

NextBook
NextBook is quick and easy way to build technical books or documentation with markdown that run blazingly fast.
Stars: ✭ 153 (-78.14%)
Mutual labels:  gitbook, mdx, documentation-generator
Gatsby Plugin Mdx
gatsby v1 mdx plugin, for gatsby v2 see https://github.com/ChristopherBiscardi/gatsby-mdx
Stars: ✭ 50 (-92.86%)
Mutual labels:  gatsby, markdown, mdx
Gatsby Theme Code Notes
A Gatsby theme for publishing code-related notes to your website
Stars: ✭ 370 (-47.14%)
Mutual labels:  gatsby, markdown, mdx
Mdx Deck
♠️ React MDX-based presentation decks
Stars: ✭ 10,487 (+1398.14%)
Mutual labels:  gatsby, markdown, mdx
Code Surfer
Rad code slides <🏄/>
Stars: ✭ 5,477 (+682.43%)
Mutual labels:  markdown, mdx, syntax-highlighting
Docs
Repository of Twilio SendGrid's product documentation.
Stars: ✭ 221 (-68.43%)
Mutual labels:  algolia, gatsby, markdown
Gatsby Starter Portfolio Minimal
A Gatsby Starter to create a clean one-page portfolio with Markdown content.
Stars: ✭ 100 (-85.71%)
Mutual labels:  gatsby, markdown, mdx
BooGi
Generate GitBook-like modern docs/tutorial websites using Gatsby
Stars: ✭ 117 (-83.29%)
Mutual labels:  gitbook, mdx, documentation-generator
Gatsby Digital Garden
🌷 🌻 🌺 Create a digital garden with Gatsby
Stars: ✭ 291 (-58.43%)
Mutual labels:  gatsby, markdown, mdx
Gatsby Starter Bee
🐝Full Package | Simple | Fresh UI | Blog Template :: Let's start to blogging with gatsby-starter-bee!
Stars: ✭ 416 (-40.57%)
Mutual labels:  gatsby, markdown
Docz
✍ It has never been so easy to document your things!
Stars: ✭ 22,020 (+3045.71%)
Mutual labels:  gatsby, mdx
Gatsby Starter Deck
🗣 Create presentations using Gatsby, React & Markdown.
Stars: ✭ 522 (-25.43%)
Mutual labels:  gatsby, markdown
Mdx Docs
📝 Document and develop React components with MDX and Next.js
Stars: ✭ 412 (-41.14%)
Mutual labels:  markdown, mdx
Github Profile Readme Generator
🚀 Generate GitHub profile README easily with the latest add-ons like visitors count, GitHub stats, etc using minimal UI.
Stars: ✭ 7,812 (+1016%)
Mutual labels:  gatsby, markdown
Beibq
基于flask开发类似gitbook的知识管理网站。 http://demo.beibq.cn
Stars: ✭ 480 (-31.43%)
Mutual labels:  markdown, gitbook
Fusuma
✍️Fusuma makes slides with Markdown easily.
Stars: ✭ 5,033 (+619%)
Mutual labels:  markdown, mdx
Remarkable
Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
Stars: ✭ 5,252 (+650.29%)
Mutual labels:  markdown, syntax-highlighting
Mdx Go
⚡️ Lightning fast MDX-based dev server for progressive documentation
Stars: ✭ 340 (-51.43%)
Mutual labels:  markdown, mdx
Gatsby Starter Egghead Blog
This is an example Gatsby blog site that we use as a reference at egghead.
Stars: ✭ 525 (-25%)
Mutual labels:  gatsby, mdx
Ngx Markdown
Angular markdown component/directive/pipe/service to parse static, dynamic or remote content to HTML with syntax highlight
Stars: ✭ 687 (-1.86%)
Mutual labels:  markdown, syntax-highlighting

gatsby-gitbook-starter

Kick off your project with this starter to create a powerful/flexible docs/tutorial web apps.

gatsby-gitbook-starter

Motivation

We wanted to create a GraphQL tutorial series. The content would be written by developers for various languages/frameworks and what better than writing it in Markdown! And since this is a tutorial series we also needed rich embeds, syntax highlighting and more customisations.

We also wanted to serve these tutorials in sub paths of learn.hasura.io. To serve all these requirements, we decided to use Gatsby + MDX (Markdown + JSX) to extend markdown and used a neat consistent theme like the one at GitBook and deployed as docker containers.

🔥 Features

  • Write using Markdown / MDX
  • GitBook style theme
  • Syntax Highlighting using Prism [Bonus: Code diff highlighting]
  • Search Integration with Algolia
  • Progressive Web App, Works Offline
  • Google Analytics Integration
  • Automatically generated sidebar navigation, table of contents, previous/next
  • Dark Mode toggle
  • Edit on Github
  • Fully customisable
  • Rich embeds and live code editor using MDX
  • Easy deployment: Deploy on Netlify / Now.sh / Docker

🔗 Live Demo

Here's a live demo

🚀 Quickstart

Get started by running the following commands:

$ git clone [email protected]:hasura/gatsby-gitbook-starter.git
$ cd gatsby-gitbook-starter
$ npm install
$ npm start

Visit http://localhost:8000/ to view the app.

🔧 Configure

Write markdown files in content folder.

Open config.js for templating variables. Broadly configuration is available for gatsby, header, sidebar and siteMetadata.

  • gatsby config for global configuration like

    • pathPrefix - Gatsby Path Prefix
    • siteUrl - Gatsby Site URL
    • gaTrackingId - Google Analytics Tracking ID
  • header config for site header configuration like

    • title - The title that appears on the top left
    • githubUrl - The Github URL for the docs website
    • helpUrl - Help URL for pointing to resources
    • tweetText - Tweet text
    • links - Links on the top right
    • search - Enable search and configure Algolia
  • sidebar config for navigation links configuration

    • forcedNavOrder for left sidebar navigation order. It should be in the format "/<filename>"
    • frontLine - whether to show a front line at the beginning of a nested menu.(Collapsing capability would be turned of if this option is set to true)
    • links - Links on the bottom left of the sidebar
    • ignoreIndex - Set this to true if the index.md file shouldn't appear on the left sidebar navigation. Typically this can be used for landing pages.
  • siteMetadata config for website related configuration

    • title - Title of the website
    • description - Description of the website
    • ogImage - Social Media share og:image tag
    • docsLocation - The Github URL for Edit on Github
  • For sub nesting in left sidebar, create a folder with the same name as the top level .md filename and the sub navigation is auto-generated. The sub navigation is alphabetically ordered.

Algolia Configuration

To setup Algolia, go to config.js and update the search object to look like the one below:

	"search": {
		"enabled": true,
		"indexName": "MY_INDEX_NAME",
		"algoliaAppId": process.env.GATSBY_ALGOLIA_APP_ID,
		"algoliaSearchKey": process.env.GATSBY_ALGOLIA_SEARCH_KEY,
		"algoliaAdminKey": process.env.ALGOLIA_ADMIN_KEY
	},

Values for Algolia App ID, Search Key, and Admin Key can be obtained from Algolia Dashboard with the right set of permissions. Replace MY_INDEX_NAME with the Algolia Index name of your choice. To build the Algolia index, you need to run npm run build which will do a gatsby build along with content indexing in Algolia.

Progressive Web App, Offline

To enable PWA, go to config.js and update the pwa object to look like the one below:

   "pwa": {
        "enabled": false, // disabling this will also remove the existing service worker.
        "manifest": {
            "name": "Gatsby Gitbook Starter",
            "short_name": "GitbookStarter",
            "start_url": "/",
            "background_color": "#6b37bf",
            "theme_color": "#6b37bf",
            "display": "standalone",
            "crossOrigin": "use-credentials",
            icons: [
                {
                    src: "src/pwa-512.png",
                    sizes: `512x512`,
                    type: `image/png`,
                },
            ],
        },
    }

Live Code Editor

To render react components for live editing, add the react-live=true to the code section. For example:

<button>Edit my text</button>

In the above code, just add javascript react-live=true after the triple quote ``` to start rendering react components that can be edited by users.

🤖 SEO friendly

This is a static site and comes with all the SEO benefits. Configure meta tags like title and description for each markdown file using MDX Frontmatter

---
title: "Title of the page"
metaTitle: "Meta Title Tag for this page"
metaDescription: "Meta Description Tag for this page"
---

Canonical URLs are generated automatically.

☁️ Deploy

Deploy to Netlify

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].