@ -59,7 +59,7 @@
@@ -59,7 +59,7 @@
( 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. "
( fg42/build-docs-copy-base build-dir )
@ -77,10 +77,10 @@
@@ -77,10 +77,10 @@
( cons :links ( mapconcat ( lambda ( c )
( format " - [[%s][%s]] \n "
;; href
( format " %s/cubes/%s.org " build-dir c )
( format " %s/cubes/%s.html " host c )
;; title
( plist-get ( symbol-plist c ) :title ) ) )
fg42/available-cubes ) ) ) ) )
( sort fg42/available-cubes 'string< ) ) ) ) ) )
( defun all-org-files ( )
@ -137,7 +137,7 @@ Not pages."
@@ -137,7 +137,7 @@ Not pages."
( ->epoch ( get-file-global-props file " DATE " ) )
( get-file-global-props file " TITLE " )
( replace-regexp-in-string " \\ .org " " .html "
( file-name-nondirectory file ) ) )
( file-name-nondirectory file ) ) )
result )
result ) ) )
files
@ -247,11 +247,11 @@ Not pages."
@@ -247,11 +247,11 @@ Not pages."
( files ( cdr ( assoc tag ( cdr tags ) ) ) ) )
( when ( null tag )
( message " [Error]: The following files are missig a category: %s "
( mapconcat
( lambda ( x ) ( format " %s \n " x ) )
( sort
( mapcar #' pair-file-with-date files )
( lambda ( x y ) ( > ( car x ) ( car y ) ) ) ) ) )
( mapconcat
( lambda ( x ) ( format " %s \n " x ) )
( sort
( mapcar #' pair-file-with-date files )
( lambda ( x y ) ( > ( car x ) ( car y ) ) ) ) ) )
( error " The above list of files are missing a category " ) )
( copy-template
@ -276,33 +276,33 @@ Not pages."
@@ -276,33 +276,33 @@ Not pages."
( defun fg42/build-docs ( build-dir )
" Build the documents and the website in the given BUILD-DIR. "
;; Create org files for the cubes
( fg42/build-prepare-docs 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 ) ) )
;; We will use the org-agenda to extract all the tags
;; Create org files for the cubes
( fg42/build-prepare-docs build-dir base-url )
;;; Set the dir containing org the org-files
( setq org-directory ( expand-file-name " site " build-dir ) )
;; We will use the org-agenda to extract all the tags
;;; Discover all the org files
( setq org-agenda-files ( all-org-files ) )
;;; Set the dir containing org the org- files
( setq org-directory ( expand-file-name " site " build-dir ) )
( setf user-full-name author-name )
( setf user-mail-address author-email )
;;; Discover all the org files
( setq org-agenda-files ( all-org-files ) )
;; Disable default header links (top, next)
( setf org-html-home/up-format " " )
( setf org-html-link-up " " )
( setf org-html-link-home " " )
( setf org-html-scripts " " )
( setf user-full-name author-name )
( setf user-mail-address author-email )
( copy-template ( from-root " /docs/site/config.org " )
( expand-file-name " config.org " build-dir )
' ( ) )
;; Disable default header links (top, next)
( setf org-html-home/up-format " " )
( setf org-html-link-up " " )
( setf org-html-link-home " " )
( setf org-html-scripts " " )
( 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 ) ) )
( copy-template ( from-root " /docs/site/config.org " )
( expand-file-name " config.org " build-dir )
' ( ) )
( message " Creating the main index file " )
( copy-template ( from-root " /docs/site/templates/index.org " )
@ -390,7 +390,7 @@ Not pages."
@@ -390,7 +390,7 @@ Not pages."
( org-publish-project " build " t nil )
( message " Build complete. " )
) )
) )
( provide 'fg42/build/docs )
;;; docs.el ends here