Skip to content

Commit e1bbde6

Browse files
authored
Merge pull request #245 from timwis/v2
Version 2.0
2 parents 372e65d + 758556e commit e1bbde6

File tree

92 files changed

+5013
-10190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+5013
-10190
lines changed

.babelrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/super-linter.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
VALIDATE_ALL_CODEBASE=true
22
VALIDATE_CSS=false
3+
VALIDATE_DOCKERFILE_HADOLINT=false
34
VALIDATE_EDITORCONFIG=false
45
VALIDATE_GITLEAKS=false
56
VALIDATE_HTML=false
67
VALIDATE_JAVASCRIPT_STANDARD=false
78
VALIDATE_JSCPD=false
89
VALIDATE_JSON=false
910
VALIDATE_MARKDOWN=false
11+
VALIDATE_NATURAL_LANGUAGE=false

.github/workflows/github-pages.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
8+
9+
on:
10+
# Runs on pushes targeting this branch
11+
push:
12+
branches: [gh-pages]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow one concurrent deployment
24+
concurrency:
25+
group: "pages"
26+
cancel-in-progress: true
27+
28+
jobs:
29+
# Build job
30+
build:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v3
35+
- name: Setup Ruby
36+
uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0
37+
with:
38+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
39+
cache-version: 0 # Increment this number if you need to re-download cached gems
40+
- name: Setup Pages
41+
id: pages
42+
uses: actions/configure-pages@v3
43+
- name: Write metadata to a file Jekyll can use
44+
env:
45+
BRANCH: ${{ github.ref_name }}
46+
run: |
47+
echo "branch: $BRANCH" > _config.ci.yml
48+
- name: Build with Jekyll
49+
# Outputs to the './_site' directory by default
50+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" --config _config.ci.yml,_config.yml
51+
env:
52+
JEKYLL_ENV: production
53+
PAGES_REPO_NWO: ${{ github.repository }}
54+
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Upload artifact
57+
# Automatically uploads an artifact from the './_site' directory by default
58+
uses: actions/upload-pages-artifact@v1
59+
60+
# Deployment job
61+
deploy:
62+
environment:
63+
name: github-pages
64+
url: ${{ steps.deployment.outputs.page_url }}
65+
runs-on: ubuntu-latest
66+
needs: build
67+
steps:
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v1

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ _site
44
_config.dev.yml
55
node_modules
66
*.map
7+
_config.ci.yml
8+
.parcel-cache
9+
vendor

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.1.2

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM ruby:3.1-bullseye
2+
3+
ENV NODE_MAJOR_VERSION 18
4+
5+
RUN curl --silent --show-error --location --retry 5 --retry-connrefuse --retry-delay 4 https://deb.nodesource.com/setup_${NODE_MAJOR_VERSION}.x | bash - \
6+
&& apt-get update \
7+
&& apt-get install -y --quiet --no-install-recommends \
8+
nodejs
9+
10+
ENV GEM_HOME=/usr/gem
11+
ENV PATH="$GEM_HOME/bin/:$PATH"
12+
13+
RUN gem install bundler -v '2.4.3'
14+
# throw errors if Gemfile has been modified since Gemfile.lock
15+
RUN bundle config --global frozen 1
16+
17+
WORKDIR /srv/jekyll
18+
COPY Gemfile Gemfile.lock ./
19+
RUN bundle install
20+
21+
# Add so gh-pages can detect git remotes
22+
RUN git config --global --add safe.directory /srv/jekyll
23+
24+
CMD ["/bin/bash"]

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
source "https://rubygems.org"
22

33
gem "github-pages", group: :jekyll_plugins
4+
gem "jekyll", "~> 3.9"
45
gem "webrick", "~> 1.7"

Gemfile.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ GEM
214214
jekyll-feed (~> 0.9)
215215
jekyll-seo-tag (~> 2.1)
216216
minitest (5.17.0)
217+
nokogiri (1.13.9-x64-mingw32)
218+
racc (~> 1.4)
219+
nokogiri (1.13.9-x86_64-linux)
220+
racc (~> 1.4)
217221
nokogiri (1.14.0)
218222
mini_portile2 (~> 2.8.0)
219223
racc (~> 1.4)
@@ -259,9 +263,11 @@ GEM
259263
PLATFORMS
260264
ruby
261265
x64-mingw32
266+
x86_64-linux
262267

263268
DEPENDENCIES
264269
github-pages
270+
jekyll (~> 3.9)
265271
webrick (~> 1.7)
266272

267273
BUNDLED WITH

README.md

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,16 @@
1-
# 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)
1+
# JKAN
22
A lightweight, backend-free open data portal, powered by Jekyll
33

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

9-
Please note this is still a work in progress! Check out the [issues](https://github.com/timwis/jkan/issues) to help
10-
out or give feedback.
11-
129
[Demo site](https://demo.jkan.io)
1310

14-
## Installation Options
15-
16-
1. See [Get Started](https://jkan.io/#get-started) on [jkan.io](https://jkan.io) for an installation wizard,
17-
2. follow the [manual installation](https://github.com/timwis/jkan/wiki/Manual-Installation) instructions yourself.
18-
3. Do a manual fork and do not install gatekeeper at all (login bits won't work, but Heroku is no longer free)
19-
20-
For configuration details, see the [wiki](https://github.com/timwis/jkan/wiki)
21-
22-
## Development
23-
The recommended to build the site for development or making changes is docker compose. Just run ```docker compose up```
24-
25-
```bash
26-
$ docker compose up
27-
[+] Running 1/0
28-
⠿ Container jkan-jekyll-1 Created 0.0s
29-
Attaching to jkan-jekyll-1
30-
jkan-jekyll-1 | ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux-musl]
31-
jkan-jekyll-1 | Configuration file: /srv/jekyll/_config.yml
32-
jkan-jekyll-1 | Source: /srv/jekyll
33-
jkan-jekyll-1 | Destination: /srv/jekyll/_site
34-
jkan-jekyll-1 | Incremental build: enabled
35-
jkan-jekyll-1 | Generating...
36-
jkan-jekyll-1 | done in 0.025 seconds.
37-
jkan-jekyll-1 | Auto-regeneration: enabled for '/srv/jekyll'
38-
jkan-jekyll-1 | Server address: http://0.0.0.0:4000/jkan/
39-
jkan-jekyll-1 | Server running... press ctrl-c to stop.
40-
```
41-
42-
Then connect to http://0.0.0.0:4000/jkan/ via a web browser.
43-
44-
Read more about the [Architecture](https://github.com/timwis/jkan/wiki/Architecture) on the Wiki.
11+
## Documentation
12+
* [Installation](docs/installation.md)
13+
* [Upgrading](docs/upgrading.md)
14+
* [Schema customization](docs/schema-customization.md)
15+
* [Running locally](docs/running-locally.md)
16+
* [Architecture](docs/architecture.md)

_config.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
title: JKAN
22
greeting: Welcome to JKAN
33
description: A lightweight, backend-free open data portal, powered by Jekyll.
4-
baseurl: /jkan
54
logo: /img/jkan.png
5+
hero_image: /img/homepage-hero.jpg
66

77
# Site theme
88
jkan_theme: Default
99

10-
# Authentication
11-
github_client_id:
12-
gatekeeper_host:
13-
1410
# Dataset schema
1511
schema: default
1612

@@ -20,6 +16,8 @@ navigation:
2016
url: /datasets/
2117
- title: Organizations
2218
url: /organizations/
19+
- title: Categories
20+
url: /categories/
2321

2422
# Collections
2523
collections:
@@ -29,9 +27,17 @@ collections:
2927
organizations:
3028
output: true
3129
permalink: /organizations/:path/
30+
dataset_categories:
31+
output: true
32+
permalink: /categories/:path/
3233

3334
# Collections (cont'd)
3435
defaults:
36+
- scope:
37+
path: ""
38+
type: dataset_categories
39+
values:
40+
layout: category
3541
- scope:
3642
path: ""
3743
type: datasets
@@ -76,13 +82,19 @@ opengraph:
7682

7783
# Exclude these files from the build
7884
exclude:
85+
- CONTRIBUTING.md
86+
- Dockerfile
87+
- docker-compose.yml
7988
- Gemfile
8089
- Gemfile.lock
8190
- vendor
82-
- .travis.yml
8391
- node_modules
8492
- scripts/src
8593
- package.json
86-
- webpack.config.js
94+
- package-lock.json
8795
- README.md
8896
- LICENSE
97+
- netlify
98+
- netlify.toml
99+
- .parcel-cache
100+
- docs

0 commit comments

Comments
 (0)