Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a notion of multiple sites. **PREVIEW** #17

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
BRANDING := erda.dk
CONFIGDIR = "./docs/_sites/$(BRANDING)"
SPHINXBUILD = ./.venv/bin/sphinx-build
SPHINXOPTS =
SPHINXOPTS = -c "$(CONFIGDIR)"
SOURCEDIR = docs
BUILDDIR = build
BUILDDIR = "build/$(BRANDING)"

# Put it first so that "make" without argument is like "make help".
.PHONY: help
Expand Down
28 changes: 23 additions & 5 deletions docs/conf.py → docs/_sites/erda.dk/conf.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
# Configuration file for the modi-helper-scripts documentation site.
# import sphinx_rtd_theme

from configparser import ConfigParser
import os
from types import SimpleNamespace

_SITE_DIR = os.path.dirname(os.path.abspath(__file__))


def _sitevars_and_epilog():
parser = ConfigParser()
parser.read(os.path.join(_SITE_DIR, "variables.ini"))

sitevars = SimpleNamespace(**parser['site'])

epilog_lines = [".. |%s| replace:: %s" % (k, v) for k, v in sitevars.__dict__.items()]
epilog = '\n'.join(epilog_lines)

return sitevars, epilog

# -- Project information -----------------------------------------------------

project = "ERDA & SIF support"
sitevars, rst_epilog = _sitevars_and_epilog()
project = "%s support" % (sitevars.project_name,)
copyright = "2023 SCIENCE HPC Center Support Team"
author = "SCIENCE HPC Center Support Team"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
Expand All @@ -27,7 +45,7 @@
exclude_patterns = []

# HTML logo which will show on top of the sidebar
html_logo = "_static/faelles.svg"
html_logo = "../../_static/faelles.svg"

# -- Options for HTML output -------------------------------------------------

Expand All @@ -39,7 +57,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_static_path = ["../../_static"]
html_css_files = ["custom.css"]
# Favicon for browsertab etcetera
html_favicon = '_static/favicon.ico'
html_favicon = '../../_static/favicon.ico'
2 changes: 2 additions & 0 deletions docs/_sites/erda.dk/variables.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[site]
project_name = ERDA & SIF
65 changes: 65 additions & 0 deletions docs/_sites/generic/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Configuration file for the modi-helper-scripts documentation site.
# import sphinx_rtd_theme

from configparser import ConfigParser
import os
from types import SimpleNamespace

_SITE_DIR = os.path.dirname(os.path.abspath(__file__))


def _sitevars_and_epilog():
parser = ConfigParser()
parser.read(os.path.join(_SITE_DIR, "variables.ini"))

sitevars = SimpleNamespace(**parser['site'])

epilog_lines = [".. |%s| replace:: %s" % (k, v) for k, v in sitevars.__dict__.items()]
epilog = '\n'.join(epilog_lines)

return sitevars, epilog


# -- Project information -----------------------------------------------------

sitevars, rst_epilog = _sitevars_and_epilog()
project = "%s support" % (sitevars.project_name,)
copyright = "2023 SCIENCE HPC Center Support Team"
author = "SCIENCE HPC Center Support Team"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_rtd_theme",
"sphinxemoji.sphinxemoji",
]
pygments_style = 'sphinx'
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# HTML logo which will show on top of the sidebar
html_logo = "../../_static/faelles.svg"

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["../../_static"]
html_css_files = []
# Favicon for browsertab etcetera
html_favicon = '../../_static/favicon.ico'
2 changes: 2 additions & 0 deletions docs/_sites/generic/variables.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[site]
project_name = Generic
65 changes: 65 additions & 0 deletions docs/_sites/sif.ku.dk/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Configuration file for the modi-helper-scripts documentation site.
# import sphinx_rtd_theme

from configparser import ConfigParser
import os
from types import SimpleNamespace

_SITE_DIR = os.path.dirname(os.path.abspath(__file__))


def _sitevars_and_epilog():
parser = ConfigParser()
parser.read(os.path.join(_SITE_DIR, "variables.ini"))

sitevars = SimpleNamespace(**parser['site'])

epilog_lines = [".. |%s| replace:: %s" % (k, v) for k, v in sitevars.__dict__.items()]
epilog = '\n'.join(epilog_lines)

return sitevars, epilog


# -- Project information -----------------------------------------------------

sitevars, rst_epilog = _sitevars_and_epilog()
project = "%s support" % (sitevars.project_name,)
copyright = "2023 SCIENCE HPC Center Support Team"
author = "SCIENCE HPC Center Support Team"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_rtd_theme",
"sphinxemoji.sphinxemoji",
]
pygments_style = 'sphinx'
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# HTML logo which will show on top of the sidebar
html_logo = "../../_static/faelles.svg"

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["../../_static"]
html_css_files = []
# Favicon for browsertab etcetera
html_favicon = '../../_static/favicon.ico'
2 changes: 2 additions & 0 deletions docs/_sites/sif.ku.dk/variables.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[site]
project_name = Secure Information Facility
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _index-start:

ERDA/SIF: User Guides
=====================
|project_name|: User Guides
===========================

.. toctree::
:maxdepth: 2
Expand Down Expand Up @@ -39,7 +39,7 @@ Welcome to the documentation site for ERDA and SIF! `ERDA <https://erda.ku.dk/>`

To quickly get started with ERDA or SIF, we recommend our :ref:`getting-started` page. If you are looking for something specific, the search functionality and the sidebar on the left is a good way to find what you are looking for!

|:file_cabinet:| About ERDA
|:file_cabinet:| About |project_name|
ERDA (Electronic Research Data Archive) at the University of Copenhagen (KU/UCPH) is meant for storing,
sharing, analyzing and archiving research data. ERDA delivers safe central storage space for ones own
and shared files, interactive analysis tools in addition to archiving for safe-keeping and publishing.
Expand Down