Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config.toml → config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ pluralizeListTitles = false
timeout = 120000
publishDir = "public/"

[params]
description = "The Open Observatory of Network Interference (OONI) is a global community measuring internet censorship around the world. Run OONI Probe to detect internet censorship. Use OONI Explorer to track internet censorship worldwide in near real-time."

[Languages]
[Languages.ar]
[Languages.ca]
Expand All @@ -26,6 +23,9 @@ description = "The Open Observatory of Network Interference (OONI) is a global c
[Languages.my]
[Languages.kk]

[[module.imports]]
path = "github.com/privatemaker/headless-cms"

[outputFormats]
[outputFormats.PageIndex]
mediaType = "application/json"
Expand All @@ -34,7 +34,7 @@ isPlainText = true
notAlternative = true

[outputs]
home = ["HTML", "PageIndex", "RSS"]
home = ["HTML", "PageIndex", "RSS", "HeadlessCMSConfig" ]

[caches]
[caches.getjson]
Expand Down
75 changes: 75 additions & 0 deletions config/_default/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
description: "The Open Observatory of Network Interference (OONI) is a global community measuring internet censorship around the world. Run OONI Probe to detect internet censorship. Use OONI Explorer to track internet censorship worldwide in near real-time."

headless_cms:
engine: "sveltia"
site_url: "https://ooni.org"
backend:
name: "github"
repo: "ooni/ooni.org"
commit_messages:
create: "Create {{slug}} ({{collection}})"
update: "Update {{slug}} ({{collection}})"
delete: "Delete {{slug}} ({{collection}})"
uploadMedia: "Upload - {{path}}"
deleteMedia: "Delete - {{path}}"
openAuthoring: '{{message}}'
publish_mode: "simple"
media_folder: "static/images/uploads"
public_folder: "/images/uploads"
locale: "en"
slug:
encoding: "ascii"
clean_accents: true
sanitize_replacement: "-"
collections:
- name: "blog"
label: "Blog Posts"
label_singular: "Blog Post"
folder: "content/post"
path: "{{slug}}/index"
media_folder: "images"
public_folder: ""
create: true
delete: false
widget: "list"
preview_path: "post/{{slug}}"
editor:
preview: true
fields:
- label: "Title"
name: "title"
widget: "string"
- lable: "Draft"
name: "draft"
widget: "boolean"
- label: "Description"
name: "description"
widget: "string"
- label: "Author"
name: "author"
widget: "string"
- label: "Publish Date"
name: "date"
widget: "datetime"
format: "ll"
- label: "Image"
name: "thumbnail"
widget: "image"
choose_url: true
media_library:
config:
multiple: true
- label: "Body"
name: "body"
widget: "markdown"
- label: "Tags"
name: "tags"
widget: "list"
allow_add: true
- label: "Categories"
name: "categories"
widget: "select"
default: "report"
options:
- { value: "report", label: "Report" }
- { value: "blog", label: "Blog" }
4 changes: 4 additions & 0 deletions content/admin/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: OONI Website CMS
layout: headless-cms
---
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/ooni/ooni.org

go 1.21.1

require github.com/privatemaker/headless-cms v0.1.1 // indirect
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/privatemaker/headless-cms v0.1.1 h1:pYDKvV8ZmgrAaH5WTtKP1TrwpIXSj3t9u72sTfCxDWE=
github.com/privatemaker/headless-cms v0.1.1/go.mod h1:ZcHkPZzL9yCsBdmn9FpoIW35snTyj1bDOfqT0ZFJoZE=
1 change: 1 addition & 0 deletions scripts/build_website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ fi
echo "Using BASE_URL=$BASE_URL"
npm install
mkdir -p public/
hugo mod get -u
hugo --minify --buildDrafts --baseURL="$BASE_URL"
cp static/googlec8ce605468a38232.html public/
cp static/robots.txt public/
Expand Down