Skip to content

Commit 0c045ea

Browse files
authored
Merge pull request #2 from openmc-dev/change-to-myst
rewritten in myst
2 parents 32031da + 08c78bd commit 0c045ea

File tree

7 files changed

+86
-16
lines changed

7 files changed

+86
-16
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This file was created automatically with `myst init --gh-pages` 🪄 💚
2+
# Ensure your GitHub Pages settings for this repository are set to deploy with **GitHub Actions**.
3+
4+
name: MyST GitHub Pages Deploy
5+
on:
6+
push:
7+
# Runs on pushes targeting the default branch
8+
branches: [main]
9+
env:
10+
# `BASE_URL` determines the website is served from, including CSS & JS assets
11+
BASE_URL: /${{ github.event.repository.name }}
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: 'pages'
23+
cancel-in-progress: false
24+
25+
jobs:
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v3
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: 18.x
38+
- name: Install MyST Markdown
39+
run: npm install -g mystmd
40+
- name: Build HTML Assets
41+
run: myst build --html
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: './_build/html'
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

.gitignore

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

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11

2-
A repo showing how to make the OpenMC website using Github pages.
32

4-
The website makes use of the [Slate](https://github.com/pages-themes/slate) GitHub pages theme as this is the most similar to the current openmc.org style.
3+
A repository containing the OpenMC website using Github pages.
54

6-
There are [other themes](https://pages.github.com/themes/) and of course themes can be altered to suit.
5+
To build the site locally, clone the repository then install Myst Markdown
76

8-
The site is simple to maintain as it is just a few pages written in MarkDown (which Jekyll converts to html when Github pages builds the site)
7+
```
8+
python -m pip install mystmd
9+
```
10+
Then build and host the site locally with
11+
```
12+
myst start
13+
```
914

10-
Moving the website to a github repo (which could be part of the openmc-dev organisation) allows contributors to help maintain the site. Github pages also support custom domains so it could in theory do everything we need.
11-
12-
[link to demo site](https://opnmc-dev.github.io/openmc.org/)
15+
[link to live site](https://opnmc-dev.github.io/openmc.org/)

_config.yml

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

index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ layout: default
33
title: OpenMC
44
description: OpenMC Monte Carlo Code
55
---
6-
7-
| [Documentation](https://docs.openmc.org/) | [Discussion Forum](https://openmc.discourse.group/) | [Cross Sections](./cross_sections.html) | [Depletion Chains](./depletion_chains.html) |
86
97

108
OpenMC is a community-developed Monte Carlo neutron and photon transport code. It is capable of performing fixed source, k-eigenvalue, and subcritical multiplication calculations on models built using either a constructive solid geometry or CAD representation. A flexible and efficient tally system enables a wide variety of physical quantities to be tallied and analyzed. OpenMC can run in parallel using a hybrid MPI and OpenMP programming model and has been extensively tested on leadership class supercomputers.

logo.png

49.1 KB
Loading

myst.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 1
2+
project:
3+
toc:
4+
- file: index.md
5+
- file: cross_sections.md
6+
- file: depletion_chains.md
7+
title: OpenMC
8+
keywords: []
9+
authors: []
10+
site:
11+
template: book-theme
12+
title: OpenMC
13+
options:
14+
logo: logo.png
15+
favicon: favicon.ico
16+
hide_toc: true
17+
hide_footer_links : true
18+
nav:
19+
- title: Documentation
20+
url: https://docs.openmc.org/
21+
- title: Discussion Forum
22+
url: https://openmc.discourse.group/
23+
- title: Cross Sections
24+
url: /openmc.org/cross_sections
25+
- title: Depletion Chains
26+
url: /openmc.org/depletion_chains
27+
domains: []

0 commit comments

Comments
 (0)