Merge pull request #23 from rtyler/preview
Seeing what tweet previews look like
This commit is contained in:
commit
fc78560885
24
Gemfile.lock
24
Gemfile.lock
|
@ -4,31 +4,31 @@ GEM
|
|||
addressable (2.7.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
colorator (1.1.0)
|
||||
concurrent-ruby (1.1.7)
|
||||
concurrent-ruby (1.1.8)
|
||||
em-websocket (0.5.2)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
eventmachine (1.2.7)
|
||||
ffi (1.13.1)
|
||||
ffi (1.14.2)
|
||||
forwardable-extended (2.6.0)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (1.8.5)
|
||||
i18n (1.8.9)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (4.1.1)
|
||||
jekyll (4.2.0)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
i18n (~> 1.0)
|
||||
jekyll-sass-converter (~> 2.0)
|
||||
jekyll-watch (~> 2.0)
|
||||
kramdown (~> 2.1)
|
||||
kramdown (~> 2.3)
|
||||
kramdown-parser-gfm (~> 1.0)
|
||||
liquid (~> 4.0)
|
||||
mercenary (~> 0.4.0)
|
||||
pathutil (~> 0.9)
|
||||
rouge (~> 3.0)
|
||||
safe_yaml (~> 1.0)
|
||||
terminal-table (~> 1.8)
|
||||
terminal-table (~> 2.0)
|
||||
jekyll-include-cache (0.2.1)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-paginate (1.1.0)
|
||||
|
@ -45,28 +45,26 @@ GEM
|
|||
kramdown-parser-gfm (1.1.0)
|
||||
kramdown (~> 2.0)
|
||||
liquid (4.0.3)
|
||||
listen (3.2.1)
|
||||
listen (3.4.1)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.4.0)
|
||||
multi_json (1.15.0)
|
||||
nuggets (1.6.0)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (4.0.6)
|
||||
pygments.rb (1.2.1)
|
||||
multi_json (>= 1.0.0)
|
||||
rake (13.0.1)
|
||||
pygments.rb (2.1.0)
|
||||
rake (13.0.3)
|
||||
rb-fsevent (0.10.4)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rdiscount (2.2.0.2)
|
||||
rexml (3.2.4)
|
||||
rouge (3.24.0)
|
||||
rouge (3.26.0)
|
||||
safe_yaml (1.0.5)
|
||||
sassc (2.4.0)
|
||||
ffi (~> 1.9)
|
||||
terminal-table (1.8.0)
|
||||
terminal-table (2.0.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
unicode-display_width (1.7.0)
|
||||
|
||||
|
|
5
Makefile
5
Makefile
|
@ -15,4 +15,7 @@ publish: tags
|
|||
find files -iname "*.png" -type f -exec pngcrush -ow -noforce -reduce {} \;
|
||||
jekyll build
|
||||
|
||||
.PHONY: all drafts tags publish
|
||||
.PHONY: all drafts tags publish microblog
|
||||
|
||||
microblog:
|
||||
_scripts/new-microblog && git add _microblog tweets && git commit --no-gpg-sign
|
||||
|
|
18
_config.yml
18
_config.yml
|
@ -12,11 +12,10 @@ plugins:
|
|||
- jekyll-include-cache
|
||||
- jekyll-seo-tag
|
||||
|
||||
gopher:
|
||||
feed: false
|
||||
tags: true
|
||||
gophermap: _gopher/index.gph
|
||||
base_path: /blog
|
||||
collections:
|
||||
microblog:
|
||||
output: true
|
||||
permalink: microblog/:year/:month/:title/
|
||||
|
||||
lsi: false
|
||||
exclude:
|
||||
|
@ -29,15 +28,6 @@ exclude:
|
|||
url: 'https://brokenco.de/'
|
||||
author: 'R. Tyler Croy'
|
||||
|
||||
# Navigation
|
||||
nav:
|
||||
- name: "about"
|
||||
href: "/about"
|
||||
- name: "code"
|
||||
href: "//github.com/rtyler"
|
||||
- name: "feed"
|
||||
href: '/atom.xml'
|
||||
|
||||
# Sass
|
||||
sass:
|
||||
style: compressed
|
||||
|
|
|
@ -2,4 +2,5 @@ pages:
|
|||
- {name: 'About', url: 'about.html'}
|
||||
- {name: 'Tags', url: 'categories'}
|
||||
- {name: 'Feed', url: 'atom.xml'}
|
||||
- {name: 'Microblog', url: 'microblog.xml'}
|
||||
- {name: 'Gopher', url: 'gopher://gopher.brokenco.de/'}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
layout: default
|
||||
title: Home
|
||||
---
|
||||
{% for post in paginator.posts %}
|
||||
|
||||
{% for post in paginator.posts %}
|
||||
<div class="post">
|
||||
<h2 id = "post-title"><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2>
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
{% include head.html %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
{% include header.html %}
|
||||
|
||||
<div class="post-container">
|
||||
<article id = "post">
|
||||
<h2 id = "post-title">{{ content }}</h2>
|
||||
|
||||
{% if site.data.settings.date-under-post.active %}
|
||||
<div class = "post-info">
|
||||
<span>
|
||||
<i class="far fa-calendar" aria-hidden="true"></i> <span>{{ page.date | date_to_string }}</span>
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{%- include footer.html -%}
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: microblog
|
||||
date: 2021-02-17 23:03:05 -0800
|
||||
title: af8d162c
|
||||
---
|
||||
Hello from a Git-powered microblog and tweet
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -xo
|
||||
|
||||
DATE_DIR=$(date +%Y/%m/%d)
|
||||
POST_TITLE=$(openssl rand 100000 | shasum | cut -c1-8)
|
||||
POST_DATE=$(date +%Y-%m-%d)
|
||||
POST_TIME=$(date +%Y-%m-%d\ %T\ %z)
|
||||
TWEET_FILE=tweets/${DATE_DIR}/${POST_TITLE}.tweet
|
||||
POST_FILE=_microblog/${DATE_DIR}/${POST_TITLE}.md
|
||||
MICROBLOG_TEMPLATE=_templates/microblog
|
||||
|
||||
mkdir -p tweets/${DATE_DIR}
|
||||
mkdir -p _microblog/${DATE_DIR}
|
||||
|
||||
vim ${TWEET_FILE}
|
||||
|
||||
cat ${MICROBLOG_TEMPLATE} | \
|
||||
sed "s/%CURRENT_DATE%/${POST_TIME}/g" | \
|
||||
sed "s/%POST_TITLE%/${POST_TITLE}/g" > ${POST_FILE} && cat ${TWEET_FILE} >> ${POST_FILE}
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
layout: microblog
|
||||
date: %CURRENT_DATE%
|
||||
title: %POST_TITLE%
|
||||
---
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
layout: null
|
||||
---
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>rtyler | Microblog</title>
|
||||
<description>Microblog of rtyler</description>
|
||||
<link>{{ site.url }}</link>
|
||||
<atom:link href="{{ site.url }}/microblog.xml" rel="self" type="application/rss+xml" />
|
||||
{% for post in site.microblog reversed limit:50 %}
|
||||
<item>
|
||||
<description>{{ post.content | xml_escape }}{% if post.external-url %}{% endif %}</description>
|
||||
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
|
||||
<link>{{ site.url }}{{ post.url }}</link>
|
||||
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
|
@ -1 +0,0 @@
|
|||
This is a test
|
|
@ -0,0 +1 @@
|
|||
Hello from a Git-powered microblog and tweet
|
Loading…
Reference in New Issue