Skip to content

Commit 89a62d7

Browse files
committed
🎨 clean-up page
1 parent 82e91aa commit 89a62d7

File tree

4 files changed

+19
-155
lines changed

4 files changed

+19
-155
lines changed

README.md

Lines changed: 3 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,5 @@
1-
# Template for a static website using Sphinx and GitHub Pages
1+
# Data visualization in Python
22

3-
You can find a recording of the [instructions](#instructions) described below on youtube:
4-
[![Live Demo on using the template repository for a notes website](https://img.youtube.com/vi/XolIezJtSPI/maxresdefault.jpg
5-
)](https://www.youtube.com/watch?v=XolIezJtSPI)
3+
> Workshop material for 19th November 2025
64
7-
## Instructions
8-
9-
### 1. Create new repository based on this template
10-
11-
Create a template based on
12-
[this repository](https://github.com/enryH/notes_template)
13-
by clicking on the "Use this template" button,
14-
see instructions
15-
[here](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template)
16-
17-
- now you are already publish the site which looks identical to the template site
18-
(see it here)
19-
- jump to step 5 to do that directly.
20-
21-
### 2. Open in GitHub Codespaces (or locally)
22-
23-
- go to [github.com/codespaces](https://github.com/codespaces) or use the "Code" button
24-
and select "Open with Codespaces"
25-
- create a new codespace using the newly created repository
26-
27-
> If you are done, remember to delete the codespace to not see your free credit or money
28-
> wasted. Also inactive (stopped) codespaces use storage for the last 30 days.
29-
> See [this youtube video](https://youtu.be/gY0usMl2o5I) on how to do it:
30-
31-
[![Delete you codespaces!](https://img.youtube.com/vi/gY0usMl2o5I/default.jpg
32-
)](https://www.youtube.com/watch?v=gY0usMl2o5I)
33-
34-
### 3. Edit files
35-
36-
You will need to know the Markdown to format your text. See
37-
[this overview on GitHub](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)
38-
or [this cheatsheet](https://www.markdownguide.org/cheat-sheet/) to get started.
39-
40-
- update in `conf.py` at least the author, project and copyright information at the top
41-
- also update two urls to your repository:
42-
```json
43-
"github_url": "https://github.com/enryh/",
44-
"repository_url": "https://github.com/enryh/notes_template",
45-
```
46-
- write something about you in `about.md`
47-
- write articles in `folder_topic/article_topic.md`
48-
- update the `index.md` file to include new files
49-
- use [pandoc](https://pandoc.org/try/) to convert your previous files into markdown or
50-
reStructuredText
51-
52-
Troubleshooting:
53-
- don't forget to add new files to the `index.md` file
54-
- each document should have a title (`# title`) using a main heading and otherwise
55-
nested headlines (subheadings followed by sub-subheadings)
56-
57-
### 4. Build the site locally
58-
59-
Sphinx uses the configuration file `conf.py` to set up the site. The `requirements.txt` file
60-
contain extensions and themes that are used additionally to sphinx to build the site.
61-
The layout of the website is defined in the `index.md` file.
62-
63-
> Have look at `.github/workflows/build_website.yaml` to see how the site is built
64-
> if you are interested.
65-
66-
- Open a terminal (GitHub Codespaces)
67-
- install required packages from [`requirements.txt`](requirements.txt):
68-
```bash
69-
pip install -r requirements.txt
70-
```
71-
- build the site (you could set an alias if you want):
72-
```bash
73-
sphinx-build -n -W --keep-going -b html ./ ./_build/
74-
```
75-
in case the command is not found, try:
76-
```bash
77-
python -m sphinx -n -W --keep-going -b html ./ ./_build/
78-
```
79-
- open the site in a browser:
80-
- install ["Live Preview" extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.live-server) in Visual Studio Code
81-
- open the `_build/index.html` file in the browser (right-click, "Show Preview")
82-
83-
### 5. Publish the site
84-
85-
Follow
86-
[these instructions](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)
87-
to publish the website using GitHub Pages.
88-
89-
- Select the `gh-pages` branch as the source for the GitHub Pages site (currently step 7)
90-
- add the deployed url to your "About" on the right sight of the repository
91-
92-
93-
## Changing the topic
94-
95-
If you want to change the topic you can browse templates on the follwing site: [sphinx-themes.org/](https://sphinx-themes.org/)
96-
97-
You will need to change at least these things to switch to the new template:
98-
99-
- Install it and add it to the `requirements.txt` file (Sphinx templates come as a Python package)
100-
- Update `conf.py`:
101-
- `html_theme` variable to the selected theme
102-
- update the `html_theme_options` to the available options of the theme
103-
104-
Try for example the the [press theme](https://sphinx-themes.org/sample-sites/sphinx-press-theme/).
105-
Don't forget to update the `html_theme_options` in `conf.py` to the available options of this theme.
5+
## Infos

conf.py

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,35 @@
1-
# Configuration file for the Sphinx documentation builder.
2-
#
3-
# This file only contains a selection of the most common options. For a full
4-
# list see the documentation:
5-
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6-
7-
# -- Project information -----------------------------------------------------
8-
9-
project = "Data Science Platform notes template"
10-
copyright = "2024, DTU Biosustain, Informatics Platform, DSP"
1+
project = "Data Visualization with Python"
2+
copyright = "2025, DTU Biosustain, Informatics Platform, DSP"
113
author = "Henry Webel"
124

13-
14-
# -- General configuration ---------------------------------------------------
15-
16-
175
extensions = [
186
"myst_nb",
19-
# "sphinx_design", # https://sphinx-design.readthedocs.io/en/sbt-theme/
20-
# "sphinx_copybutton", # https://sphinx-copybutton.readthedocs.io/
217
"sphinx_new_tab_link",
8+
"sphinx_copybutton",
229
]
2310

2411
templates_path = ["_templates"]
25-
# As we can use percent notebooks and markdowns files, we need to exclude some files
26-
# additinally to the default ones (add to the list if needed)
2712
exclude_patterns = [
2813
"_build",
2914
"Thumbs.db",
3015
".DS_Store",
3116
"**/pandoc_ipynb/inputs/*",
3217
".nox/*",
33-
'.venv/*',
3418
"README.md",
3519
"**/.ipynb_checkpoints/*",
3620
"jupyter_execute",
3721
"conf.py",
22+
"*.py",
23+
".pytest_cache",
24+
"data/PXD041301/*", # leave it out for now
3825
]
3926

40-
41-
# -- Notebook related settings -----------------------------------------------
42-
43-
# add notebooks
4427
# https://myst-nb.readthedocs.io/en/latest/computation/execute.html
4528
nb_execution_mode = "auto"
4629

4730
myst_enable_extensions = ["dollarmath", "amsmath"]
4831

49-
# Plolty support through require javascript library
32+
# Plotly support through require javascript library
5033
# https://myst-nb.readthedocs.io/en/latest/render/interactive.html#plotly
5134
html_js_files = [
5235
"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"
@@ -59,30 +42,25 @@
5942
nb_merge_streams = True
6043

6144
# https://myst-nb.readthedocs.io/en/latest/authoring/custom-formats.html#write-custom-formats
62-
nb_custom_formats = {
63-
".py": ["jupytext.reads", {"fmt": "py:percent"}]
64-
}
45+
# nb_custom_formats = {".py": ["jupytext.reads", {"fmt": "py:percent"}]}
6546

47+
# https://myst-nb.readthedocs.io/en/latest/configuration.html#warning-suppression
48+
suppress_warnings = ["mystnb.unknown_mime_type"]
6649

67-
# -- Options for HTML output -------------------------------------------------
68-
69-
# 2. Select a tempalate
70-
# ! you might need additional dependencies in requirements.txt
71-
# browse available themes: https://sphinx-themes.org/
7250

51+
# -- Options for HTML output -------------------------------------------------
7352

7453
# The theme to use for HTML and HTML Help pages. See the documentation for
7554
# a list of builtin themes.
7655
# See:
7756
# https://github.com/executablebooks/MyST-NB/blob/master/docs/conf.py
7857
# html_title = ""
7958
html_theme = "sphinx_book_theme"
80-
# html_theme = "sphinx_book_theme" # alternative
8159
# html_logo = "_static/logo-wide.svg"
8260
# html_favicon = "_static/logo-square.svg"
8361
html_theme_options = {
84-
"github_url": "https://github.com/enryh/",
85-
"repository_url": "https://github.com/enryh/notes_template",
62+
"github_url": "https://github.com/biosustain/dsp_workshop_dataviz_python",
63+
"repository_url": "https://github.com/biosustain/dsp_workshop_dataviz_python",
8664
# "repository_branch": "main",
8765
# "home_page_in_toc": True,
8866
# "path_to_docs": "docs",

folder_topic/article_topic.md

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

index.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Static website Template
1+
```{include} ./README.md
2+
:start-line: 0
3+
```
24

35
This is a template for a static website using Sphinx and GitHub Pages.
46

@@ -9,11 +11,3 @@ This is a template for a static website using Sphinx and GitHub Pages.
911
about
1012
```
1113

12-
```{toctree}
13-
:maxdepth: 2
14-
:hidden:
15-
:caption: A topic
16-
17-
folder_topic/article_topic
18-
```
19-

0 commit comments

Comments
 (0)