Update .gitignore, add Docker Compose configuration, and set up Decap CMS for content management
This commit is contained in:
parent
cb38de2a26
commit
c27c634740
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,4 +6,6 @@
|
||||
|
||||
# AI generated content
|
||||
CLAUDE.md
|
||||
|
||||
# Content is on separate repository
|
||||
content/
|
||||
|
6
README
6
README
@ -2,12 +2,6 @@
|
||||
|
||||
This is the source code for https://wiki.cafe.
|
||||
|
||||
# TODO:
|
||||
- [ ] Implement dark mode
|
||||
- [ ] Proper typography. Potentially use clamp. Research appropriate proportions.
|
||||
- [ ] Add links to other sites.
|
||||
- [ ] Support adding modification date to pages.
|
||||
|
||||
## Reference
|
||||
|
||||
Serve Hugo site with Docker
|
||||
|
@ -1,4 +0,0 @@
|
||||
|
||||
services:
|
||||
hugo:
|
||||
image: hugomods/hugo:base-non-root-0.145.0
|
60
compose.yaml
Normal file
60
compose.yaml
Normal file
@ -0,0 +1,60 @@
|
||||
services:
|
||||
|
||||
hugo:
|
||||
image: hugomods/hugo:base-non-root-0.145.0
|
||||
volumes:
|
||||
- project:/src/site
|
||||
- content:/src/site/content
|
||||
- public:/src/site/public
|
||||
networks:
|
||||
- proxy
|
||||
command: 'hugo server -D -M -s site --bind="0.0.0.0" -b="https://draft.wiki.cafe" --appendPort=false'
|
||||
# command: 'tail -f /dev/null'
|
||||
deploy:
|
||||
update_config:
|
||||
failure_action: rollback
|
||||
order: start-first
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.services.apex_site.loadbalancer.server.port=1313"
|
||||
- "traefik.http.routers.apex_site.rule=Host(`draft.wiki.cafe`)"
|
||||
- "traefik.http.routers.apex_site.entrypoints=web-secure"
|
||||
- "traefik.http.routers.apex_site.tls.certresolver=production"
|
||||
- "caddy=https://draft.wiki.cafe"
|
||||
- "caddy.reverse_proxy={{upstreams 1313}}"
|
||||
- "caddy.tls.on_demand="
|
||||
|
||||
web-server:
|
||||
image: nginx:1.23-alpine
|
||||
volumes:
|
||||
- public:/usr/share/nginx/html:ro
|
||||
networks:
|
||||
- proxy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 15s
|
||||
deploy:
|
||||
update_config:
|
||||
failure_action: rollback
|
||||
order: start-first
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.services.apex_wiki_cafe.loadbalancer.server.port=80"
|
||||
- "traefik.http.routers.apex_wiki_cafe.rule=Host(`wiki.cafe`)"
|
||||
- "traefik.http.routers.apex_wiki_cafe.entrypoints=web-secure"
|
||||
- "traefik.http.routers.apex_wiki_cafe.tls.certresolver=production"
|
||||
- "caddy=https://wiki.cafe"
|
||||
- "caddy.reverse_proxy={{upstreams 80}}"
|
||||
- "caddy.tls.on_demand="
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
project:
|
||||
content:
|
||||
public:
|
21
static/admin/config.yml
Normal file
21
static/admin/config.yml
Normal file
@ -0,0 +1,21 @@
|
||||
backend:
|
||||
name: gitea
|
||||
base_url: https://git.coopcloud.tech
|
||||
repo: wiki-cafe/wiki.cafe-content
|
||||
branch: main
|
||||
api_root: /api/v1
|
||||
auth_endpoint: /login/oauth/authorize
|
||||
app_id: e2117eef-a201-4eb6-9885-170c799b515b
|
||||
media_folder: static/img
|
||||
public_folder: /img
|
||||
collections:
|
||||
- name: "pages"
|
||||
label: "Pages"
|
||||
folder: "/pages"
|
||||
create: true
|
||||
slug: "{{slug}}"
|
||||
fields:
|
||||
- { label: "Title", name: "title", widget: "string" }
|
||||
- { label: "Date", name: "date", widget: "datetime" }
|
||||
- { label: "Body", name: "body", widget: "markdown" }
|
||||
- { label: "Tags", name: "tags", widget: "list" }
|
13
static/admin/index.html
Normal file
13
static/admin/index.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="robots" content="noindex" />
|
||||
<title>Content Manager</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the script that builds the page and powers Decap CMS -->
|
||||
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user