Add Hydra placeholder and create template for blog index

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2021-03-31 14:08:34 +02:00
parent 10dfb8effe
commit 328f26dd29
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
5 changed files with 57 additions and 4 deletions

0
home/hydra.org Normal file
View file

29
make.el
View file

@ -32,7 +32,9 @@
(defvar org-publish-project-alist) (defvar org-publish-project-alist)
(setq org-publish-project-alist (setq org-publish-project-alist
`(("blog-content" `(
;; Blog
("blog-content"
:base-directory ,(expand-file-name "./blog/") :base-directory ,(expand-file-name "./blog/")
:base-extension "org" :base-extension "org"
:publishing-directory ,(expand-file-name "./public_html/blog") :publishing-directory ,(expand-file-name "./public_html/blog")
@ -62,10 +64,13 @@
:section-numbers nil :section-numbers nil
:with-toc nil :with-toc nil
:with-date nil :with-date nil
:html-template ,(templated-html-load-template "./templates/blog.html") :html-template ,(templated-html-load-template "./templates/blog-index.html")
:publishing-function org-html-publish-to-templated-html) :publishing-function org-html-publish-to-templated-html)
("blog" ("blog"
:components ("blog-content" "blog-index")) :components ("blog-content" "blog-index"))
;; Homepage
("homepage" ("homepage"
:base-directory ,(expand-file-name "./home") :base-directory ,(expand-file-name "./home")
:recursive nil :recursive nil
@ -76,14 +81,32 @@
:publishing-directory ,(expand-file-name "./public_html/") :publishing-directory ,(expand-file-name "./public_html/")
:html-template ,(templated-html-load-template "./templates/index.html") :html-template ,(templated-html-load-template "./templates/index.html")
:publishing-function org-html-publish-to-templated-html) :publishing-function org-html-publish-to-templated-html)
;; Hydra placeholder
("hydra-placeholder"
:base-directory ,(expand-file-name "./home")
:recursive nil
:base-extension "org"
:exclude "^.*$"
:include ("hydra.org")
:with-toc nil
:publishing-directory ,(expand-file-name "./public_html/")
:html-template ,(templated-html-load-template "./templates/hydra-placeholder.html")
:publishing-function org-html-publish-to-templated-html)
;; Static images and css and js
("assets" ("assets"
:base-directory ,(expand-file-name "./assets/") :base-directory ,(expand-file-name "./assets/")
:publishing-directory ,(expand-file-name "./public_html/") :publishing-directory ,(expand-file-name "./public_html/")
:recursive t :recursive t
:base-extension "\\(ttf\\|svg\\|jpg\\|gif\\|png\\|css\\|js\\|el\\|nb\\|ipynb\\|pdf\\|xml\\)" :base-extension "\\(ttf\\|svg\\|jpg\\|gif\\|png\\|css\\|js\\|el\\|nb\\|ipynb\\|pdf\\|xml\\)"
:publishing-function org-publish-attachment) :publishing-function org-publish-attachment)
;; top-level trigger
("publish" ("publish"
:components ("blog" "assets" "homepage")))) :components ("blog" "assets" "homepage" "hydra-placeholder"))))
(org-publish "publish" t) (org-publish "publish" t)

14
templates/blog-index.html Normal file
View file

@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
{{:include "head.html"}}
<body>
<div id="organizer">
<div class="sidebar">{{org-html-toc 2 info}}</div>
<div id="content">
{{:include "navbar.html"}}
{{contents}}
</div>
<div class="sidebar"></div>
</div>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
{{:include "head.html"}}
<body>
<div id="organizer">
<div class="sidebar"></div>
<div id="content">
{{:include "navbar.html"}}
<div>
Nothing here yet
</div>
</div>
<div class="sidebar"></div>
</div>
</body>
</html>

View file

@ -8,7 +8,7 @@
<a class="navbar-item" href="https://github.com/MagicRB"> <a class="navbar-item" href="https://github.com/MagicRB">
GitHub GitHub
</a> </a>
<a class="navbar-item" href="https://hydra.redalder.org/"> <a class="navbar-item" href="/hydra.html">
HydraCI HydraCI
</a> </a>
<a class="navbar-item" href="/blog"> <a class="navbar-item" href="/blog">