Skip to content

Commit

Permalink
fix docs & make add-remote-resource work only work when REMOTE_REPO_U…
Browse files Browse the repository at this point in the history
…RL env variable is set
  • Loading branch information
matthewwong525 committed Apr 13, 2024
1 parent 1c921e5 commit 0cbe592
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 0 additions & 4 deletions docusaurus/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
.docusaurus
.cache-loader

# Resources
/blog
/docs

# Misc
.DS_Store
.env.local
Expand Down
10 changes: 8 additions & 2 deletions docusaurus/add-remote-resources.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
const shell = require('shelljs');
const tmp = require('tmp');

// Define the repository URL and the target directory
const REPO_URL = "https://github.com/devtodollars/resources.git";
// Check for the environment variable and use it if available, otherwise exit
const REPO_URL = process.env.REMOTE_REPO_URL;
if (!REPO_URL) {
console.log("Environment variable RESOURCE_REPO_URL is not set. Exiting.");
process.exit();
}

// Define target repo
const TARGET_DIR = shell.pwd().stdout;

// Create a temporary directory for cloning
Expand Down
1 change: 1 addition & 0 deletions docusaurus/docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
sidebar_position: 1
slug: /
---

# Tutorial Intro
Expand Down
Binary file added docusaurus/static/img/docusaurus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0cbe592

Please sign in to comment.