Make examples easy to use (#798)

* [monorepo][m] - remove nx from simple-example

* [simple-example][sm] - install octokit and simplify README

* [simple-example][m] - fix linting

* [monorepo][m] - simplify examples

* [monorepo][sm] - update docs
This commit is contained in:
Luccas Mateus
2023-04-25 07:39:34 -03:00
committed by GitHub
parent e8bf4daf5f
commit 5305cc4c2f
25 changed files with 11948 additions and 355 deletions

View File

@@ -61,10 +61,9 @@ export default function ProjectPage({ project }) {
// Generates `/posts/1` and `/posts/2`
export async function getStaticPaths() {
const project_name = getConfig().serverRuntimeConfig.project_name;
const jsonDirectory = path.join(
process.cwd(),
`/examples/${project_name}/datasets.json`
'datasets.json'
);
const repos = await fs.readFile(jsonDirectory, 'utf8');
@@ -89,10 +88,9 @@ export async function getStaticPaths() {
}
export async function getStaticProps({ params }) {
const project_name = getConfig().serverRuntimeConfig.project_name;
const jsonDirectory = path.join(
process.cwd(),
`/examples/${project_name}/datasets.json`
'datasets.json'
);
const reposFile = await fs.readFile(jsonDirectory, 'utf8');
const repos: GithubProject[] = JSON.parse(reposFile);