Skip to content

Commit 0acd87b

Browse files
committedApr 3, 2020
Lots of infrastructure tweaks; two new features relating to tags.
* Add new POST_TAGS_KEY and POST_TAGS_STYLE configuration options * Convert project to TypeScript * Move from npm -> yarn * Move from request -> axios since request is now deprecated * Proper linting and formatting * Proper dev mode * Remove use of `eval`
1 parent edabd0b commit 0acd87b

11 files changed

+3216
-2579
lines changed
 

‎.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"arrowParens": "avoid",
3+
"printWidth": 120,
4+
"singleQuote": true
5+
}

‎README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ This enables you to post to your static microblog entirely using the web (for ex
1212

1313
Here's how it works:
1414

15-
* A running microstat server acts as a [Micropub](https://indieweb.org/Micropub) endpoint
16-
* When it receives a Micropub post, it writes a Markdown file to a location you configure
17-
* Once the Markdown file is written, it runs a command you configure (that would trigger something like [Jekyll](https://jekyllrb.com/) or [Hugo](https://gohugo.io/) to build and publish your microblog)
18-
* Once your microblog is updated, it sends a Webmention if your post is a reply to someone else's post
19-
* Will attempt to automatically discover the Webmention endpoint, or will use [micro.blog](https://micro.blog)'s Webmention endpoint if you're replying to a micro.blog post
20-
* If you use micro.blog, optionally ping micro.blog with your microblog's RSS/Atom/JSON feed so your posts are instantly mirrored there
15+
- A running microstat server acts as a [Micropub](https://indieweb.org/Micropub) endpoint
16+
- When it receives a Micropub post, it writes a Markdown file to a location you configure
17+
- Once the Markdown file is written, it runs a command you configure (that would trigger something like [Jekyll](https://jekyllrb.com/) or [Hugo](https://gohugo.io/) to build and publish your microblog)
18+
- Once your microblog is updated, it sends a Webmention if your post is a reply to someone else's post
19+
- Will attempt to automatically discover the Webmention endpoint, or will use [micro.blog](https://micro.blog)'s Webmention endpoint if you're replying to a micro.blog post
20+
- If you use micro.blog, optionally ping micro.blog with your microblog's RSS/Atom/JSON feed so your posts are instantly mirrored there
2121

2222
## Get Going
2323

@@ -38,13 +38,13 @@ Note that microstat doesn't need to run on the same port, or even the same serve
3838

3939
Here's how I proxy to microstat on [my microblog](https://joshdick.net/microblog):
4040

41-
1) Advertise my site's Micropub endpoint by including the following in its HTML:
41+
1. Advertise my site's Micropub endpoint by including the following in its HTML:
4242

4343
```html
4444
<link rel="micropub" href="https://joshdick.net/micropub" />
4545
```
4646

47-
2) Configure [nginx](https://nginx.org) to proxy requests sent to the advertised Micropub endpoint to a microstat server that's running on an entirely different machine/port (at `https://example.com:3141`):
47+
2. Configure [nginx](https://nginx.org) to proxy requests sent to the advertised Micropub endpoint to a microstat server that's running on an entirely different machine/port (at `https://example.com:3141`):
4848

4949
```nginx
5050
location /micropub {

‎config/config.dist

+13-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,20 @@ PUBLISH_COMMAND=/path/to/a/script
2626
# ----- Optional Configuration -----
2727

2828
# If set, Jekyll-style layout name that will be included in each post.
29-
POST_LAYOUT_NAME=microblog_post
29+
#POST_LAYOUT_NAME=microblog_post
30+
31+
# If set, controls the key that tag values will be assigned to
32+
# in the generated front matter of each post.
33+
# Defaults to `tags` if unset.
34+
#POST_TAGS_KEY=tags
35+
36+
# If set, controls the format of the tags list
37+
# in the generated front matter of each post.
38+
# Valid values are `space_delimited` or `yaml_list`.
39+
# Defaults to `space_delimited` if unset.
40+
#POST_TAGS_STYLE=space_delimited
3041

3142
# URL of an RSS/Atom/JSON feed that will contain Microblog posts after `PUBLISH_COMMAND` runs.
3243
# If set, will ping [micro.blog](https://micro.blog) with that feed, so micro.blog knows to check for new posts.
3344
# If you don't use https://micro.blog, leave this unset.
34-
MICROBLOG_PING_FEED_URL=https://example.com/microblog/rss.xml
45+
#MICROBLOG_PING_FEED_URL=https://example.com/microblog/rss.xml

‎dist/microstat.js

+208
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/microstat.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)