Skip to content

Commit

Permalink
docs readme update
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Faraggi <felipefaraggi@gmail.com>
  • Loading branch information
faraggi committed Dec 3, 2020
1 parent c275dcc commit 1187c8b
Showing 1 changed file with 22 additions and 119 deletions.
141 changes: 22 additions & 119 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
# Mantis Docs

![gatsby-gitbook-starter](https://graphql-engine-cdn.hasura.io/learn-hasura/gatsby-gitbook-starter/assets/documentation_app_blog.png)

## Credit
Welcome to the Mantis Documentation repository.

Hats off to [Hasura](https://learn.hasura.io) for creating a nice easy to work with docs gatsby starter! 👍
Community members are welcome to add any commits, PRs or new Issues.

### Customisation
We have taken this starter and customised things to fit in with our content requirements.
- FullWidth Landing Pages
- Parent Headings for SideNav items

## 🔥 Features
- Write using Markdown / [MDX](https://github.com/mdx-js/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
![gatsby-gitbook-starter](https://graphql-engine-cdn.hasura.io/learn-hasura/gatsby-gitbook-starter/assets/documentation_app_blog.png)

## 🔗 Live Demo
## Credit

Here's a [live demo](https://docs-starter-gatsby-mdx-github.netlify.app/)
Hats off to [Hasura](https://learn.hasura.io) for creating a nice easy to work with docs gatsby starter! 👍

## 🚀 Quickstart
## Quickstart

Get started by running the following commands:
Get started wiuth Mantis docs, by building and running them with the following commands:

```
$ git clone git@github.com:hasura/gatsby-gitbook-starter.git
Expand All @@ -42,106 +24,27 @@ $ 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](https://www.gatsbyjs.org/docs/adding-search-with-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
## Gastby Starter

To setup Algolia, go to `config.js` and update the `search` object to look like the one below:
For editing, formatting and new content, learn more about [Gastby Starter](https://www.gatsbyjs.com/docs/)

```...,
"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`,
},
],
},
}
```
## Feedback & Community

## Live Code Editor
Any and all feedback on all Mantis projects (Mantis Client, Mantis Wallet, Mantis Docs, Mantis Website) is welcome.
There are several channels you can use in order to leave us this feedback:

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

```javascript react-live=true
<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

```markdown
---
title: "Title of the page"
metaTitle: "Meta Title Tag for this page"
metaDescription: "Meta Description Tag for this page"
---
```
[Follow us on twitter](https://twitter.com/Mantis_IO) for the latest news.

Canonical URLs are generated automatically.
## Chat, forum & support

## ☁️ Deploy
* [Discord](https://discord.gg/7vUyWrN33p)
* [Mantis Reddit](https://www.reddit.com/r/mantisclient/)
* [Mantis Dev Calls](https://www.youtube.com/c/IohkIo/search?query=mantis)- Watch for latest dev updates
* [ECIP Github](https://github.com/ethereumclassic/ECIPs) & [ECIPs listing](https://ecips.ethereumclassic.org/)- comment on our ECIPs for technical feedback)

[![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)
## Repository Issues Page

* [Mantis Issues](https://github.com/input-output-hk/mantis/issues)
* [Wallet Issues](https://github.com/input-output-hk/mantis-wallet/issues)
* [Docs Issues](https://github.com/input-output-hk/mantis-docs/issues)

0 comments on commit 1187c8b

Please sign in to comment.