diff --git a/README.md b/README.md index dc1bfae6..16603bfd 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,20 @@ $ git clone https://github.com/acid-info/logos-docs-template.git $ yarn install ``` -3. Start the website: +3. Create .env and run fetch-content.js +```bash +GITHUB_TOKEN= +``` + +and `node fetch-content.js` + +4. Start the website: + ```bash $ yarn start ``` -4. Visit `http://localhost:3000` in your browser +5. Visit `http://localhost:3000` in your browser ## Configuration diff --git a/fetch-content.js b/fetch-content.js index c0f19f34..bca226db 100644 --- a/fetch-content.js +++ b/fetch-content.js @@ -2,7 +2,27 @@ const https = require('https') const fs = require('fs') const path = require('path') -// NOTE: Replace YOUR_GITHUB_TOKEN with your GitHub token +function loadEnv() { + const envPath = path.resolve(process.cwd(), '.env') + + try { + const data = fs.readFileSync(envPath, 'utf8') + + data.split('\n').forEach(line => { + line = line.trim() + + if (line && !line.startsWith('#')) { + const [key, value] = line.split('=') + process.env[key.trim()] = value.trim() + } + }) + } catch (err) { + console.error('Error loading .env file', err) + } +} + +loadEnv() + async function fetchFromGitHub(url, callback) { https .get( @@ -10,7 +30,8 @@ async function fetchFromGitHub(url, callback) { { headers: { 'User-Agent': 'Node.js', - Authorization: `token {YOUR_GITHUB_TOKEN}`, + // NOTE: Create .env file and add GITHUB_TOKEN=your_token + Authorization: `token ${process.env.GITHUB_TOKEN}`, }, }, res => { diff --git a/vac/1/images/lifecycle.png b/vac/1/images/lifecycle.png index c96f54df..415784b5 100644 Binary files a/vac/1/images/lifecycle.png and b/vac/1/images/lifecycle.png differ diff --git a/waku/standards/core/17/images/rln-relay.png b/waku/standards/core/17/images/rln-relay.png index 1f96a63e..6c333ff3 100644 Binary files a/waku/standards/core/17/images/rln-relay.png and b/waku/standards/core/17/images/rln-relay.png differ