Skip to content

Commit

Permalink
Add mkdocs action
Browse files Browse the repository at this point in the history
  • Loading branch information
ladinesa committed Feb 20, 2024
1 parent 7d1ddfc commit 84f9c66
Show file tree
Hide file tree
Showing 15 changed files with 324 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/mkdocs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: deploy-mkdocs

on:
push:
branches:
- develop # Triggers deployment on push to the main branch

jobs:
deploy:
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material==8.1.1 pymdown-extensions mkdocs-click
- name: Build and Deploy
run: |
mkdocs gh-deploy --config-file ../nomad-schema-plugin-simulation-workflow/mkdocs.yml --force --remote-branch gh-pages
1 change: 1 addition & 0 deletions docs/assets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nomad-oasis*.zip
Binary file added docs/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/nomad-plugin-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/explanation/explanation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Explanation

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
4 changes: 4 additions & 0 deletions docs/how_to/contribute_to_the_documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Contribute to the documentation

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
5 changes: 5 additions & 0 deletions docs/how_to/contribute_to_this_plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contribute to This Plugin

!!! note "Attention"
Please update the document with relevant information specific to your plugin.

4 changes: 4 additions & 0 deletions docs/how_to/install_this_plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Install This Plugin

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
10 changes: 10 additions & 0 deletions docs/how_to/use_this_plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# How to Use This Plugin

This plugin can be used in a NOMAD Oasis instalation..

## Add This Plugin to Your NOMAD instalation

Read the [NOMAD plugin documentation](https://nomad-lab.eu/prod/v1/staging/docs/plugins/plugins.html#add-a-plugin-to-your-nomad) for all details on how to deploy the plugin on your NOMAD instance.

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
48 changes: 48 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Welcome to the `nomad-schema-plugin-simulation-workflow` documentation

This is a collection of schema for simulation workflows.

## Introduction

!!! note "Attention"
Please update the document with relevant information specific to your plugin.

<div markdown="block" class="home-grid">
<div markdown="block">

### Tutorial

A series of tutorials will guide you through the main functionality of `nomad-schema-plugin-simulation-workflow`.

- [Tutorial](tutorial/tutorial.md)

</div>
<div markdown="block">

### How-to guides

How-to guides provide step-by-step instructions for a wide range of tasks, with the overarching topics:

- [Install this plugin](how_to/install_this_plugin.md)
- [Use this plugin](how_to/use_this_plugin.md)
- [Contribute to this plugin](how_to/contribute_to_this_plugin.md)
- [Contribute to the documentation](how_to/contribute_to_the_documentation.md)

</div>

<div markdown="block">

### Explanation

The explanation [section](explanation/explanation.md) provides background knowledge on this plugin.

</div>
<div markdown="block">

### Reference

The reference [section](reference/references.md) includes all CLI commands and arguments, all configuration options,
the possible schema annotations and their arguments, and a glossary of used terms.

</div>
</div>
4 changes: 4 additions & 0 deletions docs/reference/references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# References

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
69 changes: 69 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

.md-header__button.md-logo :where(img,svg) {
width: 100%;
height: 30px;
}

.md-header, .md-header__inner {
background-color: #fff;
color: #2A4CDF;
}

.md-header[data-md-state=shadow] {
box-shadow: 0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);
transition: box-shadow 200ms linear;
}

.md-header__inner {
height: 80px;
}

.md-header__topic {
font-size: 24px;
}

.md-footer {
background-color: #2A4CDF;
}

.md-search__form:hover {
background-color: rgba(0,0,0,.13);
}

.md-typeset h1 {
color: black;
font-weight: 700;
}

.youtube {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
}

.youtube iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

.home-grid {
display: grid;
grid-template-columns: 1fr 1fr;
grid-column-gap: 24px;
row-gap: 24px;
}

.home-grid div {
border-radius: 4px;
padding: 24px;
background-color: #f3e9d9;
}

.home-grid h3 {
margin-top: 0;
font-weight: 700;
}
86 changes: 86 additions & 0 deletions docs/theme/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{#-
This file was automatically generated - do not edit
-#}
{% set class = "md-header" %}
{% if "navigation.tabs.sticky" in features %}
{% set class = class ~ " md-header--lifted" %}
{% endif %}
<header class="{{ class }}" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="{{ lang.t('header.title') }}">
<a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-header__button md-logo" aria-label="{{ config.site_name }}" data-md-component="logo">
{% include "partials/logo.html" %}
</a>
<label class="md-header__button md-icon" for="__drawer">
{% include ".icons/material/menu" ~ ".svg" %}
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
{{ config.site_name }}
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
{% if page and page.meta and page.meta.title %}
{{ page.meta.title }}
{% else %}
{{ page.title }}
{% endif %}
</span>
</div>
</div>
</div>
{% if not config.theme.palette is mapping %}
<form class="md-header__option" data-md-component="palette">
{% for option in config.theme.palette %}
{% set primary = option.primary | replace(" ", "-") | lower %}
{% set accent = option.accent | replace(" ", "-") | lower %}
<input class="md-option" data-md-color-media="{{ option.media }}" data-md-color-scheme="{{ option.scheme }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}" {% if option.toggle %} aria-label="{{ option.toggle.name }}" {% else %} aria-hidden="true" {% endif %} type="radio" name="__palette" id="__palette_{{ loop.index }}">
{% if option.toggle %}
<label class="md-header__button md-icon" title="{{ option.toggle.name }}" for="__palette_{{ loop.index0 or loop.length }}" hidden>
{% include ".icons/" ~ option.toggle.icon ~ ".svg" %}
</label>
{% endif %}
{% endfor %}
</form>
{% endif %}
{% if config.extra.alternate %}
<div class="md-header__option">
<div class="md-select">
{% set icon = config.theme.icon.alternate or "material/translate" %}
<button class="md-header__button md-icon" aria-label="{{ lang.t('select.language.title') }}">
{% include ".icons/" ~ icon ~ ".svg" %}
</button>
<div class="md-select__inner">
<ul class="md-select__list">
{% for alt in config.extra.alternate %}
<li class="md-select__item">
<a href="{{ alt.link | url }}" hreflang="{{ alt.lang }}" class="md-select__link">
{{ alt.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endif %}
{% if "search" in config["plugins"] %}
<label class="md-header__button md-icon" for="__search">
{% include ".icons/material/magnify.svg" %}
</label>
{% include "partials/search.html" %}
{% endif %}
{% if config.repo_url %}
<div class="md-header__source">
{% include "partials/source.html" %}
</div>
{% endif %}
</nav>
{% if "navigation.tabs.sticky" in features %}
{% if "navigation.tabs" in features %}
{% include "partials/tabs.html" %}
{% endif %}
{% endif %}
</header>
4 changes: 4 additions & 0 deletions docs/tutorial/tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Tutorial

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
57 changes: 57 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
site_name: Documentation
site_description: |
The documentation for NOMAD run schema
site_author: The NOMAD Authors
repo_url: https://github.com/nomad-coe/nomad-schema-plugin-run

nav:
- Home: index.md
- Tutorial: tutorial/tutorial.md
- How-to guides:
- Install this Plugin: how_to/install_this_plugin.md
- Use this Plugin: how_to/use_this_plugin.md
- Contribute to this plugin: how_to/contribute_to_this_plugin.md
- Contribute to the documentation: how_to/contribute_to_the_documentation.md
- Explanation: explanation/explanation.md
- Reference: reference/references.md
plugins:
- search
theme:
name: material
palette:
primary: "#2A4CDF"
accent: "#008A67"
font:
text: "Titillium Web"
logo: assets/nomad-plugin-logo.png
favicon: assets/favicon.png
features:
- navigation.instant
custom_dir: docs/theme
markdown_extensions:
- attr_list
- md_in_html
- admonition
- pymdownx.details
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- toc:
permalink: True
- pymdownx.arithmatex:
generic: true
- attr_list
- mkdocs-click
- pymdownx.extra
extra:
generator: false
homepage: https://nomad-lab.eu
use_directory_urls: false
extra_css:
- stylesheets/extra.css
extra_javascript:
- javascript.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

0 comments on commit 84f9c66

Please sign in to comment.