Compare commits
21 Commits
07b6ba2ae5
...
staging
Author | SHA1 | Date | |
---|---|---|---|
3428aab0de | |||
150a7127cc | |||
21431bc420 | |||
224f5a509a | |||
14303d6b28 | |||
af6809bab6 | |||
67bb78d0f2 | |||
1a7cba18ff | |||
00a7b14efa | |||
36238a8e87 | |||
24d730631b | |||
6d564675fa | |||
b65877595d | |||
4cf125f349 | |||
01a66409cb | |||
322b2b8092 | |||
c1042a40bc | |||
efac2d6664 | |||
8cebecbbfd | |||
dfffae35b2 | |||
cc07af72c5 |
35
.drone.yml
Normal file
35
.drone.yml
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: publish pipeline
|
||||
steps:
|
||||
- name: publish jekyll container
|
||||
image: plugins/docker
|
||||
settings: &docker-build-settings
|
||||
username: 3wordchant
|
||||
password:
|
||||
from_secret: git_autonomic_zone_token_3wc
|
||||
repo: git.autonomic.zone/autonomic-cooperative/kcl-site
|
||||
auto_tag: true
|
||||
registry: git.autonomic.zone
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
exclude:
|
||||
- custom
|
||||
|
||||
- name: deploy-site
|
||||
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
|
||||
settings:
|
||||
stack: kcl_smallclients_autonomic_zone
|
||||
host: smallclients.autonomic.zone
|
||||
compose: docker-compose.yml
|
||||
deploy_key:
|
||||
from_secret: drone_ssh_smallclients.autonomic.zone
|
||||
environment:
|
||||
DOMAIN: kcl.smallclients.autonomic.zone
|
||||
STACK_NAME: kcl_smallclients_autonomic_zone
|
||||
NGINX_CONF_VERSION: v2
|
||||
REPOSITORY: "autonomic-cooperative/kcl-site"
|
||||
depends_on:
|
||||
- publish jekyll container
|
25
.github/workflows/deploy.yml
vendored
25
.github/workflows/deploy.yml
vendored
@ -1,25 +0,0 @@
|
||||
name: GitHub Pages Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.0'
|
||||
bundler-cache: true
|
||||
- name: Build site
|
||||
run: bundle exec rake build
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./_site
|
||||
cname: digitalgarden.hypha.coop
|
12
.github/workflows/js-lint.yml
vendored
12
.github/workflows/js-lint.yml
vendored
@ -1,12 +0,0 @@
|
||||
name: JS Lint
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14.16.0'
|
||||
- run: npm install standard
|
||||
- run: npx standard
|
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
@ -1,19 +0,0 @@
|
||||
name: HTMLProofer
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ruby-version: ['2.7', '3.0']
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby-version }}
|
||||
bundler-cache: true
|
||||
- name: Install Curl
|
||||
run: sudo apt install libcurl4-openssl-dev
|
||||
- name: Run tests
|
||||
run: bundle exec rake
|
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@ -0,0 +1,35 @@
|
||||
# Stage 1: Build the Jekyll site
|
||||
FROM ruby:3.0.0 AS builder
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install the specific version of Bundler
|
||||
RUN gem install bundler:2.2.13
|
||||
|
||||
WORKDIR /srv/jekyll
|
||||
|
||||
# Copy Gemfile and Gemfile.lock and install dependencies
|
||||
COPY Gemfile Gemfile.lock ./
|
||||
RUN bundle _2.2.13_ install
|
||||
|
||||
# Copy the rest of the application files
|
||||
COPY . .
|
||||
|
||||
# Build the Jekyll site
|
||||
RUN jekyll build -d /dist
|
||||
|
||||
# Stage 2: Serve the Jekyll site using Nginx
|
||||
FROM nginx:1.26.0
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
# Copy the generated site from the builder stage
|
||||
COPY --from=builder /dist .
|
||||
|
||||
# Expose port 80 for the web server
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
30
Dockerfile.dev
Normal file
30
Dockerfile.dev
Normal file
@ -0,0 +1,30 @@
|
||||
FROM ruby:3.0.0 as jekyll
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# used in the jekyll-server image, which is FROM this image
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
|
||||
RUN gem update --system && gem install jekyll && gem cleanup
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
WORKDIR /site
|
||||
|
||||
ENTRYPOINT [ "jekyll" ]
|
||||
|
||||
CMD [ "--help" ]
|
||||
|
||||
# build from the image we just built with different metadata
|
||||
FROM jekyll as jekyll-serve
|
||||
|
||||
COPY --from=jekyll /usr/local/bin/docker-entrypoint.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
# on every container start, check if Gemfile exists and warn if it's missing
|
||||
ENTRYPOINT [ "docker-entrypoint.sh" ]
|
||||
|
||||
CMD [ "bundle", "exec", "jekyll", "serve", "--force_polling", "-H", "0.0.0.0", "-P", "4000" ]
|
2
Gemfile
2
Gemfile
@ -33,3 +33,5 @@ gem 'wdm', '~> 0.1.1', platforms: %i[mingw x64_mingw mswin]
|
||||
gem 'html-proofer', '~> 3.19'
|
||||
|
||||
gem 'rake', '~> 13.0'
|
||||
|
||||
gem 'webrick'
|
||||
|
@ -99,6 +99,7 @@ GEM
|
||||
typhoeus (1.4.0)
|
||||
ethon (>= 0.9.0)
|
||||
unicode-display_width (1.7.0)
|
||||
webrick (1.8.1)
|
||||
yell (2.2.2)
|
||||
|
||||
PLATFORMS
|
||||
@ -115,6 +116,7 @@ DEPENDENCIES
|
||||
tzinfo (~> 1.2)
|
||||
tzinfo-data
|
||||
wdm (~> 0.1.1)
|
||||
webrick
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.13
|
||||
|
10
README.md
10
README.md
@ -1,6 +1,6 @@
|
||||
# Digital Garden
|
||||
|
||||
A public notebook / digital garden for King's College London's digital humanities department.
|
||||
A digital garden for King's College London's [Centre for Digital Culture](https://www.kcl.ac.uk/research/cdc).
|
||||
|
||||
Based on [Hypha's digital garden for The Bentway's Digital and/as Public Space Micro-residency](https://digitalgarden.hypha.coop).
|
||||
|
||||
@ -16,8 +16,14 @@ Based on [Hypha's digital garden for The Bentway's Digital and/as Public Space M
|
||||
- [D3.js](https://d3js.org/), a JavaScript library for visualizing data
|
||||
+ Initial knowledge graph implementation from the [Digital garden Jekyll template](https://github.com/maximevaillancourt/digital-garden-jekyll-template)
|
||||
- [Jekyll Feed plugin](https://github.com/hyphacoop/jekyll-feed), a plugin for Jekyll to generate an RSS feed
|
||||
- [Jekyll serve](https://github.com/BretFisher/jekyll-serve) by Brett Fisher
|
||||
|
||||
## Development
|
||||
### Using docker
|
||||
1. Run `docker compose -f docker-compose.dev.yml up`
|
||||
2. Visit your `localhost` on port `4000`: http://localhost:4000 or http://0.0.0.0:4000
|
||||
|
||||
### Using jekyll
|
||||
1. Clone repository: `git clone ssh://git@git.autonomic.zone:2222/autonomic-cooperative/kcl-digital-humanities-garden.git`
|
||||
2. Install ruby's command line tools with your package manager (e.g. `brew install ruby`)
|
||||
3. Install Bundler gem: `gem install bundler`
|
||||
@ -29,3 +35,5 @@ Based on [Hypha's digital garden for The Bentway's Digital and/as Public Space M
|
||||
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Digital Garden</span> content is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
|
||||
|
||||
All code at <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/hyphacoop/digitalgarden/" property="cc:attributionName" rel="cc:attributionURL">github.com/hyphacoop/digitalgarden/</a> is licensed under a <a rel="license" href="https://www.gnu.org/licenses/gpl.html">GNU General Public License v3.0</a>, the text of which is included in the repository [here](https://github.com/hyphacoop/digitalgarden/blob/main/LICENSE).
|
||||
|
||||
## Local docker
|
23
_notes/about.md
Normal file
23
_notes/about.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
layout: page
|
||||
title: about
|
||||
---
|
||||
|
||||
[](https://www.kcl.ac.uk/research/cdc)
|
||||
|
||||
This is a digital garden for the [Centre for Digital Culture (CDC)](https://www.kcl.ac.uk/research/cdc) at [King's College London](https://kcl.ac.uk/).
|
||||
|
||||
The Centre for Digital Culture is an interdisciplinary research centre promoting research and public engagement with digital culture, including the dynamics and practices, imaginaries and materialities, interactions and infrastructures, forms and formats that accompany the web, social media and networked digital devices. Through our projects and activities we support critical inquiry both with and about digital technologies across disciplines, languages, regions and online spaces.
|
||||
|
||||
The Centre for Digital Culture is part of the [Digital Futures Institute](https://www.kcl.ac.uk/dfi).
|
||||
|
||||
|
||||
## website credits
|
||||
|
||||
The website was developed with the [Autonomic cooperative](https://autonomic.zone/) drawing on a [digital garden project](https://thebentway.ca/stories/digital-and-as-public-space/) from [Hypha](https://hypha.coop/), a worker co-operative based in Toronto.
|
||||
|
||||
It uses the following open source components:
|
||||
- **[Anthony](http://velvetyne.fr/fonts/anthony/)** - a typeface designed by [Sun Young Oh](https://www.sunyoungoh.com/) and inspired from artworks by British sculptor Anthony Caro. The form of this typeface comes from his sculptures that are leaning against each other. Anthony is licensed under the [SIL Open Font License v1.1](http://scripts.sil.org/OFL)
|
||||
- **[Work Sans](https://github.com/weiweihuanghuang/Work-Sans)** - a typeface designed by [Wei Huang](http://charlix.cx/) based loosely on early Grotesques. Work Sans was made in part on the stolen lands of the Wurundjeri and Boon Wurrung people of the Kulin nations. Work Sans is licensed under the [SIL Open Font License v1.1](http://scripts.sil.org/OFL)
|
||||
- **[Tachyons](https://tachyons.io/)** - a modular CSS library with a few extended features.
|
||||
- **[D3.js](https://d3js.org/)** - a JavaScript library for visualizing data. D3.js was used to create the interactive knowledge graph. Originally from [Digital garden Jekyll template](https://github.com/maximevaillancourt/digital-garden-jekyll-template) by Maxime Vaillancourt.
|
File diff suppressed because one or more lines are too long
23
about.md
Normal file
23
about.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
layout: page
|
||||
title: about
|
||||
---
|
||||
|
||||
[](https://www.kcl.ac.uk/research/cdc)
|
||||
|
||||
This is a digital garden for the [Centre for Digital Culture (CDC)](https://www.kcl.ac.uk/research/cdc) at [King's College London](https://kcl.ac.uk/).
|
||||
|
||||
The Centre for Digital Culture is an interdisciplinary research centre promoting research and public engagement with digital culture, including the dynamics and practices, imaginaries and materialities, interactions and infrastructures, forms and formats that accompany the web, social media and networked digital devices. Through our projects and activities we support critical inquiry both with and about digital technologies across disciplines, languages, regions and online spaces.
|
||||
|
||||
The Centre for Digital Culture is part of the [Digital Futures Institute](https://www.kcl.ac.uk/dfi).
|
||||
|
||||
|
||||
## website credits
|
||||
|
||||
The website was developed with the [Autonomic cooperative](https://autonomic.zone/) drawing on a [digital garden project](https://thebentway.ca/stories/digital-and-as-public-space/) from [Hypha](https://hypha.coop/), a worker co-operative based in Toronto.
|
||||
|
||||
It uses the following open source components:
|
||||
- **[Anthony](http://velvetyne.fr/fonts/anthony/)** - a typeface designed by [Sun Young Oh](https://www.sunyoungoh.com/) and inspired from artworks by British sculptor Anthony Caro. The form of this typeface comes from his sculptures that are leaning against each other. Anthony is licensed under the [SIL Open Font License v1.1](http://scripts.sil.org/OFL)
|
||||
- **[Work Sans](https://github.com/weiweihuanghuang/Work-Sans)** - a typeface designed by [Wei Huang](http://charlix.cx/) based loosely on early Grotesques. Work Sans was made in part on the stolen lands of the Wurundjeri and Boon Wurrung people of the Kulin nations. Work Sans is licensed under the [SIL Open Font License v1.1](http://scripts.sil.org/OFL)
|
||||
- **[Tachyons](https://tachyons.io/)** - a modular CSS library with a few extended features.
|
||||
- **[D3.js](https://d3js.org/)** - a JavaScript library for visualizing data. D3.js was used to create the interactive knowledge graph. Originally from [Digital garden Jekyll template](https://github.com/maximevaillancourt/digital-garden-jekyll-template) by Maxime Vaillancourt.
|
BIN
assets/images/cdc.webp
Normal file
BIN
assets/images/cdc.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
12
docker-compose.dev.yml
Normal file
12
docker-compose.dev.yml
Normal file
@ -0,0 +1,12 @@
|
||||
# no version needed since 2020
|
||||
|
||||
services:
|
||||
jekyll:
|
||||
image: git.autonomic.zone/autonomic-cooperative/kcl-site-dev:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.dev
|
||||
volumes:
|
||||
- .:/site
|
||||
ports:
|
||||
- '4000:4000'
|
37
docker-compose.yml
Normal file
37
docker-compose.yml
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: git.autonomic.zone/autonomic-cooperative/kcl-site:latest
|
||||
networks:
|
||||
- proxy
|
||||
volumes:
|
||||
- html_content:/usr/share/nginx/html
|
||||
configs:
|
||||
- source: nginx_conf
|
||||
target: /etc/nginx/nginx.conf
|
||||
deploy:
|
||||
update_config:
|
||||
failure_action: rollback
|
||||
order: start-first
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.services.${STACK_NAME}-jekyll.loadbalancer.server.port=80"
|
||||
- "traefik.http.routers.${STACK_NAME}-jekyll.rule=Host(`${DOMAIN}`)"
|
||||
- "traefik.http.routers.${STACK_NAME}-jekyll.entrypoints=web-secure"
|
||||
- "traefik.http.routers.${STACK_NAME}-jekyll.tls.certresolver=production"
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
internal:
|
||||
|
||||
volumes:
|
||||
html_content:
|
||||
|
||||
configs:
|
||||
nginx_conf:
|
||||
name: ${STACK_NAME}_nginx_conf_${NGINX_CONF_VERSION}
|
||||
file: nginx.conf
|
||||
template_driver: golang
|
19
docker-entrypoint.sh
Normal file
19
docker-entrypoint.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ ! -f Gemfile ]; then
|
||||
echo "NOTE: hmm, I don't see a Gemfile so I don't think there's a jekyll site here"
|
||||
echo "Either you didn't mount a volume, or you mounted it incorrectly."
|
||||
echo "Be sure you're in your jekyll site root and use something like this to launch"
|
||||
echo ""
|
||||
echo "docker run -p 4000:4000 -v \$(pwd):/site bretfisher/jekyll-serve"
|
||||
echo ""
|
||||
echo "NOTE: To create a new site, you can use the sister image bretfisher/jekyll like:"
|
||||
echo ""
|
||||
echo "docker run -v \$(pwd):/site bretfisher/jekyll new ."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
bundle install --retry 5 --jobs 20
|
||||
|
||||
exec "$@"
|
36
nginx.conf
Normal file
36
nginx.conf
Normal file
@ -0,0 +1,36 @@
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
location /error_page.html {
|
||||
internal;
|
||||
}
|
||||
|
||||
location ~* \.(jpg|jpeg|png|gif|ico|css|js|htm|html)$ {
|
||||
root /usr/share/nginx/html;
|
||||
expires 30d;
|
||||
add_header Pragma public;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
error_page 404 /error_page.html;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user