Extract the base url into two vars

This commit is contained in:
Sameer Rahmani 2022-07-03 23:42:25 +01:00
parent bc95a3fa1a
commit c47738ce86
2 changed files with 6 additions and 1 deletions

View File

@ -44,6 +44,11 @@
"Where to find the docs. It sould be relative to the "Where to find the docs. It sould be relative to the
project root.") project root.")
(defvar fg42/build-dev-base-url "http://localhost:3003"
"The base url to use with the docs for dev.")
(defvar fg42/build-prod-base-url "https://fg42.org"
"The base url to use with the docs for production.")
(defvar fg42/build-docs-actions nil (defvar fg42/build-docs-actions nil
"Set of actions to run before building the "Set of actions to run before building the

View File

@ -272,7 +272,7 @@ Not pages."
(defun fg42/build-docs (build-dir) (defun fg42/build-docs (build-dir)
"Build the documents and the website in the given BUILD-DIR." "Build the documents and the website in the given BUILD-DIR."
(let ((base-url (if (prod-p) "https://fg42.org" "http://localhost:3003")) (let ((base-url (if (prod-p) fg42/build-prod-base-url fg42/build-dev-base-url))
(stage1-dir (expand-file-name "site" build-dir)) (stage1-dir (expand-file-name "site" build-dir))
(final-dir (expand-file-name "site-build" build-dir))) (final-dir (expand-file-name "site-build" build-dir)))