From 5bfe6f8206b658bb6cccb6e9f9bdebd208bc5002 Mon Sep 17 00:00:00 2001 From: James Tansiri Date: Sun, 22 Dec 2024 10:08:35 +0700 Subject: [PATCH] fix: full path for monaco js and ts language worker --- _data/env.js | 8 +++++++- _includes/layouts/lesson.njk | 2 +- src/diff-editor.njk | 2 +- src/markdown-editor.njk | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/_data/env.js b/_data/env.js index 4d6263c..fac4cfc 100644 --- a/_data/env.js +++ b/_data/env.js @@ -1,3 +1,9 @@ require("dotenv").config(); -module.exports = process.env; +module.exports = { + ...process.env, + base_url: + process.env.DEVELOPMENT === "true" + ? "http://localhost:8080" + : "https://www.pythonexpert.dev", +}; diff --git a/_includes/layouts/lesson.njk b/_includes/layouts/lesson.njk index 57191ea..22377fa 100644 --- a/_includes/layouts/lesson.njk +++ b/_includes/layouts/lesson.njk @@ -334,7 +334,7 @@ layout: layouts/base.njk diff --git a/src/diff-editor.njk b/src/diff-editor.njk index 7db9359..ffd532f 100644 --- a/src/diff-editor.njk +++ b/src/diff-editor.njk @@ -8,7 +8,7 @@ title: Diff editor diff --git a/src/markdown-editor.njk b/src/markdown-editor.njk index 3e81128..6e2e912 100644 --- a/src/markdown-editor.njk +++ b/src/markdown-editor.njk @@ -31,7 +31,7 @@ title: Live editor