Skip to content

Commit ef63bdf

Browse files
authored
Merge branch 'master' into patch-1
2 parents a66e583 + 9515d8e commit ef63bdf

Some content is hidden

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

54 files changed

+470
-2668
lines changed

.github/workflows/check.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Check Hugo build
2+
3+
on:
4+
# Runs on pushes targeting any branch and on pull requests
5+
push:
6+
pull_request:
7+
schedule:
8+
# rebuild every day at 2:13 UTC, to apply any change to the crosswalk
9+
# table made in https://github.com/codemeta/codemeta
10+
- cron: "13 2 * * *"
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
jobs:
16+
# Build job
17+
build:
18+
runs-on: ubuntu-latest
19+
env:
20+
HUGO_VERSION: 0.108.0
21+
steps:
22+
- name: Install Hugo CLI
23+
run: |
24+
DEBIAN_FRONTEND=noninteractive sudo apt-get update -y -qq
25+
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y hugo
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
- name: Prepare data files
29+
run: |
30+
make
31+
- name: Build with Hugo
32+
run: |
33+
hugo

.github/workflows/deploy.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Deploy Hugo site to GitHub Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["master"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
# Build job
25+
build:
26+
runs-on: ubuntu-latest
27+
env:
28+
HUGO_VERSION: 0.108.0
29+
steps:
30+
- name: Install Hugo CLI
31+
run: |
32+
DEBIAN_FRONTEND=noninteractive sudo apt-get update -y -qq
33+
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y hugo
34+
- name: Checkout
35+
uses: actions/checkout@v3
36+
- name: Setup Pages
37+
id: pages
38+
uses: actions/configure-pages@v3
39+
- name: Prepare data files
40+
run: |
41+
make
42+
- name: Build with Hugo
43+
env:
44+
# For maximum backward compatibility with Hugo modules
45+
HUGO_ENVIRONMENT: production
46+
HUGO_ENV: production
47+
run: |
48+
hugo \
49+
--minify \
50+
--baseURL "${{ steps.pages.outputs.base_url }}/"
51+
- name: Upload artifact
52+
uses: actions/upload-pages-artifact@v1
53+
with:
54+
path: ../website
55+
56+
# Deployment job
57+
deploy:
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
runs-on: ubuntu-latest
62+
needs: build
63+
steps:
64+
- name: Deploy to GitHub Pages
65+
id: deployment
66+
uses: actions/deploy-pages@v2
67+

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
all: data/crosswalk.json
2+
3+
# Download the latest crosswalk
4+
data/crosswalk.csv:
5+
wget https://github.com/codemeta/codemeta/raw/master/crosswalk.csv -O data/crosswalk.csv
6+
7+
# Convert crosswalk.csv to crosswalk.json so Hugo can parse it
8+
data/crosswalk.json: data/crosswalk.csv
9+
python3 scripts/crosswalk_to_json.py

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# CodeMeta Website
22

3-
This website is written in [Hugo](https://hugodocs.info). Hugo is the static website engine behind the wonderful RStudio package `blogdown`, and is fast, popular, and easy to install and theme. See the [Hugo docs](https://hugodocs.info) for a quick orientation on how the site is organized. `blogdown` makes it easy to run Hugo from the RStudio editor and include R code in `.Rmd` content in Hugo sites.
3+
This website is written in [Hugo](https://hugodocs.info). Hugo is a static website engine, which is fast, popular, and easy to install and theme. See the [Hugo docs](https://hugodocs.info) for a quick orientation on how the site is organized.
44

5-
To build and preview the site from RStudio, just use `blogdown::serve_site()`. `blogdown::install_hugo()` will get you set up the first time.
5+
Before building the site, you should run the `make` command, in order to download the crosswalk locally; which is used by Hugo to generate the content of crosswalk pages.
66

7-
Hugo source files are located on the `hugo` branch of the `codemeta.github.io` repository (now the default branch on GitHub). So far we haven't set up automated builds, so deploying static sites on `*.github.io` repos is still a nuciance since the website must be on `master` branch. Building this repo will create and write the static site to `../website`. I recommend setting the upstream origin of `website` to `codemeta.github.io` master branch (e.g. checkout the master branch and copy `.git` dir into `website/` to deploy.)s
7+
Then, at your option:
8+
9+
* To build the site to `../website`, run `hugo`. You may then open that folder in your browser, or
10+
* To previous the site directly without RStudio, run `hugo serve`, which will make the site available at http://localhost:1313/

config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,8 @@ publishDir = "../website"
6464
width = 50
6565
height = 50
6666
alt = "Logo"
67+
68+
[markup]
69+
[markup.goldmark]
70+
[markup.goldmark.renderer]
71+
unsafe = true

content/crosswalk/R.Rmd

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

content/crosswalk/R.html

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

content/crosswalk/R.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "Crosswalk for R Packages"
3+
image: "/img/R.png"
4+
date: "2017-06-01"
5+
---
6+
7+
The following table displays the crosswalk mapping of terms from the R package DESCRIPTION file to codemeta properties.
8+
9+
{{< crosswalk name="R Package Description" >}}

content/crosswalk/datacite.Rmd

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

0 commit comments

Comments
 (0)