Skip to content
Public page for developers
HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
en
es
static/d
CNAME
README.md
app-04be5d3678660f17bf08.js
app-04be5d3678660f17bf08.js.map
app-0cab38f2c8968c9511c1.js
app-0cab38f2c8968c9511c1.js.map
app-0d79da21234729514d53.js
app-0d79da21234729514d53.js.map
app-16bd998aa041b6da5fbc.js
app-16bd998aa041b6da5fbc.js.map
app-22f1ce8e44ef9b2236c0.js
app-22f1ce8e44ef9b2236c0.js.map
app-258b7ba66ad48b135269.js
app-258b7ba66ad48b135269.js.map
app-2592c5391001769fb1cd.js
app-2592c5391001769fb1cd.js.map
app-3f47a427c7089416aa02.js
app-3f47a427c7089416aa02.js.map
app-3f6176150fddee139b4e.js
app-3f6176150fddee139b4e.js.map
app-417449e8d48be05daf07.js
app-417449e8d48be05daf07.js.map
app-6209cc29a8b01a3574d8.js
app-6209cc29a8b01a3574d8.js.map
app-aa6af5e92ea57dc740df.js
app-aa6af5e92ea57dc740df.js.map
app-ce4a30544652ffad96c7.js
app-ce4a30544652ffad96c7.js.map
app-e547479bb365b69530e3.js
app-e547479bb365b69530e3.js.map
app-e7abca213aadc1f039af.js
app-e7abca213aadc1f039af.js.map
app-fdcb66c8408d696b8502.js
app-fdcb66c8408d696b8502.js.map
chunk-map.json
index.html
pages-manifest-0403e3e2a6dbb45066e9.js
pages-manifest-0403e3e2a6dbb45066e9.js.map
pages-manifest-05d8e7eaab53cfa9b69e.js
pages-manifest-05d8e7eaab53cfa9b69e.js.map
pages-manifest-11783f85ade94ee9176f.js
pages-manifest-11783f85ade94ee9176f.js.map
pages-manifest-5114127710f9c1180bd7.js
pages-manifest-5114127710f9c1180bd7.js.map
pages-manifest-5582e24b4abe0a7b7684.js
pages-manifest-5582e24b4abe0a7b7684.js.map
pages-manifest-66b91b3cbb2690b57d72.js
pages-manifest-66b91b3cbb2690b57d72.js.map
pages-manifest-7178d3c818e203faf25f.js
pages-manifest-7178d3c818e203faf25f.js.map
pages-manifest-9ce13631ac44ed1f0f84.js
pages-manifest-9ce13631ac44ed1f0f84.js.map
pages-manifest-a3cfff0b4b5654d1bde7.js
pages-manifest-a3cfff0b4b5654d1bde7.js.map
pages-manifest-c4045bc643135ca690db.js
pages-manifest-c4045bc643135ca690db.js.map
pages-manifest-fdab1623906dd555c771.js
pages-manifest-fdab1623906dd555c771.js.map
pages-manifest-ffe9d70e138cd8e20aa6.js
pages-manifest-ffe9d70e138cd8e20aa6.js.map
sitemap.xml
styles-6ecff2fa8f379cb181f0.js
styles-6ecff2fa8f379cb181f0.js.map
styles-cb50082b175331b7f878.js
styles-cb50082b175331b7f878.js.map
styles.5706eb5564e4927bcf6f.css
webpack-runtime-054cdfdb33d019cea318.js
webpack-runtime-054cdfdb33d019cea318.js.map
webpack-runtime-130469bbeddb54e6742b.js
webpack-runtime-130469bbeddb54e6742b.js.map
webpack-runtime-391142e0b2dacbb535ad.js
webpack-runtime-391142e0b2dacbb535ad.js.map
webpack-runtime-5f4afe32f4e7831553af.js
webpack-runtime-5f4afe32f4e7831553af.js.map
webpack-runtime-7148d5b2e093b4bcdbe5.js
webpack-runtime-7148d5b2e093b4bcdbe5.js.map
webpack-runtime-93fddc2aa7326bf63adc.js
webpack-runtime-93fddc2aa7326bf63adc.js.map
webpack-runtime-942836726e6049034023.js
webpack-runtime-942836726e6049034023.js.map
webpack-runtime-9fc0ec43a1bf52e2f50c.js
webpack-runtime-9fc0ec43a1bf52e2f50c.js.map
webpack-runtime-aef79d90e6ec278abd0f.js
webpack-runtime-aef79d90e6ec278abd0f.js.map
webpack-runtime-bbba2efacd5f23e655bf.js
webpack-runtime-bbba2efacd5f23e655bf.js.map
webpack-runtime-c5d0d6575ea2a450960f.js
webpack-runtime-c5d0d6575ea2a450960f.js.map
webpack-runtime-e44a439dd2efd5022cca.js
webpack-runtime-e44a439dd2efd5022cca.js.map
webpack.stats.json

README.md

BrainSINS Documentation static site

Here you would find instructions to install, improve and deploy the documentation site.

🚀 Install

Get started by running the following commands (NPM required):

$ git clone git@github.com:BrainSINS/BrainSINS.github.io.git
$ git checkout develop
$ npm install
$ npm start

Visit http://localhost:8000/ to view the app. Anytime you make a change in the content the app will hot reload, allowing you to view changes in realtime. You may also use the GraphQL console at http://localhost:8000/___graphql.

Also, instead of using npmcommands, you may use Gatsbycommands:

$ gatsby develop <- this one let you view the debugger in the terminal window
$ gatsby build <- this will make a fast build if you need to deploy the site in a place like Surge
$ gatsby serve <- this will serve the site in `http://localhost:8000/` without developing capabitlities

🔧 Develop

IMPORTANT check that you are located in the develop branch:

$ git branch

Write markdown files in content/lang folder. Each language available within the site must includes its own folder with the content. For example, if spanish and english are available, then there should be two folders within the content folder: /es and /en.

Open config.js and take a look at the attribute sidebar.forcedNavOrder. That attribute feeds the left menu tree, and it is a map of the current files location within the project tree.

IMPORTAT So in case you need to add an option, you must add the path within the sidebar.forcedNavOrder and also the file in the files tree.

Playing with GraphQL

Since you may use the GraphQL console, try to play with the following query:

query {
        allMdx{
          edges {
            node {
              fields {
                slug
                title
              }
            }
          }
        }
      }

The result is the list of nodes within the content folder, which will be the markdown files used for the app content.

☁️ Deploy

From the develop branch you may execute the command npm run deploy. You will need to enter your Github credentials in order to dpeloy the changes. This command will deploy the static build into master branch. SO YOU DO NOT NEED TO MODIFY MASTER BRANCH, thanks.

Take into account that you need to commit and push the changes in develop branch to allow other members request pull them.

Example of deployment

Imagine you modify the content of the file es/index.mdx. Just execute the following commands to view changes in the cloud:

#first we update our repo
$ git add -A
$ git commit -m "My commit message"
$ git push origin develop

#now build and deploy
$ npm run deploy

Configuration files

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
  • sidebar config for navigation links configuration

    • forcedNavOrder for left sidebar navigation order. It should be in the format "/"
    • links - Links on the bottom left of the sidebar
  • 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. Currently it supports only one level of nesting.

🤖 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.

You can’t perform that action at this time.