Skip to content

Commit

Permalink
Social inbox (#294)
Browse files Browse the repository at this point in the history
* add social inbox

* add social inbox
  • Loading branch information
garrying committed May 30, 2024
1 parent 2493834 commit 084388a
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 16 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read
Expand All @@ -19,8 +20,10 @@ jobs:
with:
ruby-version: "3.3"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Decode Production Key
run: echo ${{ secrets.ENCODED_DP_AP_KEY }} | base64 --decode > /tmp/secret.key
- name: Build site
run: bundle exec jekyll build
run: bundle exec jekyll build --key /tmp/secret.key
- name: Cache HTMLProofer
id: cache-htmlproofer
uses: actions/cache@v4
Expand Down
33 changes: 29 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: Jekyll Build and Deploy
on:
push:
branches: ["main"]

permissions:
contents: read
workflow_dispatch:

jobs:
build:
Expand All @@ -18,8 +16,10 @@ jobs:
with:
ruby-version: "3.3"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Decode Production Key
run: echo ${{ secrets.ENCODED_DP_AP_KEY }} | base64 --decode > /tmp/secret.key
- name: Build site
run: bundle exec jekyll build
run: bundle exec jekyll build --key /tmp/secret.key
- uses: actions/cache@v4
id: build-cache
with:
Expand Down Expand Up @@ -69,3 +69,28 @@ jobs:
deploy_http: true
deploy_hyper: true
deploy_ipfs: true

notify-ap:
name: Notify AcitivityPub
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Decode Production Key
run: echo ${{ secrets.ENCODED_DP_AP_KEY }} | base64 --decode > /tmp/secret.key
- name: Build site
run: bundle exec jekyll build --key /tmp/secret.key
- name: Notify AP
run: bundle exec jekyll notify --key /tmp/secret.key --verbose --trace
- name: Commit ActivityPub Data
uses: EndBug/add-and-commit@v9
with:
add: '_data/activity_pub.yml'
default_author: github_actions
message: 'Commit ActivityPub Data'
fetch: true
2 changes: 0 additions & 2 deletions .well-known/dat

This file was deleted.

1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ end
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.16"
gem "jekyll-redirect-from"
gem 'jekyll-activity-pub', require: 'jekyll/activity_pub/commands'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
Expand Down
53 changes: 53 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,49 @@ GEM
io-event (~> 1.5, >= 1.5.1)
timers (~> 4.1)
bigdecimal (3.1.7)
climate_control (1.2.0)
colorator (1.1.0)
concurrent-ruby (1.2.3)
console (1.23.6)
fiber-annotation
fiber-local
json
csv (3.3.0)
distributed-press-api-client (0.4.2)
addressable (~> 2.3, >= 2.3.0)
climate_control
dry-schema
httparty (~> 0.18)
httparty-cache (~> 0.0.6)
json (~> 2.1, >= 2.1.0)
jwt (~> 2.6.0)
dry-configurable (1.1.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-core (1.0.1)
concurrent-ruby (~> 1.0)
zeitwerk (~> 2.6)
dry-inflector (1.0.0)
dry-initializer (3.1.1)
dry-logic (1.5.0)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-schema (1.13.4)
concurrent-ruby (~> 1.0)
dry-configurable (~> 1.0, >= 1.0.1)
dry-core (~> 1.0, < 2)
dry-initializer (~> 3.0)
dry-logic (>= 1.4, < 2)
dry-types (>= 1.7, < 2)
zeitwerk (~> 2.6)
dry-types (1.7.2)
bigdecimal (~> 3.0)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0)
dry-inflector (~> 1.0)
dry-logic (~> 1.4)
zeitwerk (~> 2.6)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
Expand Down Expand Up @@ -44,6 +81,12 @@ GEM
yell (~> 2.0)
zeitwerk (~> 2.5)
http_parser.rb (0.8.0)
httparty (0.22.0)
csv
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
httparty-cache (0.0.6)
httparty (~> 0.18)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
io-event (1.5.1)
Expand All @@ -63,6 +106,10 @@ GEM
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-activity-pub (0.2.9)
distributed-press-api-client (~> 0.4.2)
jekyll (~> 4)
marcel (~> 1)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-redirect-from (0.16.0)
Expand All @@ -72,6 +119,7 @@ GEM
jekyll-watch (2.2.1)
listen (~> 3.0)
json (2.7.2)
jwt (2.6.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
Expand All @@ -80,7 +128,11 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
marcel (1.0.4)
mercenary (0.4.0)
mini_mime (1.1.5)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
nokogiri (1.16.5-arm-linux)
racc (~> 1.4)
nokogiri (1.16.5-arm64-darwin)
Expand Down Expand Up @@ -138,6 +190,7 @@ PLATFORMS
DEPENDENCIES
html-proofer
jekyll (~> 4.3.3)
jekyll-activity-pub
jekyll-feed (~> 0.16)
jekyll-redirect-from
rake
Expand Down
34 changes: 30 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ sass:
style: compressed
markdown: kramdown
plugins:
- jekyll-activity-pub
- jekyll-activity-pub-absolute-assets
- jekyll-activity-pub-link-iframes
- jekyll-activity-pub-assets-as-attachments
- jekyll-activity-pub-fep-fffd-distributed-press
- jekyll-feed
- jekyll-redirect-from

Expand All @@ -37,8 +42,29 @@ plugins:
# - vendor/gems/
# - vendor/ruby/

# Keep files (Dat files)
keep_files: [.dat]
exclude:
- tmp

# Include files (Dat files)
include: [.well-known]
locale: "en"

activity_pub:
url: "https://social.ournetworks.ca"
hostname: "ournetworks.ca"
username: "orga"
public_name: "Our Networks"
icons:
- "images/ournetworks-social.png"
images:
- "images/ournetworks-banner.png"

collections:
posts:
permalink: /posts/:title/

defaults:
-
scope:
type: posts
values:
layout: "default"
activity: true
8 changes: 8 additions & 0 deletions _data/activity_pub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
notifications:
posts/hello-activitypub.jsonld:
action: create
id: https://ournetworks.ca/posts/hello-activitypub.jsonld
actor_url: https://ournetworks.ca/about.jsonld
actor: "@orga@ournetworks.ca"
public_key_url: https://ournetworks.ca/about.jsonld#main-key
7 changes: 7 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
rel="canonical"
href="{{ page.url | replace:'index.html','' | prepend: site.url }}"
/>
{% if page.activity %}
<link href="{{ page.activity.url | absolute_url }}" rel="alternate" type="application/activity+json" />
{% endif %}
<meta property="profile:username" content="{{ site.activity_pub_profile }}" />
{%- if site.actor -%}
<link rel="me" href="{{ site.actor.url | absolute_url }}" />
{%- endif -%}
</head>
<body class="bg-beige">
<main class="max-w-prose mx-auto">
Expand Down
12 changes: 12 additions & 0 deletions _posts/2024-05-28-hello-activitypub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "Hello ActivityPub!"
date: 2024-05-28 21:26:10 -0400
---

We're doing another #ournetworks 🌻

Meet us IRL in Vancouver on July 27 for...

Our Networks 2024: Does not (cloud) compute.

Think: #localfirst x #permacomputing x #solarservers x hanging out on a LAN together to collectively explore what collaboration and online presence looks like when a network is optional -- https://ournetworks.ca/
5 changes: 0 additions & 5 deletions dat.json

This file was deleted.

Binary file added images/ournetworks-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ournetworks-social.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 084388a

Please sign in to comment.