From 097e543ebf389c6c0e099150f1e96d5bbe81b081 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 9 Sep 2019 20:29:03 -0400 Subject: [PATCH] actually show entries --- .gitignore | 1 + README.md | 14 ++- charter.php | 14 --- composer.json | 12 ++ composer.lock | 292 ++++++++++++++++++++++++++++++++++++++++++++++ entries/sample.md | 11 ++ entry.php | 67 +++++++++++ footer.php | 3 +- header.php | 5 +- index.php | 9 ++ navbar.php | 12 +- 11 files changed, 412 insertions(+), 28 deletions(-) create mode 100644 .gitignore delete mode 100644 charter.php create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 entries/sample.md create mode 100644 entry.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..48b8bf9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vendor/ diff --git a/README.md b/README.md index 69bcc79..383fabc 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,16 @@ We are an open journal which accepts any tilde-related or non-tilde related entr Currently hosted at [journal.tildeverse.org](https://journal.tildeverse.org/). -[Come chat with us! (tilde.chat:6697/#journal)](https://web.tilde.chat/?join=journal) ![chat badge](https://tilde.chat/badges/badge.php?channel=%23journal) +[Come chat with us! (tilde.chat:6697/#journal)](https://web.tilde.chat/?join=journal) +![chat badge](https://tilde.chat/badges/badge.php?channel=%23journal) + + +## deployment notes + +this site requires an nginx rewrite to properly server entries: + + location ~* ^/entries/(.+)$ { + try_files $uri $uri/ /entry.php?slug=$1; + include snippets/php.conf; + } + diff --git a/charter.php b/charter.php deleted file mode 100644 index c992401..0000000 --- a/charter.php +++ /dev/null @@ -1,14 +0,0 @@ - -

Charter

-

The Intentional Journal of the Tildeverse is an open journal for members of any tilde box (i.e; tilde.town, tilde.team, -yourtilde.com, etc.) to describe research and results of projects. Papers published should be long-formed essays as -opposed to short-form declarations, and can be on any topic of pure interest to the author, as long as there is non-commercial -motivation to explore and learn more about a topic. In addition to publishing tilde members' papers, we also operate as a social -space where members can participate in many ways, including (but not limited to) reviewing papers and providing constructive -criticism, responding to author questions, writing (obviously), or even simply bringing up topics to be researched. Through reviewing -and providing constructive criticism, we hope to provide a mechanism for authors to better themselves or develop their thinking about a topic.

- diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..e31566b --- /dev/null +++ b/composer.json @@ -0,0 +1,12 @@ +{ + "require": { + "tildeverse/wiki": "dev-master" + }, + "repositories": [ + { + "type": "vcs", + "url": "https://tildegit.org/ben/tildewiki" + } + ] +} + diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..a1b5554 --- /dev/null +++ b/composer.lock @@ -0,0 +1,292 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "3ab3df15c4e40417f427b37691e83088", + "packages": [ + { + "name": "erusev/parsedown", + "version": "1.7.3", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7", + "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "time": "2019-03-17T18:48:37+00:00" + }, + { + "name": "erusev/parsedown-extra", + "version": "0.7.1", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown-extra.git", + "reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/0db5cce7354e4b76f155d092ab5eb3981c21258c", + "reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c", + "shasum": "" + }, + "require": { + "erusev/parsedown": "~1.4" + }, + "type": "library", + "autoload": { + "psr-0": { + "ParsedownExtra": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "An extension of Parsedown that adds support for Markdown Extra.", + "homepage": "https://github.com/erusev/parsedown-extra", + "keywords": [ + "markdown", + "markdown extra", + "parsedown", + "parser" + ], + "time": "2015-11-01T10:19:22+00:00" + }, + { + "name": "mnapoli/front-yaml", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/mnapoli/FrontYAML.git", + "reference": "24070ace8b741247bb3161cbb38ecc541268b296" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mnapoli/FrontYAML/zipball/24070ace8b741247bb3161cbb38ecc541268b296", + "reference": "24070ace8b741247bb3161cbb38ecc541268b296", + "shasum": "" + }, + "require": { + "erusev/parsedown": "~1.0", + "php": ">=5.4.0", + "symfony/yaml": "~2.1|^3.0|^4.0" + }, + "require-dev": { + "league/commonmark": "~0.7", + "phpunit/phpunit": "~4.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mni\\FrontYAML\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "time": "2017-10-29T19:29:55+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686", + "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2019-08-20T14:27:59+00:00" + }, + { + "name": "tildeverse/wiki", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://tildegit.org/ben/tildewiki", + "reference": "751eb64c383cb7c6ec643eaf683b88aa1de351ea" + }, + "require": { + "erusev/parsedown-extra": "^0.7.1", + "mnapoli/front-yaml": "^1.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Tildeverse\\Wiki\\": "src/" + } + }, + "license": [ + "GPLv3" + ], + "authors": [ + { + "name": "Ben Harris", + "email": "ben@tilde.team" + } + ], + "description": "parsedown extensions for tilde wikis", + "time": "2019-07-03T05:06:34+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "tildeverse/wiki": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/entries/sample.md b/entries/sample.md new file mode 100644 index 0000000..50c7c9d --- /dev/null +++ b/entries/sample.md @@ -0,0 +1,11 @@ +--- +title: "hello" +author: "Ben Harris" +date: sep 9, 2019 +published: false +--- + +# hello! + +this is a sample journal entry. + diff --git a/entry.php b/entry.php new file mode 100644 index 0000000..3115fe5 --- /dev/null +++ b/entry.php @@ -0,0 +1,67 @@ +parse(file_get_contents($filename)); + $yml = $document->getYAML(); + $content = $document->getContent(); + $title = $yml["title"] ?? "invalid"; + $author = htmlspecialchars($yml["author"]); + $description = "journal entry {$entry_name}: {$yml["title"]} by {$author}"; + + include "header.php"; +?> + + < back to list + +

+ + draft" ?> +

+ +

author:

+

date:

+
+ + + + basename($entry, ".md"), + "yml" => $parser->parse(file_get_contents($entry))->getYAML(), + ]; + } ?> + +

journal entries

+ + + diff --git a/footer.php b/footer.php index 819d876..2eebcc7 100644 --- a/footer.php +++ b/footer.php @@ -1,6 +1,5 @@

- - + diff --git a/header.php b/header.php index 60f67f7..11de205 100644 --- a/header.php +++ b/header.php @@ -8,9 +8,9 @@ - + - + "> @@ -19,3 +19,4 @@
+ diff --git a/index.php b/index.php index c888673..172d197 100644 --- a/index.php +++ b/index.php @@ -13,4 +13,13 @@

an open journal for tilde members

We are an open journal which accepts any tilde-related or non-tilde related entries.

+ +

The Intentional Journal of the Tildeverse is an open journal for members of any tilde box (i.e; tilde.town, tilde.team, +yourtilde.com, etc.) to describe research and results of projects. Papers published should be long-formed essays as +opposed to short-form declarations, and can be on any topic of pure interest to the author, as long as there is non-commercial +motivation to explore and learn more about a topic. In addition to publishing tilde members' papers, we also operate as a social +space where members can participate in many ways, including (but not limited to) reviewing papers and providing constructive +criticism, responding to author questions, writing (obviously), or even simply bringing up topics to be researched. Through reviewing +and providing constructive criticism, we hope to provide a mechanism for authors to better themselves or develop their thinking about a topic.

+ diff --git a/navbar.php b/navbar.php index 547acfb..edd4ccc 100644 --- a/navbar.php +++ b/navbar.php @@ -11,15 +11,9 @@