diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bf62acc..509aa092 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: ["main"] pull_request: branches: ["main"] + workflow_dispatch: permissions: contents: read @@ -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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bf7ade39..12e67e49 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,9 +3,7 @@ name: Jekyll Build and Deploy on: push: branches: ["main"] - -permissions: - contents: read + workflow_dispatch: jobs: build: @@ -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: @@ -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 diff --git a/.well-known/dat b/.well-known/dat deleted file mode 100644 index 27bcea11..00000000 --- a/.well-known/dat +++ /dev/null @@ -1,2 +0,0 @@ -dat://eae17983cd6833287ab10ff4c1a3ca5d9ae7af7049eaa525912950720ece2e49/ -TTL=3600 diff --git a/Gemfile b/Gemfile index d939802b..0f636bf2 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index 1d9cc850..78b21a15 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -138,6 +190,7 @@ PLATFORMS DEPENDENCIES html-proofer jekyll (~> 4.3.3) + jekyll-activity-pub jekyll-feed (~> 0.16) jekyll-redirect-from rake diff --git a/_config.yml b/_config.yml index 00f7afac..2ae5698c 100644 --- a/_config.yml +++ b/_config.yml @@ -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 @@ -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 \ No newline at end of file diff --git a/_data/activity_pub.yml b/_data/activity_pub.yml new file mode 100644 index 00000000..dfaf8066 --- /dev/null +++ b/_data/activity_pub.yml @@ -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 diff --git a/_layouts/default.html b/_layouts/default.html index aff841e3..32996759 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -47,6 +47,13 @@ rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.url }}" /> + {% if page.activity %} + + {% endif %} + + {%- if site.actor -%} + + {%- endif -%}
diff --git a/_posts/2024-05-28-hello-activitypub.md b/_posts/2024-05-28-hello-activitypub.md new file mode 100644 index 00000000..01e39d6f --- /dev/null +++ b/_posts/2024-05-28-hello-activitypub.md @@ -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/ \ No newline at end of file diff --git a/dat.json b/dat.json deleted file mode 100644 index ff5e2ebe..00000000 --- a/dat.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "State of Our Networks", - "author": "State of Our Networks ", - "description": "Conference about the past, present, and future of building our own network infrastructures" -} diff --git a/images/ournetworks-banner.png b/images/ournetworks-banner.png new file mode 100644 index 00000000..b17731da Binary files /dev/null and b/images/ournetworks-banner.png differ diff --git a/images/ournetworks-social.png b/images/ournetworks-social.png new file mode 100644 index 00000000..61769bf2 Binary files /dev/null and b/images/ournetworks-social.png differ