Fix the cube index list link and cube order
This commit is contained in:
parent
ffcf493540
commit
32bb579ac8
2
Makefile
2
Makefile
|
@ -51,7 +51,7 @@ docs:
|
||||||
./build.el docs
|
./build.el docs
|
||||||
|
|
||||||
serve: build
|
serve: build
|
||||||
npx http-server ./build
|
npx http-server ./build/site-build/
|
||||||
|
|
||||||
.PHONY: deploy-docs
|
.PHONY: deploy-docs
|
||||||
deploy-docs: docs
|
deploy-docs: docs
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
(copy-directory (from-root "/docs/site/pages") build-dir nil t))
|
(copy-directory (from-root "/docs/site/pages") build-dir nil t))
|
||||||
|
|
||||||
|
|
||||||
(defun fg42/build-prepare-docs (build-dir)
|
(defun fg42/build-prepare-docs (build-dir host)
|
||||||
"Prepare the documents and the website in the given BUILD-DIR."
|
"Prepare the documents and the website in the given BUILD-DIR."
|
||||||
(fg42/build-docs-copy-base build-dir)
|
(fg42/build-docs-copy-base build-dir)
|
||||||
|
|
||||||
|
@ -77,10 +77,10 @@
|
||||||
(cons :links (mapconcat (lambda (c)
|
(cons :links (mapconcat (lambda (c)
|
||||||
(format "- [[%s][%s]]\n"
|
(format "- [[%s][%s]]\n"
|
||||||
;; href
|
;; href
|
||||||
(format "%s/cubes/%s.org" build-dir c)
|
(format "%s/cubes/%s.html" host c)
|
||||||
;; title
|
;; title
|
||||||
(plist-get (symbol-plist c) :title)))
|
(plist-get (symbol-plist c) :title)))
|
||||||
fg42/available-cubes)))))
|
(sort fg42/available-cubes 'string<))))))
|
||||||
|
|
||||||
|
|
||||||
(defun all-org-files ()
|
(defun all-org-files ()
|
||||||
|
@ -276,8 +276,12 @@ 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"))
|
||||||
|
(stage1-dir (expand-file-name "site" build-dir))
|
||||||
|
(final-dir (expand-file-name "site-build" build-dir)))
|
||||||
|
|
||||||
;; Create org files for the cubes
|
;; Create org files for the cubes
|
||||||
(fg42/build-prepare-docs build-dir)
|
(fg42/build-prepare-docs build-dir base-url)
|
||||||
|
|
||||||
;; We will use the org-agenda to extract all the tags
|
;; We will use the org-agenda to extract all the tags
|
||||||
|
|
||||||
|
@ -300,10 +304,6 @@ Not pages."
|
||||||
(expand-file-name "config.org" build-dir)
|
(expand-file-name "config.org" build-dir)
|
||||||
'())
|
'())
|
||||||
|
|
||||||
(let ((base-url (if (prod-p) "https://fg42.org" "http://localhost:3003"))
|
|
||||||
(stage1-dir (expand-file-name "site" build-dir))
|
|
||||||
(final-dir (expand-file-name "site-build" build-dir)))
|
|
||||||
|
|
||||||
(message "Creating the main index file")
|
(message "Creating the main index file")
|
||||||
(copy-template (from-root "/docs/site/templates/index.org")
|
(copy-template (from-root "/docs/site/templates/index.org")
|
||||||
(expand-file-name "site/index.org" build-dir)
|
(expand-file-name "site/index.org" build-dir)
|
||||||
|
@ -390,7 +390,7 @@ Not pages."
|
||||||
|
|
||||||
(org-publish-project "build" t nil)
|
(org-publish-project "build" t nil)
|
||||||
(message "Build complete.")
|
(message "Build complete.")
|
||||||
))
|
))
|
||||||
|
|
||||||
(provide 'fg42/build/docs)
|
(provide 'fg42/build/docs)
|
||||||
;;; docs.el ends here
|
;;; docs.el ends here
|
||||||
|
|
Loading…
Reference in New Issue