Skip to content

Commit 6de9b05

Browse files
Martin BrignallMartin Brignall
authored andcommitted
Fixing the .preamble and updated script
1 parent febf7d4 commit 6de9b05

3 files changed

Lines changed: 31 additions & 15 deletions

File tree

assets/html_preamble.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

assets/stylesheet.css

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
font-family: 'Fira Mono', monospace;
44
background-color: #F0E8DA;
55
margin: 0 auto;
6-
padding: 20px;
6+
padding: 10px;
77
}
88

99
/* Mobile Devices */
@@ -50,7 +50,8 @@ h2, h3 {
5050
border-top: 1px solid black;
5151
border-bottom: 1px solid black;
5252
background-color: #D5E2E7;
53-
font-size: 80%;
53+
font-size: 90%;
54+
text-align: center;
5455
}
5556

5657
figure {
@@ -112,7 +113,7 @@ th, td {
112113
/* --- THIS IS THE UPDATED RULE --- */
113114
/* Specific styling for the "Key" column using its class */
114115
td.org-left {
115-
font-weight: bold;
116+
font-weight: bold;
116117
}
117118

118119
ul {
@@ -201,13 +202,25 @@ ul {
201202
margin-bottom: 1em;
202203
}
203204

205+
div.top {
206+
border-top: 1px solid black;
207+
border-bottom: 1px solid black;
208+
padding: 10px;
209+
text-align: center;
210+
}
211+
212+
h1.logo {
213+
margin: 0 0 0 0;
214+
}
215+
204216
/* --- Postamble/Footer Styling --- */
205217
.postamble {
206218
border-top: 1px solid #4c566a;
207219
font-size: 0.9em;
208220
color: #616e88;
209221
}
210222

223+
211224
.postamble p {
212225
margin: 0;
213226
text-align: center !important;

build-site.el

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,19 @@ https://ogbe.net/blog/blogging_with_org.html"
7676
<p> Created by %c %s </p>
7777
</div>")))
7878

79+
(setq org-html-preamble-format
80+
'(("en" "<div class=\"top\">
81+
<a href=\"/index.html\">
82+
<h1 class=\"logo\">mblognl</h1>
83+
</a>
84+
<div>
85+
<a href='/about.html'>About Me</a> |
86+
<a href='/archive.html'>Blog</a> |
87+
<a href='/books.html'>Books</a> |
88+
<a href='/rss.xml'>RSS</a>
89+
</div>
90+
</div>")))
91+
7992
(defun file-contents (file)
8093
"Return the contents of FILE as a string, or nil if the file does not exist."
8194
(if (file-readable-p file)
@@ -87,7 +100,8 @@ https://ogbe.net/blog/blogging_with_org.html"
87100
(setq org-publish-project-alist
88101
`(("mblognl"
89102
:base-directory "./content"
90-
:html-preamble ,(file-contents "assets/html_preamble.html")
103+
:html-preamble t
104+
;;:html-preamble ,(file-contents "assets/html_preamble.html")
91105
:html-postamble t
92106
:recursive t
93107

0 commit comments

Comments
 (0)