Browse Source

Merge branch 'make-pdf' of tildeverse/zine into master

pull/5/head
Ben Harris 2 years ago
committed by Gitea
parent
commit
0f3df53ed0
  1. 2
      .gitignore
  2. 41
      Makefile
  3. 33
      dist/index.php
  4. 6
      header-permalinks.lua
  5. 7
      increase-header-levels.lua
  6. 2
      issues/1/diving_into_the_depths_of_the_tildeverse.md
  7. 1
      issues/1/metadata.yml
  8. 2
      issues/1/social_git.md
  9. 2
      issues/1/you_wanna_make_a_tilde.md

2
.gitignore

@ -0,0 +1,2 @@
dist/*.pdf
dist/*.html

41
Makefile

@ -0,0 +1,41 @@
ISSUES != find issues -type d
DEST_PDF_FILES := $(ISSUES:issues/%=dist/issue-%.pdf)
DEST_HTML_FILES := $(ISSUES:issues/%=dist/issue-%.html)
PANDOC != command -v pandoc 2> /dev/null
all: $(DEST_PDF_FILES) $(DEST_HTML_FILES)
dist/issue-%.pdf: issues/%
$(PANDOC) \
--file-scope \
--from markdown \
--to latex \
--pdf-engine xelatex \
--table-of-contents \
--variable title:"tildeverse zine $@" \
--standalone \
--output $@ \
$</*.md
dist/issue-%.html: issues/%
$(PANDOC) \
--file-scope \
--from markdown \
--to html \
--standalone \
--table-of-contents \
--lua-filter header-permalinks.lua \
--lua-filter increase-header-levels.lua \
--metadata title:"tildeverse zine $@" \
--variable include-before:"<div class=\"container\">" \
--variable include-after:"</div>" \
--css https://tilde.team/css/hacker.css \
--output $@ \
$</*.md
clean:
rm dist/*.html dist/*.pdf
.PHONY: clean

33
dist/index.php

@ -0,0 +1,33 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://tilde.team/css/hacker.css">
<title>tildeverse zine</title>
</head>
<body>
<div class="container">
<h1>tildeverse zine</h1>
<p>this is the tildeverse zine</p>
<p>get involved and send in some content: <a href="https://tildegit.org/tildeverse/zine">tildeverse/zine</a></p>
<h2>issues</h2>
<?php foreach (glob("dist/*.html") as $issue) {
$issue = mb_substr(basename($issue, ".html"), 6); ?>
<h4>issue <?=$issue?></h4>
<p>
<a href="issue-<?=$issue?>.html">html version</a>
<a href="issue-<?=$issue?>.pdf">pdf version</a>
</p>
<?php } ?>
</div>
</body>
</html>

6
header-permalinks.lua

@ -0,0 +1,6 @@
function Header(elem)
table.insert(elem.content, pandoc.Space())
table.insert(elem.content, pandoc.Link("§", "#" .. elem.identifier))
return elem
end

7
increase-header-levels.lua

@ -0,0 +1,7 @@
function Header(elem)
if elem.level > 1 then
elem.level = elem.level + 1
end
return elem
end

2
diving_into_the_depths_of_the_tildeverse.md → issues/1/diving_into_the_depths_of_the_tildeverse.md

@ -1,5 +1,7 @@
# Diving Into the Depths Of the Tildeverse
author: ubergeek
## Intro
There's a whole lot going on with the tildeverse, and lots of little projects, many of which take some discovering. Here's I'll dive into some of them, which I've since discovered.

1
issues/1/metadata.yml

@ -0,0 +1 @@
title: tildeverse zine issue 1

2
social_git.md → issues/1/social_git.md

@ -1,5 +1,7 @@
# Being Social With Git
author: ubergeek
## Intro
One underrated social aspect in the tildeverse is collaborating via code or document creation. Many people consider that to be "loner work", when in reality, it can be much, much more!

2
you_wanna_make_a_tilde.md → issues/1/you_wanna_make_a_tilde.md

@ -1,5 +1,7 @@
# So, You Wanna Make A Tilde?
author: ubergeek
So, you want to make a Tilde server (aka a pubnix server)? You've got time on your hands. You want to make a new and cool thing, right? Awesome! This article is going to step you through some of the pitfalls, so you can try to ensure it's going to be fun.
## Why?
Loading…
Cancel
Save