{{ page.title }}
- {% if page.description %}{{ page.description }}
{% endif %}
- {% if page.date %}{{ page.date | date: site.date_format }}
{% endif %}
+ {% if page.description %}{{ page.description }}
{% endif %}
+
+
+
+ ·
+ Source
+ {%- if page.raw_url %} ·
+ Markdown
+ {%- endif %}
+ {%- if page.pdf_url %} ·
+ PDF
+ {%- endif %}
+
+
+
{{ content }}
diff --git a/_plugins/raw_markdown.rb b/_plugins/raw_markdown.rb
index 2eb95c2..c29c4b6 100644
--- a/_plugins/raw_markdown.rb
+++ b/_plugins/raw_markdown.rb
@@ -20,6 +20,10 @@ def self.pages(site)
source_path = File.expand_path(page.path, site.source)
raw_path = File.join(site.dest, page.data.fetch("raw_url").delete_prefix("/"))
FileUtils.mkdir_p(File.dirname(raw_path))
- FileUtils.cp(source_path, raw_path)
+ body = File.read(source_path).sub(/\A---[ \t]*\r?\n.*?^---[ \t]*\r?\n/m, "").lstrip
+ heading, body = body.split(/\r?\n/, 2) if body.start_with?("# ")
+ heading ||= "# #{page.data.fetch("title")}"
+ date = page.data["date"]&.strftime(site.config.fetch("date_format", "%Y-%m-%d"))
+ File.write(raw_path, [heading, date, body&.lstrip].compact.join("\n\n"))
end
end
diff --git a/bin/pdf.css b/bin/pdf.css
index 498150b..546eee1 100644
--- a/bin/pdf.css
+++ b/bin/pdf.css
@@ -4,9 +4,9 @@
@media print {
@page {
size: A4;
- margin: 19mm 18mm 22mm;
+ margin: 17mm 18mm 20mm;
color: #666;
- font: 7.5pt Arial, sans-serif;
+ font: 7.5pt Georgia, serif;
@bottom-left { content: "Dani Bengl (it/its)"; }
@bottom-center { content: __CURRENT_URL__; }
@@ -14,12 +14,12 @@
}
html, body { background: #fff; color: #000; }
- body { font-size: 10.5pt; line-height: 1.45; }
+ body { font: 10.5pt/1.45 Georgia, serif; }
.wrapper { max-width: none; margin: 0; padding: 0; }
.article-title {
- margin: 0 0 9mm;
- padding: 0 0 7mm;
+ margin: 0 0 7mm;
+ padding: 0 0 3.5mm;
border-bottom: .4mm solid #1c1c1a;
}
.article-title h1 {
@@ -29,20 +29,21 @@
line-height: 1.05;
letter-spacing: -.025em;
}
+ .article-title > hr {
+ display: none;
+ }
.print-description {
display: block;
- margin: 4mm 0 0;
+ margin: 3mm 0;
color: #444;
font-size: 12pt;
}
+ .article-formats { display: none; }
.print-date {
display: block;
- margin: 3mm 0 0;
+ margin: 0;
color: #666;
- font-family: Arial, sans-serif;
font-size: 8pt;
- letter-spacing: .04em;
- text-transform: uppercase;
}
header[role="banner"],