Code Monkey home page Code Monkey logo

Comments (4)

arcticicestudio avatar arcticicestudio commented on July 26, 2024 1

Hi @rjohar014 πŸ‘‹

This repository is still in steadily ongoing development (including breaking changes at any time) and, 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 usable by others. That's why there is no documentation about this repository and how to build & use it at all.

Anyway, the problem you're facing is the fact that the used 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. During build time the environment variables named NORD_DOCS_GITHUB_API_TOKEN_READONLY_PUBLIC will be checked 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.

Related to #173

from web.

rajbirjohar avatar rajbirjohar commented on July 26, 2024

Thank you for the detailed answer! I really appreciate you taking the time to thoroughly explain what's going on. I'll follow your instructions and should be able to troubleshoot and get it up and running again.

from web.

rajbirjohar avatar rajbirjohar commented on July 26, 2024

Are you able to point me to a resource that will give a more detailed step-by-step approach as to how to replace .env with my own? I'm not sure what the file is supposed to contain nor how to expose the required environment variables. Thanks.

EDIT: Got it working. Thanks again :)

from web.

arcticicestudio avatar arcticicestudio commented on July 26, 2024

You're welcome, nice to to see you got it working πŸ˜„
The .env files are loaded using the dotenv package and loaded in the gatsby-config.js file. The files can contain normal (shell) environment variable definitions, e.g.:

GITHUB_TOKEN=XXXXXXX

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.