Fixed some trivial bugs in the doc generator
This commit is contained in:
parent
d6be7ed7da
commit
a77d2ee6c5
17
README.org
17
README.org
|
@ -64,23 +64,28 @@ We're not happy with Microsoft buying Github and we don't trust a company like M
|
||||||
their strategies (For more information take a look at [[https://en.wikipedia.org/wiki/Halloween_documents][Halloween documents]].
|
their strategies (For more information take a look at [[https://en.wikipedia.org/wiki/Halloween_documents][Halloween documents]].
|
||||||
So we decided to move to Devheroes as an alternative and we are happy here so far.
|
So we decided to move to Devheroes as an alternative and we are happy here so far.
|
||||||
|
|
||||||
* License
|
* Contribute
|
||||||
|
FG42 made possible by the effort of the community of [[docs/site/pages/contributors.org][Contributors]].
|
||||||
|
|
||||||
FG42 is free software; you can redistribute it and/or modify
|
If you're interested in *FG42* and wants to contribute to the project please follow
|
||||||
|
the [[docs/site/pages/how-to-contribute.org][How to Contribute Guitd]]. Also please read our [[docs/site/pages/code-of-conduct.org][Code of Conduct]] as well.
|
||||||
|
|
||||||
|
* License
|
||||||
|
FG42 is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
FG42 is distributed in the hope that it will be useful,
|
FG42 is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
You should have received a copy of the GNU General Public License along
|
||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
All the documents of FG42 that locate in 'doc' directories release
|
All the documents of FG42 that locate in 'doc' directories release
|
||||||
under the term of GNU FDL.
|
under the term of GNU FDL.
|
||||||
|
|
||||||
Copyright (C) 2010-2021 Sameer Rahmani <lxsameer@gnu.org>
|
Copyright (C) 2010-2022 Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
(defvar project-root nil
|
(defvar project-root nil
|
||||||
"Root directory of the website source code.")
|
"Root directory of the website source code.")
|
||||||
|
|
||||||
|
|
||||||
(defvar debug-mode nil)
|
(defvar debug-mode nil)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,8 @@
|
||||||
|
|
||||||
(defun fg42/build-docs-copy-base (build-dir)
|
(defun fg42/build-docs-copy-base (build-dir)
|
||||||
"Copy the base structure of the website to the BUILD-DIR."
|
"Copy the base structure of the website to the BUILD-DIR."
|
||||||
(copy-directory (from-root "/docs/site/pages") build-dir nil t))
|
(copy-directory (from-root "/docs/site/pages")
|
||||||
|
(expand-file-name "site/pages" build-dir) nil t))
|
||||||
|
|
||||||
|
|
||||||
(defun fg42/build-prepare-docs (build-dir host)
|
(defun fg42/build-prepare-docs (build-dir host)
|
||||||
|
|
|
@ -121,6 +121,7 @@ call `org-html-render-tag-template' otherwise will call ORIG-FN."
|
||||||
("base-url" (plist-get info :base-url))
|
("base-url" (plist-get info :base-url))
|
||||||
("preamble" (org-html--build-pre/postamble 'preamble info))
|
("preamble" (org-html--build-pre/postamble 'preamble info))
|
||||||
("title" (get-file-global-props (plist-get info :input-file) "TITLE"))
|
("title" (get-file-global-props (plist-get info :input-file) "TITLE"))
|
||||||
|
("version" (fg42/version))
|
||||||
("description" (or (get-file-global-props (plist-get info :input-file) "DESC")
|
("description" (or (get-file-global-props (plist-get info :input-file) "DESC")
|
||||||
""))
|
""))
|
||||||
("postamble" (org-html--build-pre/postamble 'postamble info)))))
|
("postamble" (org-html--build-pre/postamble 'postamble info)))))
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'org-element)
|
(require 'org-element)
|
||||||
|
(require 'fg42/build/core)
|
||||||
|
|
||||||
|
|
||||||
(defmacro comment (&rest _)
|
(defmacro comment (&rest _)
|
||||||
|
@ -73,5 +74,16 @@
|
||||||
(mapcar #'car (org-get-buffer-tags))))
|
(mapcar #'car (org-get-buffer-tags))))
|
||||||
|
|
||||||
|
|
||||||
|
(defun fg42/git-branch ()
|
||||||
|
(cd project-root)
|
||||||
|
(shell-command-to-string "git branch --show-current"))
|
||||||
|
|
||||||
|
|
||||||
|
(defun fg42/version ()
|
||||||
|
"Returns the current version of FG42."
|
||||||
|
(cd project-root)
|
||||||
|
(shell-command-to-string (format "git describe %s" (fg42/git-branch))))
|
||||||
|
|
||||||
|
|
||||||
(provide 'fg42/build/utils)
|
(provide 'fg42/build/utils)
|
||||||
;;; utils.el ends here
|
;;; utils.el ends here
|
||||||
|
|
|
@ -11,15 +11,15 @@
|
||||||
<meta property="og:description" content="{{description}}" />
|
<meta property="og:description" content="{{description}}" />
|
||||||
|
|
||||||
{{{head}}}
|
{{{head}}}
|
||||||
<link rel="stylesheet" href="{{base-url}}/assets/styles/dark.css?1">
|
<link rel="stylesheet" href="{{base-url}}/assets/styles/dark.css?{{version}}">
|
||||||
<link rel="stylesheet" href="{{base-url}}/assets/styles/main.css?1">
|
<link rel="stylesheet" href="{{base-url}}/assets/styles/main.css?{{version}}">
|
||||||
<link rel="stylesheet" href="{{base-url}}/assets/styles/arta.css?1">
|
<link rel="stylesheet" href="{{base-url}}/assets/styles/arta.css?{{version}}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<nav style="text-align: center;">
|
<nav style="text-align: center;">
|
||||||
<a href="/">HOME</a> | <a href="/manual/">Manual</a> | <a href="/cubes/">Cubes</a> | <a href="https://devheroes.codes/FG42/FG42">Source</a> | <a href="/categories/">Categories</a> | <a href="/tags/">Tags</a>
|
<a href="/">HOME</a> | <a href="/cubes/">Cubes</a> | <a href="https://devheroes.codes/FG42/FG42">Source</a> | <a href="/categories/">Categories</a> | <a href="/tags/">Tags</a>
|
||||||
</nav>
|
</nav>
|
||||||
<hr/>
|
<hr/>
|
||||||
</header>
|
</header>
|
||||||
|
@ -33,7 +33,8 @@
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<span>© 2010-2021 Sameer Rahmani</span><br/>
|
<span>© 2010-2022 Sameer Rahmani</span><br/>
|
||||||
|
<span>Version: {{version}}</span><br/>
|
||||||
<span>Built with <a href="https://www.gnu.org/software/emacs/">Emacs Lisp</a> and <a href="https://orgmode.org/">org-mode</a>.</span><br/>
|
<span>Built with <a href="https://www.gnu.org/software/emacs/">Emacs Lisp</a> and <a href="https://orgmode.org/">org-mode</a>.</span><br/>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
#+SETUPFILE: ../config.org
|
#+SETUPFILE: ../config.org
|
||||||
#+OPTIONS: toc:nil
|
#+OPTIONS: toc:nil
|
||||||
#+EXPORT_FILE_NAME: index.html
|
#+EXPORT_FILE_NAME: index.html
|
||||||
|
@ -9,7 +8,14 @@
|
||||||
|
|
||||||
#+INCLUDE: "../../README.org::*Future Gadgets 42" :only-contents t
|
#+INCLUDE: "../../README.org::*Future Gadgets 42" :only-contents t
|
||||||
|
|
||||||
|
* Contribute
|
||||||
|
FG42 made possible by the effort of the community of [[http:/pages/contributors.html][Contributors]].
|
||||||
|
|
||||||
|
If you're interested in *FG42* and wants to contribute to the project please follow
|
||||||
|
the [[http:/pages/how-to-contribute.html][How to Contribute Guitd]]. Also please read our [[http:/pages/code-of-conduct.html][Code of Conduct]] as well.
|
||||||
|
|
||||||
* Recent updates:
|
* Recent updates:
|
||||||
<<<:links>>>
|
<<<:links>>>
|
||||||
|
|
||||||
|
|
||||||
#+INCLUDE: "../../README.org::*License"
|
#+INCLUDE: "../../README.org::*License"
|
||||||
|
|
Loading…
Reference in New Issue