Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Nov 10, 2023
0 parents commit 9258995
Show file tree
Hide file tree
Showing 12 changed files with 619 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Local development only
.jekyll-cache
Gemfile.lock
_site
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.3
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"
gem "github-pages"
gem "webrick", "~> 1.7"
123 changes: 123 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
title: IndieKit Sandbox

collections:
articles:
output: true
notes:
output: true
photos:
output: true
videos:
output: true
audio:
output: true
replies:
output: true
likes:
output: true
bookmarks:
output: true
checkins:
output: true
events:
output: true

defaults:
-
scope:
path: ""
type: articles
values:
layout: entry
post-type: article
permalink: /:year/:month/:day/:slug
-
scope:
path: ""
type: notes
values:
layout: entry
title: ""
post-type: note
permalink: notes/:year/:month/:day/:slug
-
scope:
path: ""
type: photos
values:
layout: entry
title: ""
post-type: photo
permalink: photos/:year/:month/:day/:slug
-
scope:
path: ""
type: videos
values:
layout: entry
title: ""
post-type: video
permalink: videos/:year/:month/:day/:slug
-
scope:
path: ""
type: audio
values:
layout: entry
title: ""
post-type: audio
permalink: audio/:year/:month/:day/:slug
-
scope:
path: ""
type: replies
values:
layout: entry
title: ""
post-type: reply
permalink: replies/:year/:month/:day/:slug
-
scope:
path: ""
type: likes
values:
layout: entry
title: ""
post-type: like
permalink: likes/:year/:month/:day/:slug
-
scope:
path: ""
type: reposts
values:
layout: entry
title: ""
post-type: repost
permalink: reposts/:year/:month/:day/:slug
-
scope:
path: ""
type: bookmarks
values:
layout: entry
post-type: bookmark
permalink: bookmarks/:year/:month/:day/:slug
-
scope:
path: ""
type: checkins
values:
layout: entry
title: ""
post-type: checkin
permalink: checkins/:year/:month/:day/:slug
-
scope:
path: ""
type: events
values:
layout: entry
post-type: event
permalink: events/:year/:month/:day/:slug

exclude: [etc]
60 changes: 60 additions & 0 deletions _includes/post-content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{% assign post = include.post %}

{% if post.video != null %}
{% for video in post.video %}
<video class="u-video" src="{{ video }}" width="640" controls loop>
<div lang="en">Looks like you can't see this video. <a href="{{ video }}" download>Download it</a> instead.</div>
</video>
{% endfor %}
{% endif %}

{% if post.photo != null %}
{% for photo in post.photo %}
<img class="u-photo" src="{{ photo.url | prepend: '/' | prepend: site.github.url }}" alt="{{ photo.alt }}" width="640" />
{% endfor %}
{% endif %}

{% if post.like-of != null %}
<h3>Like of:</h3>
<ul>
{% for like in post.like-of %}
<li><a class="u-like-of" href="{{ like }}">{{ like }}</a></li>
{% endfor %}
</ul>
{% endif %}

{% if post.repost-of != null %}
<h3>Repost of:</h3>
<ul>
{% for repost in post.repost-of %}
<li><a class="u-repost-of" href="{{ repost }}">{{ repost }}</a></li>
{% endfor %}
</ul>
{% endif %}

{% if post.in-reply-to != null %}
<h3>In reply to:</h3>
<ul>
{% for reply in post.in-reply-to %}
<li><a class="u-in-reply-to" href="{{ reply }}">{{ reply }}</a></li>
{% endfor %}
</ul>
{% endif %}

{{ post.title }}
<div class="e-content{% if post.title == '' %} p-name{% endif %}">
{% if post.content %}
{{ post.content }}
{% else %}
{{ content }}
{% endif %}
</div>

{% if post.syndication != null %}
<h3>Also posted on:</h3>
<ul>
{% for syndication in post.syndication %}
<li><a href="{{ syndication }}" class="u-syndication" {% if standalone == true %}rel="syndication"{% endif %}>{{ syndication | remove_first:'http://' | remove_first:'https://' | remove_first:'www.' }}</a></li>
{% endfor %}
</ul>
{% endif %}
27 changes: 27 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<html lang="en-gb">
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex, nofollow">
<link rel="alternate" href="/feed.json" type="application/feed+json" title="JSON Feed">
<link rel="alternate" href="/feed.jf2.json" type="application/jf2feed+json" title="JF2 Feed">
<link rel="indieauth-metadata" href="https://indiekit.up.railway.app/auth/metadata">
<link rel="micropub" href="https://indiekit.up.railway.app/micropub">
<link rel="webmention" href="https://indiekit.up.railway.app/webmention">
<link rel="pgpkey authn" href="key.txt">
<title>{% if page.title != '' %}{{ page.title }} - {% endif %}{{ site.title }}</title>

<meta property="og:title" content="{% if page.title != '' %}{{ page.title }} - {% endif %}{{ site.title }}">
{% if page.summary %}
<meta property="og:description" name="description" content="{{ page.summary }}">
{% endif %}
<meta property="og:url" content="{{ page.url }}">
{% if page.photo %}
<meta property="og:image" content="https://indiekit.up.railway.app/image/{{ page.photo[0].url }}?w=1200">
<meta property="og:image:alt" content="{{ page.photo[0].alt }}">
<meta name="twitter:card" content="summary_large_image">
{% endif %}
</head>
<body>
{{ content }}
</body>
</html>
28 changes: 28 additions & 0 deletions _layouts/entry.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
layout: default
---
<article class="h-entry">
{% if page.title != '' %}
<header>
<h1 class="p-name">
{% if page.bookmark-of %}
<a class="u-bookmark-of" href="{{ page.bookmark-of | first}}">{{ page.title }}</a>
{% elsif page.repost-of %}
<a class="u-repost-of" href="{{ page.repost-of | first}}">{{ page.title }}</a>
{% else %}
<a class="u-url" href="{{ site.github.url }}{{ page.url }}">{{ page.title }}</a>
{% endif %}
</h1>
</header>
{% endif %}
{% include post-content.html post=page %}
<footer>
<p>This {{ page['post-type'] }} was published on <a href="{{ post.url | prepend: site.github.url }}"><time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date_to_string }}</time></a>.</p>
<h3>Categories:</h3>
<ul>
{% for category in page.category %}
<li class="p-category">{{ category }}</li>
{% endfor %}
</ul>
</footer>
</article>
33 changes: 33 additions & 0 deletions feed.jf2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
layout: null
---
{
"type": "feed",
"title": "{{ site.title | xml_escape }}",
"url": "{{ "/" | absolute_url }}",
"children": [{% for post in site.documents reversed limit:20 %}{
"type": "entry",
"post-type": "{{ post['post-type'] }}",
"url": "{{ post.url | absolute_url }}",
{%- if post.title != "" %}"name": {{ post.title | jsonify }},{% endif %}
{%- if post.summary %}"summary": {{ post.summary | jsonify }},{% endif %}
"content": {
"text": {{ post.content | strip_html | strip_newlines | jsonify }},
"html": {{ post.content | strip_newlines | jsonify }}
},
{%- if post.tags.size > 0 %}"category": {{ post.tags | jsonify }},{% endif %}
{%- if post['bookmark-of'] %}"bookmark-of": {{ post['bookmark-of'] | jsonify }},{% endif %}
{%- if post['in-reply-to'] %}"in-reply-to": {{ post['in-reply-to'] | jsonify }},{% endif %}
{%- if post.photo.size > 0 %}"photo": [{% for photo in post.photo %}
{
"url": "{{ photo.url }}",
"alt": "{{ photo.alt }}",
"content-type": "image/jpg"
}{% if forloop.last == false %},{% endif %}
{% endfor %}],{% endif %}
{% if post.syndication %}"syndication": {{ post.syndication | jsonify }},{% endif %}
{%- if post['mp-syndicate-to'] %}"mp-syndicate-to": {{ post['mp-syndicate-to'] | jsonify }},{% endif %}
"published": "{{ post.date | date_to_xmlschema }}"
}{% if forloop.last == false %},{% endif %}
{%- endfor %}]
}
29 changes: 29 additions & 0 deletions feed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: null
---
{
"version": "https://jsonfeed.org/version/1.1",
"title": "{{ site.title | xml_escape }}",
"home_page_url": "{{ "/" | absolute_url }}",
"feed_url": "{{ "/feed.json" | absolute_url }}",
"items": [{% for post in site.documents reversed limit:20 %}{
"id": "{{ post.url | absolute_url }}",
"date_published": "{{ post.date | date_to_xmlschema }}",
{%- if post.title != "" %}"title": {{ post.title | jsonify }},{% endif %}
{%- if post.summary %}"summary": {{ post.summary | jsonify }},{% endif %}
"content_text": {{ post.content | strip_html | strip_newlines | jsonify }},
"content_html": {{ post.content | strip_newlines | jsonify }},
{%- if post['bookmark-of'] %}"external_url": {{ post['bookmark-of'] | jsonify }},{% endif %}
{%- if post['in-reply-to'] %}"external_url": {{ post['in-reply-to'] | jsonify }},{% endif %}
{%- if post.tags.size > 0 %}"tags": {{ post.tags | jsonify }},{% endif %}
{%- if post.photo.size > 0 %}"attachments": [{% for photo in post.photo %}
{
"url": "{{ photo.url }}",
"title": "{{ photo.alt }}",
"mime_type": "image/jpg"
}{% if forloop.last == false %},{% endif %}
{% endfor %}],{% endif %}
"url": "{{ post.url | absolute_url }}"
}{% if forloop.last == false %},{% endif %}
{%- endfor %}]
}
14 changes: 14 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: default
date: 2019-02-26T00:10:14.395+00:00
title: 'Ceci n’est pas un website'
---
{% for collection in site.collections %}
{% assign name = collection.label %}
<h1>{{ name }}</h1>
{% for item in site[name] %}
<ul>
<li><a href="{{ item.url | prepend: site.github.url }}">{{ item.date }} {{ item.title }}</a></li>
</ul>
{% endfor %}
{% endfor %}
Loading

0 comments on commit 9258995

Please sign in to comment.