From 85c46c59c79c99ab7028674d078db3af95717cfd Mon Sep 17 00:00:00 2001
From: mcla <mcla@dtu.dk>
Date: Wed, 29 May 2024 11:58:42 +0200
Subject: [PATCH] refresh config

---
 .htaccess                    |  9 +++++++++
 pg_cs/_config.yml            | 38 +++++++++++++++++++++++++-----------
 pg_cs/_toc.yml               |  2 +-
 pg_cs/{intro.md => index.md} |  0
 requirements.txt             |  1 -
 5 files changed, 37 insertions(+), 13 deletions(-)
 create mode 100644 .htaccess
 rename pg_cs/{intro.md => index.md} (100%)

diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..1b300a4
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,9 @@
+RewriteEngine On
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^([^\.]+)$ $1.html [NC,L]  
+AddType application/octet-stream .md  
+AddType application/octet-stream .rst
+AddType application/octet-stream .ggb
+AddType application/octet-stream .ipynb
+AddCharset utf-8 .htm .html .js .css .md
diff --git a/pg_cs/_config.yml b/pg_cs/_config.yml
index f630cbb..e4d6792 100644
--- a/pg_cs/_config.yml
+++ b/pg_cs/_config.yml
@@ -5,9 +5,9 @@
 
 #######################################################################################
 # Book settings
-title                       : PG Course site  # The title of the book. Will be placed in the left navbar.
+title                       : PG Test  # The title of the book. Will be placed in the left navbar.
 author                      : DTU Compute  # The author of the book
-copyright                   : "2023"  # Copyright year to be placed in the footer
+copyright                   : "2024"  # Copyright year to be placed in the footer
 logo                        : logo.png  # A path to the book logo
 
 # Only build table of content _toc.yml files
@@ -15,21 +15,21 @@ only_build_toc_files: true
 
 # Information about where the book exists on the web
 repository:
-  url: https://github.com/mclacompute/pgcoursesite  # Online location of your book
-  path_to_book: /pg_cs  # Optional path to your book, relative to the repository root
+  url: https://lab.compute.dtu.dk/mcla/pgtest  # Online location of your book
+  path_to_book: pg_cs  # Optional path to your book, relative to the repository root
   branch: main # Which branch of the repository should be used when creating links (optional)
 
 # Add GitHub buttons to your book
 # See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
-html:
+#html:
   use_issues_button: true
   use_repository_button: true
 
-launch_buttons:
+#launch_buttons:
   notebook_interface: "classic" # or  "jupyterlab"
-  # binderhub_url: "https://mybinder.org"
-  colab_url: "https://colab.research.google.com"
-  # thebe                  : true # husk jupyterlite
+  binderhub_url: "https://notebooks.gesis.org/binder/"
+#  colab_url: "https://colab.research.google.com"
+#  thebe                  : true # husk jupyterlite
 
 parse:
   myst_enable_extensions:
@@ -49,8 +49,8 @@ parse:
 
 # Force re-execution of notebooks on each build.
 # See https://jupyterbook.org/content/execute.html
-# execute:
-#   execute_notebooks: force
+execute:
+  execute_notebooks: cache
 
 # Add a bibtex file so that we can create citations
 bibtex_bibfiles:
@@ -60,3 +60,19 @@ bibtex_bibfiles:
 # latex:
 #   latex_documents:
 #     targetname: book.tex
+
+# Sphinx extentions
+sphinx:
+  recursive_update: true
+  extra_extensions:
+  - sphinx_toolbox.assets
+  config:
+    assets_dir: './media'
+    html_theme_options:
+      repository_provider: https://lab.compute.dtu.dk
+    html_context:
+      gitlab_url: https://lab.compute.dtu.dk/mcla
+      gitlab_repo: "pgtest/pg_cs"
+      gitlab_user: ""
+      gitlab_version: main
+      doc_path: source
diff --git a/pg_cs/_toc.yml b/pg_cs/_toc.yml
index 9a0cfcf..2c0eddd 100644
--- a/pg_cs/_toc.yml
+++ b/pg_cs/_toc.yml
@@ -2,7 +2,7 @@
 # Learn more at https://jupyterbook.org/customize/toc.html
 
 format: jb-book
-root: intro
+root: index
 parts:
 - caption: 
   chapters:
diff --git a/pg_cs/intro.md b/pg_cs/index.md
similarity index 100%
rename from pg_cs/intro.md
rename to pg_cs/index.md
diff --git a/requirements.txt b/requirements.txt
index 2a8cfe8..ba7e174 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,2 @@
 jupyter-book
 dtumathtools
-# ghp-import
-- 
GitLab