{"id":25269921,"url":"https://github.com/javascript-pro/gatsby-gitbook-starter","last_synced_at":"2025-09-02T01:33:24.740Z","repository":{"id":89534090,"uuid":"563784208","full_name":"javascript-pro/gatsby-gitbook-starter","owner":"javascript-pro","description":"Generate GitBook style modern docs/tutorial websites using Gatsby + MDX","archived":false,"fork":false,"pushed_at":"2022-11-09T10:28:52.000Z","size":484,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-12T11:56:35.457Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javascript-pro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-09T10:28:45.000Z","updated_at":"2022-11-09T10:28:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"289be7c3-0d01-4eec-820e-f2c7c344725e","html_url":"https://github.com/javascript-pro/gatsby-gitbook-starter","commit_stats":null,"previous_names":["javascript-pro/gatsby-gitbook-starter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/javascript-pro/gatsby-gitbook-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-pro%2Fgatsby-gitbook-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-pro%2Fgatsby-gitbook-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-pro%2Fgatsby-gitbook-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-pro%2Fgatsby-gitbook-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javascript-pro","download_url":"https://codeload.github.com/javascript-pro/gatsby-gitbook-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-pro%2Fgatsby-gitbook-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273218428,"owners_count":25065913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-12T11:28:00.631Z","updated_at":"2025-09-02T01:33:24.711Z","avatar_url":"https://github.com/javascript-pro.png","language":"JavaScript","readme":"# gatsby-gitbook-starter\n\nKick off your project with this starter to create a powerful/flexible docs/tutorial web apps.\n\n![gatsby-gitbook-starter](https://graphql-engine-cdn.hasura.io/learn-hasura/gatsby-gitbook-starter/assets/documentation_app_blog.png)\n\n## Motivation\n\nWe wanted to create a [GraphQL tutorial](https://learn.hasura.io) 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.\n\nWe also wanted to serve these tutorials in sub paths of [learn.hasura.io](https://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](https://www.gitbook.com) and deployed as docker containers.\n\n## 🔥 Features\n- Write using Markdown / [MDX](https://github.com/mdx-js/mdx)\n- GitBook style theme\n- Syntax Highlighting using Prism [`Bonus`: Code diff highlighting]\n- Search Integration with Algolia\n- Progressive Web App, Works Offline\n- Google Analytics Integration\n- Automatically generated sidebar navigation, table of contents, previous/next\n- Dark Mode toggle\n- Edit on Github\n- Fully customisable\n- Rich embeds and live code editor using MDX\n- Easy deployment: Deploy on Netlify / Now.sh / Docker\n\n## 🔗 Live Demo\n\nHere's a [live demo](https://learn.hasura.io/graphql/react)\n\n## 🚀 Quickstart\n\nGet started by running the following commands:\n\n```\n$ git clone git@github.com:hasura/gatsby-gitbook-starter.git\n$ cd gatsby-gitbook-starter\n$ npm install\n$ npm start\n```\n\nVisit `http://localhost:8000/` to view the app.\n\n## 🔧 Configure\n\nWrite markdown files in `content` folder.\n\nOpen `config.js` for templating variables. Broadly configuration is available for `gatsby`, `header`, `sidebar` and `siteMetadata`.\n\n- `gatsby` config for global configuration like \n    - `pathPrefix` - Gatsby Path Prefix\n    - `siteUrl` - Gatsby Site URL\n    - `gaTrackingId` - Google Analytics Tracking ID\n\n- `header` config for site header configuration like\n    - `title` - The title that appears on the top left\n    - `githubUrl` - The Github URL for the docs website\n    - `helpUrl` - Help URL for pointing to resources\n    - `tweetText` - Tweet text\n    - `links` - Links on the top right\n    - `search` - Enable search and [configure Algolia](https://www.gatsbyjs.org/docs/adding-search-with-algolia/)\n\n- `sidebar` config for navigation links configuration\n    - `forcedNavOrder` for left sidebar navigation order. It should be in the format \"/\\\u003cfilename\u003e\"\n    - `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)\n    - `links` - Links on the bottom left of the sidebar\n    - `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.\n\n- `siteMetadata` config for website related configuration\n    - `title` - Title of the website\n    - `description` - Description of the website\n    - `ogImage` - Social Media share og:image tag\n    - `docsLocation` - The Github URL for Edit on Github\n\n- 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.\n\n### Algolia Configuration\n\nTo setup Algolia, go to `config.js` and update the `search` object to look like the one below:\n\n```...,\n\t\"search\": {\n\t\t\"enabled\": true,\n\t\t\"indexName\": \"MY_INDEX_NAME\",\n\t\t\"algoliaAppId\": process.env.GATSBY_ALGOLIA_APP_ID,\n\t\t\"algoliaSearchKey\": process.env.GATSBY_ALGOLIA_SEARCH_KEY,\n\t\t\"algoliaAdminKey\": process.env.ALGOLIA_ADMIN_KEY\n\t},\n```\n\nValues 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.\n\n### Progressive Web App, Offline\n\nTo enable PWA, go to `config.js` and update the `pwa` object to look like the one below:\n\n```\n   \"pwa\": {\n        \"enabled\": false, // disabling this will also remove the existing service worker.\n        \"manifest\": {\n            \"name\": \"Gatsby Gitbook Starter\",\n            \"short_name\": \"GitbookStarter\",\n            \"start_url\": \"/\",\n            \"background_color\": \"#6b37bf\",\n            \"theme_color\": \"#6b37bf\",\n            \"display\": \"standalone\",\n            \"crossOrigin\": \"use-credentials\",\n            icons: [\n                {\n                    src: \"src/pwa-512.png\",\n                    sizes: `512x512`,\n                    type: `image/png`,\n                },\n            ],\n        },\n    }\n```\n\n## Live Code Editor\n\nTo render react components for live editing, add the `react-live=true` to the code section. For example:\n\n```javascript react-live=true\n\u003cbutton\u003eEdit my text\u003c/button\u003e\n```\n\nIn the above code, just add `javascript react-live=true` after the triple quote ``` to start rendering react components that can be edited by users.\n\n## 🤖 SEO friendly\n\nThis 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\n\n```markdown\n---\ntitle: \"Title of the page\"\nmetaTitle: \"Meta Title Tag for this page\"\nmetaDescription: \"Meta Description Tag for this page\"\n---\n```\n\nCanonical URLs are generated automatically.\n\n## ☁️ Deploy\n\n[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/hasura/gatsby-gitbook-starter)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavascript-pro%2Fgatsby-gitbook-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavascript-pro%2Fgatsby-gitbook-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavascript-pro%2Fgatsby-gitbook-starter/lists"}