Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0 #245

Merged
merged 100 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
49bb0ec
Add basic Netlify CMS configuration for discussion
timwis Nov 15, 2022
08ed572
Allow grouping datasets by organization for easier navigation in Netl…
timwis Nov 16, 2022
d4f7383
Allow editing site settings in Netlify CMS
timwis Nov 16, 2022
d134854
Allow uploading organization logo
timwis Nov 18, 2022
e8d771a
Provide variable config to Netlify CMS from Jekyll
timwis Nov 18, 2022
afb8ae7
Wrap licenses.yml and categories.yml in a top-level 'items' key
timwis Nov 21, 2022
7332234
Make most fields optional in Netlify CMS form
timwis Nov 21, 2022
4f568f6
Add remaining fields in Netlify CMS form
timwis Nov 21, 2022
a29d2a7
Point 'Edit' buttons to Netlify CMS for datasets and organizations, a…
timwis Nov 21, 2022
4926e22
Support relative organization logo urls on organizations list
timwis Nov 21, 2022
84743c2
Merge branch 'gh-pages' into netlify-cms
timwis Nov 26, 2022
1dc6188
Remove built-in editing UI
timwis Nov 26, 2022
f8f196d
Rename Netlify CMS directory and config file
timwis Jan 13, 2023
0898332
Merge pull request #203 from timwis/netlify-cms
timwis Jan 13, 2023
3a9dd1e
Merge pull request #213 from timwis/remove-built-in-editing
timwis Jan 13, 2023
895c6b6
Add basic netlify config
timwis Jan 15, 2023
b028185
Add jekyll as explicit dependency
timwis Jan 16, 2023
d2090c1
Remove netlify.toml
timwis Jan 16, 2023
4a3135b
Add .ruby-version
timwis Jan 16, 2023
502cad6
Merge branch 'gh-pages' into v2
timwis Jan 17, 2023
22ee0aa
Add x86_64-linux platform to Gemfile.lock
timwis Jan 20, 2023
928ea5e
Remove default baseurl setting from _config.yml
timwis Jan 20, 2023
1c73a1e
Fix insecure content warning in sample dataset
timwis Jan 20, 2023
57e5033
Support nil baseurl in JavaScript
timwis Jan 20, 2023
b0c39be
Remove legacy config values from JavaScript
timwis Jan 20, 2023
90c1faf
Remove Netlify Identity JavaScript library
timwis Jan 22, 2023
028a579
Add Netlify deployment instructions to the README
timwis Jan 22, 2023
9ea2f7b
Merge branch 'v2' into netlify-deploy
timwis Jan 23, 2023
9b9bc98
Add netlify.toml to automatically set build command
timwis Jan 23, 2023
98a812b
Add Netlify Build plugin to generate metadata normally provided by gi…
timwis Jan 24, 2023
b8462a2
Set baseurl to empty string in _config_override.yml
timwis Jan 25, 2023
34c9dba
Save netlify branch to site.branch, and use that in editor config, de…
timwis Jan 26, 2023
7674ce7
Switch order config files are loaded in netlify build
timwis Jan 26, 2023
48e2d29
Improve readability of config generation in netlify build plugin
timwis Jan 26, 2023
722fe49
Remove instructions in README to change build command
timwis Jan 26, 2023
00458bd
Add GitHub Pages / self hosting docs
timwis Jan 27, 2023
8bba026
Merge pull request #226 from timwis/netlify-deploy
timwis Jan 27, 2023
bf9add9
Merge pull request #231 from timwis/self-host-docs
timwis Jan 27, 2023
8d22f88
Add categories list and category page template
lukemckinstry Dec 15, 2022
90d0195
Fix logos on categories list, and use site.categories on homepage
timwis Feb 2, 2023
eb73a60
Populate category datasets from basic where clause
timwis Feb 2, 2023
44a365c
Migrate _data/categories.yml into individual files in _categories col…
timwis Feb 2, 2023
78926ac
Fix edit button in category layout, and remove legacy view switcher
timwis Feb 3, 2023
035ec0f
Update Netlify CMS config to use categories collection instead of dat…
timwis Feb 3, 2023
100413f
Rename categories collection to dataset_categories
timwis Feb 6, 2023
ca6698c
Merge pull request #234 from timwis/category-pages
timwis Feb 6, 2023
4cd3ddf
Organization pages now show data without JS.
dracos Mar 28, 2018
e7346d9
Correct an if statement.
dracos Mar 28, 2018
a60ef97
Only show search filter if JS enabled.
dracos Mar 28, 2018
7f981d0
Use progressive enhancement on datasets page to ensure it works witho…
timwis Feb 7, 2023
02dca92
Move to Jekyll 4.2.2 in docker-compose
BryanQuigley Feb 6, 2023
bc8ba2c
Disable Natual language checks so build passes
BryanQuigley Feb 6, 2023
efed4bc
Merge pull request #237 from timwis/progressive-enhancement
timwis Feb 9, 2023
531b8f3
Use GitHub Actions to deploy to GitHub Pages
timwis Feb 9, 2023
c591688
Remove explicit ruby version from github actions workflow
timwis Feb 13, 2023
b950969
Fix breadcrumbs and org link
timwis Feb 13, 2023
fc0872d
Use parcel for JS bundling
timwis Feb 9, 2023
9241841
Tidy up package.json
timwis Feb 13, 2023
50fe0aa
Update package-lock.json with boilerplate package name removed
timwis Feb 14, 2023
f7f270b
Merge branch 'v2' into parcel
timwis Feb 14, 2023
3454f98
Add vendor to gitignore
lydiascarf Feb 14, 2023
4db43c5
Merge pull request #242 from lydiascarf/add-vendor-to-gitignore
timwis Feb 14, 2023
f047075
Merge branch 'v2' into parcel
timwis Feb 14, 2023
0f8c857
Merge pull request #240 from timwis/parcel
timwis Feb 14, 2023
b908355
Merge pull request #238 from timwis/github-actions-deploy-pages
timwis Feb 15, 2023
0efc107
Remove redundant breadcrumb on categories index page
timwis Feb 20, 2023
057c5c3
Merge pull request #239 from timwis/fix-breadcrumbs-and-org-link
timwis Feb 20, 2023
1e0a7bd
Add installation and running locally docs
timwis Feb 20, 2023
49254c6
Add upgrading docs
timwis Feb 21, 2023
81a7885
Add architecture docs
timwis Feb 23, 2023
bd68386
Add schema customisation docs
timwis Feb 27, 2023
dfe2132
Tidy up docs links on readme
timwis Feb 27, 2023
a1c545d
Define browser support, and add legacy browser build
timwis Feb 27, 2023
33c86db
Rename Netlify CMS references to Decap CMS
timwis Feb 28, 2023
9929675
Remove duplicate mentions of netlify cms in architecture docs
timwis Feb 28, 2023
f6831e1
Fix 'edit' URLs
timwis Feb 28, 2023
b8cfd65
Update organization link from org logo on dataset page
timwis Feb 28, 2023
ca5d08b
Remove form_template references in schema
timwis Feb 28, 2023
7d39108
Merge pull request #251 from timwis/rename-netlify-cms
timwis Mar 1, 2023
43871d5
Include editor and scripts in architecture directory listing
timwis Mar 1, 2023
bff67d4
Merge pull request #244 from timwis/versioned-docs
timwis Mar 1, 2023
d247d8a
Merge pull request #252 from timwis/fix-urls
timwis Mar 1, 2023
cd429dc
Merge pull request #250 from timwis/browser-support
timwis Mar 1, 2023
a4329e6
Fix docker spin up steps (#2)
Mar 3, 2023
d5614e9
Remove legacy authentication section from _config.yml
timwis Mar 14, 2023
a41c677
Fix git permissions so gh-pages can pull info from git-remotes
Mar 14, 2023
ac878be
Update files to exclude from build
Mar 16, 2023
abe99e3
Merge pull request #255 from timwis/remove-auth-from-config
timwis Mar 20, 2023
0d2a72c
Merge pull request #258 from timwis/v2_config_excluded_files
timwis Mar 20, 2023
e35657b
Add npm to docker container and instructions for use
Mar 16, 2023
9bca30d
Upgrade to bootstrap v5 in markup + fixes
timwis Mar 1, 2023
1a0667e
Upgrade bootstrap to v5 in package.json
Mar 20, 2023
7a9f089
Upgrade-related class name changes
Mar 20, 2023
ef72a4b
Add background back to breadcrumb
Mar 21, 2023
a481391
Drop deprecated media class
Mar 23, 2023
a281c4e
Merge pull request #260 from lydiascarf/lydiascarf/10-upgrade-to-boot…
timwis Mar 24, 2023
5de5991
Several UI Tweaks - categories, but mostly datasets page
Mar 27, 2023
7bbb321
Custom hero image
Mar 27, 2023
95f9e69
Homepage tweaks
Mar 29, 2023
758556e
Merge pull request #263 from lydiascarf/homepage-tweaks
timwis Mar 30, 2023
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
6 changes: 0 additions & 6 deletions .babelrc

This file was deleted.

2 changes: 2 additions & 0 deletions .github/super-linter.env
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
VALIDATE_ALL_CODEBASE=true
VALIDATE_CSS=false
VALIDATE_DOCKERFILE_HADOLINT=false
VALIDATE_EDITORCONFIG=false
VALIDATE_GITLEAKS=false
VALIDATE_HTML=false
VALIDATE_JAVASCRIPT_STANDARD=false
VALIDATE_JSCPD=false
VALIDATE_JSON=false
VALIDATE_MARKDOWN=false
VALIDATE_NATURAL_LANGUAGE=false
70 changes: 70 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages

on:
# Runs on pushes targeting this branch
push:
branches: [gh-pages]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Write metadata to a file Jekyll can use
env:
BRANCH: ${{ github.ref_name }}
run: |
echo "branch: $BRANCH" > _config.ci.yml
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" --config _config.ci.yml,_config.yml
env:
JEKYLL_ENV: production
PAGES_REPO_NWO: ${{ github.repository }}
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ _site
_config.dev.yml
node_modules
*.map
_config.ci.yml
.parcel-cache
vendor
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.2
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ruby:3.1-bullseye

ENV NODE_MAJOR_VERSION 18

RUN curl --silent --show-error --location --retry 5 --retry-connrefuse --retry-delay 4 https://deb.nodesource.com/setup_${NODE_MAJOR_VERSION}.x | bash - \
&& apt-get update \
&& apt-get install -y --quiet --no-install-recommends \
nodejs

ENV GEM_HOME=/usr/gem
ENV PATH="$GEM_HOME/bin/:$PATH"

RUN gem install bundler -v '2.4.3'
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1

WORKDIR /srv/jekyll
COPY Gemfile Gemfile.lock ./
RUN bundle install

# Add so gh-pages can detect git remotes
RUN git config --global --add safe.directory /srv/jekyll

CMD ["/bin/bash"]
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source "https://rubygems.org"

gem "github-pages", group: :jekyll_plugins
gem "jekyll", "~> 3.9"
gem "webrick", "~> 1.7"
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ GEM
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.17.0)
nokogiri (1.13.9-x64-mingw32)
racc (~> 1.4)
nokogiri (1.13.9-x86_64-linux)
racc (~> 1.4)
nokogiri (1.14.0)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
Expand Down Expand Up @@ -259,9 +263,11 @@ GEM
PLATFORMS
ruby
x64-mingw32
x86_64-linux

DEPENDENCIES
github-pages
jekyll (~> 3.9)
webrick (~> 1.7)

BUNDLED WITH
Expand Down
42 changes: 7 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,16 @@
# JKAN [![Build Status](https://travis-ci.org/timwis/jkan.svg?branch=gh-pages)](https://travis-ci.org/timwis/jkan) [![Join the chat at https://gitter.im/timwis/jkan](https://badges.gitter.im/timwis/jkan.svg)](https://gitter.im/timwis/jkan?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# JKAN
A lightweight, backend-free open data portal, powered by Jekyll

Open-source data portals can be really hard to install and maintain. But their
basic purpose of providing links to download data really isn't that complicated. JKAN is a proof-of-concept
that allows a small, resource-strapped government agency to stand-up an open data portal by simply
[clicking the fork button](https://help.github.com/articles/fork-a-repo/).

Please note this is still a work in progress! Check out the [issues](https://github.com/timwis/jkan/issues) to help
out or give feedback.

[Demo site](https://demo.jkan.io)

## Installation Options

1. See [Get Started](https://jkan.io/#get-started) on [jkan.io](https://jkan.io) for an installation wizard,
2. follow the [manual installation](https://github.com/timwis/jkan/wiki/Manual-Installation) instructions yourself.
3. Do a manual fork and do not install gatekeeper at all (login bits won't work, but Heroku is no longer free)

For configuration details, see the [wiki](https://github.com/timwis/jkan/wiki)

## Development
The recommended to build the site for development or making changes is docker compose. Just run ```docker compose up```

```bash
$ docker compose up
[+] Running 1/0
⠿ Container jkan-jekyll-1 Created 0.0s
Attaching to jkan-jekyll-1
jkan-jekyll-1 | ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux-musl]
jkan-jekyll-1 | Configuration file: /srv/jekyll/_config.yml
jkan-jekyll-1 | Source: /srv/jekyll
jkan-jekyll-1 | Destination: /srv/jekyll/_site
jkan-jekyll-1 | Incremental build: enabled
jkan-jekyll-1 | Generating...
jkan-jekyll-1 | done in 0.025 seconds.
jkan-jekyll-1 | Auto-regeneration: enabled for '/srv/jekyll'
jkan-jekyll-1 | Server address: http://0.0.0.0:4000/jkan/
jkan-jekyll-1 | Server running... press ctrl-c to stop.
```

Then connect to http://0.0.0.0:4000/jkan/ via a web browser.

Read more about the [Architecture](https://github.com/timwis/jkan/wiki/Architecture) on the Wiki.
## Documentation
* [Installation](docs/installation.md)
* [Upgrading](docs/upgrading.md)
* [Schema customization](docs/schema-customization.md)
* [Running locally](docs/running-locally.md)
* [Architecture](docs/architecture.md)
26 changes: 19 additions & 7 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
title: JKAN
greeting: Welcome to JKAN
description: A lightweight, backend-free open data portal, powered by Jekyll.
baseurl: /jkan
logo: /img/jkan.png
hero_image: /img/homepage-hero.jpg

# Site theme
jkan_theme: Default

# Authentication
github_client_id:
gatekeeper_host:

# Dataset schema
schema: default

Expand All @@ -20,6 +16,8 @@ navigation:
url: /datasets/
- title: Organizations
url: /organizations/
- title: Categories
url: /categories/

# Collections
collections:
Expand All @@ -29,9 +27,17 @@ collections:
organizations:
output: true
permalink: /organizations/:path/
dataset_categories:
output: true
permalink: /categories/:path/

# Collections (cont'd)
defaults:
- scope:
path: ""
type: dataset_categories
values:
layout: category
- scope:
path: ""
type: datasets
Expand Down Expand Up @@ -76,13 +82,19 @@ opengraph:

# Exclude these files from the build
exclude:
- CONTRIBUTING.md
- Dockerfile
- docker-compose.yml
- Gemfile
- Gemfile.lock
- vendor
- .travis.yml
- node_modules
- scripts/src
- package.json
- webpack.config.js
- package-lock.json
- README.md
- LICENSE
- netlify
- netlify.toml
- .parcel-cache
- docs
52 changes: 0 additions & 52 deletions _data/categories.yml

This file was deleted.

25 changes: 17 additions & 8 deletions _data/licenses.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
'https://creativecommons.org/licenses/by/4.0/': Creative Commons Attribution
'https://creativecommons.org/licenses/by-sa/4.0/': Creative Commons Attribution Share-Alike
'https://creativecommons.org/publicdomain/zero/1.0/': Creative Commons CCZero
'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/': UK Open Government Licence
'http://www.opendefinition.org/licenses/odc-by': Open Data Commons Attribution License
'http://www.opendefinition.org/licenses/odc-odbl': Open Data Commons Open Database License (ODbL)
'http://www.opendefinition.org/licenses/odc-pddl': Open Data Commons Public Domain Dedication and Licence (PDDL)
'': Not Applicable
items:
- name: Creative Commons Attribution
url: https://creativecommons.org/licenses/by/4.0/
- name: Creative Commons Attribution Share-Alike
url: https://creativecommons.org/licenses/by-sa/4.0/
- name: Creative Commons CCZero
url: https://creativecommons.org/publicdomain/zero/1.0/
- name: UK Open Government Licence
url: https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
- name: Open Data Commons Attribution License
url: http://www.opendefinition.org/licenses/odc-by
- name: Open Data Commons Open Database License (ODbL)
url: http://www.opendefinition.org/licenses/odc-odbl
- name: Open Data Commons Public Domain Dedication and Licence (PDDL)
url: http://www.opendefinition.org/licenses/odc-pddl
- name: Not Applicable
url: ""
6 changes: 0 additions & 6 deletions _data/schemas/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@ dataset_fields:
datajson: title
- field_name: organization
label: Organization
form_template: form/organization.html
datajson: publisher.name
- field_name: notes
label: Description
form_template: form/textarea.html
datajson: description
- field_name: license
label: License
form_template: form/license.html
datajson: license
- field_name: category
label: Category
form_template: form/category.html
display_template: display/category.html
datajson: category
- field_name: maintainer
Expand All @@ -38,7 +34,6 @@ resource_fields:
- field_name: format
label: Format
datajson: distribution.format
form_template: form/dropdown.html
values:
- api
- csv
Expand Down Expand Up @@ -67,4 +62,3 @@ category_fields:
label: Logo Credit
- field_name: featured
label: Featured on Homepage
form_template: form/checkbox.html
5 changes: 5 additions & 0 deletions _dataset_categories/arts-culture-history.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: Arts / Culture / History
logo: "/img/categories/arts-culture-history.svg"
featured: true
---
6 changes: 6 additions & 0 deletions _dataset_categories/budget-finance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: Budget / Finance
logo: "/img/categories/budget-finance.svg"
logo_credit: Renan Ferreira Santos from the Noun Project
featured: true
---
Loading