Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Nov 6, 2024
0 parents commit eb28186
Show file tree
Hide file tree
Showing 18 changed files with 1,389 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches:
- "main"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "poetry"
- run: |
poetry install
poetry run task docs-build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: './build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
venv
build
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# dataverse.org (Sphinx)

This GitHub project hosts the sources from which the Dataverse website at https://sphinx.dataverse.org is built.
If we like Sphinx, we might switch https://dataverse.org to it.
Builds are automated and any commited changes will be released by automation.

You can do smaller edits using the GitHub integrated web editor for files and change the Markdown based content.
For larger changes, we recommend working with a local setup, also allowing to preview your changes.
See below for a tutorial how to start your local setup.

## Prepare your environment

First, install Python 3.9 (or later).

Additionally, you need to [install `poetry >= 1.2.0`](https://python-poetry.org/docs/#installation), either globally, or within an environment of your choice.
As a project, we chose `poetry` to manage our dependencies, builds, and deposits as a state of the art solution within the Python ecosystem.

## Get the source code

Next, you need to obtain a version of the website "source code".

You can either download it as a zipped package or clone the whole Git repository.
You can clone the repository and enter the project directory as follows:

```shell
git clone https://github.com/IQSS/sphinx.dataverse.org.git
cd sphinx.dataverse.org
```

## Build the website for preview

To build the website in your *poetry* environment, run the
following commands from the project root:

```shell
poetry install
poetry run task docs-build
```

On Linux you can use `xdg-open`, on Mac `open` to see the built output in your browser:
```shell
xdg-open build/html/index.html
```

Or use [`sphinx-autobuild`](https://github.com/executablebooks/sphinx-autobuild) to enable a self-updating preview service:

```shell
poetry install
poetry run task docs-live
```

The page will automatically be opened for you in a browser window or tab.
**Note:** enabling auto-reload without user interaction requires you to install the "LiveReload" extension for your browser.
1,156 changes: 1,156 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[tool.poetry]
name = "gdcc-website"
version = "0.1.0"
description = "Sphinx project for GDCC's main website"
homepage = "https://dataverscommunity.global"
authors = [
"Oliver Bertuch <[email protected]>",
]

readme = "README.md"
repository = "https://github.com/gdcc/www.gdcc.io"

[tool.poetry.dependencies]
python = "^3.9"
taskipy = "^1.10.3"

Sphinx = "^7.2.6"
# Sphinx - Additional modules
myst-parser = "^2.0.0"
pydata-sphinx-theme = "^0.14.1"
sphinx-favicon = "^0.2"
sphinxcontrib-contentui = "^0.2.5"
sphinxcontrib-images = "^0.9.4"
sphinx-icon = "^0.1.2"
sphinx-autobuild = "^2021.3.14"
sphinxemoji = "^0.2.0"
sphinxext-opengraph = "^0.6.3"
sphinxcontrib-mermaid="^0.8.1"
sphinx-togglebutton="^0.3.2"

[tool.taskipy.tasks]
docs-build = "poetry run sphinx-build -M html source build -W --keep-going"
docs-clean = "poetry run sphinx-build -M clean source build"
docs-live = "poetry run sphinx-autobuild source build/html --open-browser --delay=2"

[build-system]
requires = ["poetry-core>=1.2.0"]
build-backend = "poetry.core.masonry.api"
Binary file added source/_static/_images/dataverse_r_project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions source/about/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# About

2 changes: 2 additions & 0 deletions source/best-practices/academic-credit/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Academic Credit

7 changes: 7 additions & 0 deletions source/best-practices/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Best Practices


```{toctree}
academic-credit/index.md
```

2 changes: 2 additions & 0 deletions source/community/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Community

45 changes: 45 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from datetime import datetime
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'The Dataverse Project'
copyright = u'%d, The President & Fellows of Harvard College' % datetime.now().year
author = 'The Dataverse Project'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["myst_parser"]

templates_path = ['_templates']
exclude_patterns = []

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'pydata_sphinx_theme'
html_logo = '_static/_images/dataverse_r_project.png'
html_static_path = ['_static']
# "The header navigation bar is at the top of each page and contains top-level navigation across pages in your documentation, as well as extra links and components that you can add." -- https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/header-links.html
html_theme_options = {
"show_prev_next": False,
"header_links_before_dropdown": 5,
# see https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/source-buttons.html
"use_edit_page_button": True,
"external_links": [
{"name": "Working Groups", "url": "https://www.gdcc.io/working-groups.html"}
]
}
html_context = {
"github_user": "IQSS",
"github_repo": "sphinx.dataverse.org",
"github_version": "main",
"doc_path": "source",
}
# see use_edit_page_button, which we use instead
html_show_sourcelink = False
1 change: 1 addition & 0 deletions source/contact/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Contact
1 change: 1 addition & 0 deletions source/developers/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Developers
21 changes: 21 additions & 0 deletions source/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The Dataverse Project

Open source research data repository software

- [Researchers](researchers/index)
- [Journals](journals/index)
- [Institutions](institutions/index)
- [Developers](developers/index)

```{toctree}
:hidden:
about/index
community/index
best-practices/index
software/index
contact/index
researchers/index
journals/index
institutions/index
developers/index
```
1 change: 1 addition & 0 deletions source/institutions/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Institutions
1 change: 1 addition & 0 deletions source/journals/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Journals
1 change: 1 addition & 0 deletions source/researchers/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Researchers
2 changes: 2 additions & 0 deletions source/software/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Software

0 comments on commit eb28186

Please sign in to comment.