Skip to content

Commit

Permalink
Switch to Quarto
Browse files Browse the repository at this point in the history
Switch from Jekyll website rendering to quarto (quarto.org). A way to
experiment the tool with a nicer to get a nicer a more specifically
built website.

Quarto being more oriented in the production of scientific resources.
  • Loading branch information
AbcSxyZ committed Aug 13, 2024
1 parent 0cd7a63 commit 34a8e6d
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish to GitHub Pages

on:
push:
branches:
- quarto

jobs:
build:
runs-on: ubuntu-latest
env:
QUARTO_VERSION: 1.4.543

environment:
name: github-pages
permissions:
contents: read
pages: write
id-token: write

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Cache dependencies
id: caching
uses: actions/cache@v3
with:
path: .dependencies
key: quarto-${{ env.QUARTO_VERSION }}

- if: ${{ steps.caching.outputs.cache-hit != 'true' }}
name: Download Quarto
run: |
mkdir .dependencies && cd .dependencies
wget --no-verbose https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb
- name: Install Quarto
run: |
sudo apt install ./.dependencies/*.deb
- name: Render website
run: |
quarto render
# Use README.html rather than index.html as homepage file
cd _site
rm index.html && ln -s README.html index.html
- uses: actions/upload-pages-artifact@v3
with:
path: _site

- uses: actions/deploy-pages@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
project:
type: website
render:
- "*.md"
- README.md
- content/method/README.md
- content/projects/README.md
- content/models/README.md

website:
title: "Open Models"
navbar:
left:
- href: README.md
text: Knowledge Base
- href: https://portal.open-models.org/
text: Portal
tools:
- icon: github
href: https://github.com/Open-Models/Base
- icon: chat-right-dots
href: https://github.com/Open-Models/Base/discussions
- icon: cc-circle
href: https://creativecommons.org/publicdomain/zero/1.0/

sidebar:
style: "docked"
contents:
- section: "Open Models"
href: content/models/README.md
contents:
- content/models/open-education.md

format:
html:
theme: cosmo
toc: true

0 comments on commit 34a8e6d

Please sign in to comment.