Code Monkey home page Code Monkey logo

Comments (2)

ecklf avatar ecklf commented on July 26, 2024 1

Hi @impulse, the problem is that the project in an early development state and there are no information about the project itself yet. As you can see on the roadmap the repository is also kind of a case study for me to build a project from scratch in a clean and well documented way. Like described in #1 the main goal is to create a sine-source-of-truth for the Nord project which is why this is kind of a opinionated project and currently not really laid out to be easily useable by others.

Anyway, the problem you're facing is the fact that the used official gatsby-source-graphql plugin requires an valid GitHub API token in order to fetch data from the GraphQL API. The data is used to display information about all the port project repositories on the ports page like the amount of stars or the latest version as well as linking to the public URL of the repository without "hardcoding" it into the code base.
The GitHub API token is stored in the both .env files for production & development that are both encrypted using the de-facto standard tool git-crypt (see .git-crypt folder in the repository root).

In order to use the project you need to

  • create a GitHub API token to be able to fetch (public) data from the GraphQL API
  • delete both .env files and replace them with your own ones or use any other package or script to set and expose the required environment variables that contains the GitHub API token. nord-docs looks for the environment variables named NORD_DOCS_GITHUB_API_TOKEN_READONLY_PUBLIC for the token, but you can adjust the code to use any other name.
    Please be careful to not expose these publicly but only on your local system, otherwise also encrypt them to store them in a public repository.

Thanks for the writeup :). Currently learning Gatsby and GraphQL so this helps^^.

from web.

arcticicestudio avatar arcticicestudio commented on July 26, 2024

Hi @impulse, the problem is that the project in an early development state and there are no information about the project itself yet. As you can see on the roadmap the repository is also kind of a case study for me to build a project from scratch in a clean and well documented way. Like described in #1 the main goal is to create a sine-source-of-truth for the Nord project which is why this is kind of a opinionated project and currently not really laid out to be easily useable by others.

Anyway, the problem you're facing is the fact that the used official gatsby-source-graphql plugin requires an valid GitHub API token in order to fetch data from the GraphQL API. The data is used to display information about all the port project repositories on the ports page like the amount of stars or the latest version as well as linking to the public URL of the repository without "hardcoding" it into the code base.
The GitHub API token is stored in the both .env files for production & development that are both encrypted using the de-facto standard tool git-crypt (see .git-crypt folder in the repository root).

In order to use the project you need to

  • create a GitHub API token to be able to fetch (public) data from the GraphQL API
  • delete both .env files and replace them with your own ones or use any other package or script to set and expose the required environment variables that contains the GitHub API token. nord-docs looks for the environment variables named NORD_DOCS_GITHUB_API_TOKEN_READONLY_PUBLIC for the token, but you can adjust the code to use any other name.
    Please be careful to not expose these publicly but only on your local system, otherwise also encrypt them to store them in a public repository.

from web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.