mirror of
https://github.com/vacp2p/rfc.vac.dev.git
synced 2026-01-08 21:57:58 -05:00
chore: Routing Refactor (#3)
* scrape with 1:1 mapping to origin repo * exclude .md extension from file path in URLs inside MDs * removed legacy static files * remove image path manipulation * move scrapper to new folder * sidebar custom ordering implemented
This commit is contained in:
13
docusaurus-utils/scrapper/github.mjs
Normal file
13
docusaurus-utils/scrapper/github.mjs
Normal file
@@ -0,0 +1,13 @@
|
||||
import { GITHUB_TOKEN } from './config.mjs'
|
||||
import axios from "axios";
|
||||
|
||||
export async function fetchFromGitHub(url, callback) {
|
||||
const response = await axios.get(url, {
|
||||
headers: {
|
||||
'User-Agent': 'Node.js',
|
||||
'Authorization': `token ${GITHUB_TOKEN}`
|
||||
}
|
||||
});
|
||||
|
||||
return response.data;
|
||||
}
|
||||
Reference in New Issue
Block a user