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)
(setq org-publish-project-alist
`(("blog-content"
`(
;; Blog
("blog-content"
:base-directory ,(expand-file-name "./blog/")
:base-extension "org"
:publishing-directory ,(expand-file-name "./public_html/blog")
@ -62,10 +64,13 @@
:section-numbers nil
:with-toc 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)
("blog"
:components ("blog-content" "blog-index"))
;; Homepage
("homepage"
:base-directory ,(expand-file-name "./home")
:recursive nil
@ -76,14 +81,32 @@
:publishing-directory ,(expand-file-name "./public_html/")
:html-template ,(templated-html-load-template "./templates/index.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"
:base-directory ,(expand-file-name "./assets/")
:publishing-directory ,(expand-file-name "./public_html/")
:recursive t
:base-extension "\\(ttf\\|svg\\|jpg\\|gif\\|png\\|css\\|js\\|el\\|nb\\|ipynb\\|pdf\\|xml\\)"
:publishing-function org-publish-attachment)
;; top-level trigger
("publish"
:components ("blog" "assets" "homepage"))))
:components ("blog" "assets" "homepage" "hydra-placeholder"))))
(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">
GitHub
</a>
<a class="navbar-item" href="https://hydra.redalder.org/">
<a class="navbar-item" href="/hydra.html">
HydraCI
</a>
<a class="navbar-item" href="/blog">