|
1 | | -############################################################################### |
2 | | -# Auto-generated by `jupyter-book config` |
3 | | -# If you wish to continue using _config.yml, make edits to that file and |
4 | | -# re-generate this one. |
5 | | -############################################################################### |
| 1 | +version = 'dev' |
| 2 | +language = 'en' |
| 3 | +baseurl = 'https://discover-cookbook.numfocus.org' |
| 4 | + |
| 5 | +import json |
| 6 | +import os |
| 7 | + |
| 8 | +# Load language data from languages.json |
| 9 | +language_json_path = os.path.join(os.path.dirname(__file__), '_static', 'languages.json') |
| 10 | +language_data = [] |
| 11 | +current_language_name = None |
| 12 | +if os.path.exists(language_json_path): |
| 13 | + with open(language_json_path, 'r', encoding='utf-8') as f: |
| 14 | + all_languages = json.load(f) |
| 15 | + |
| 16 | +# Get the current language name |
| 17 | +current_language_name = next((lang['name_local'] for lang in all_languages if lang['code'] == language), language) |
| 18 | + |
| 19 | +# Filter out hidden languages for the dropdown |
| 20 | +language_data = [lang for lang in all_languages if not lang.get('hidden', False)] |
| 21 | + |
| 22 | +html_context = { |
| 23 | + "languages": language_data, |
| 24 | + "current_language_name": current_language_name, |
| 25 | + "current_language": language, |
| 26 | + "current_version": version, |
| 27 | + "baseurl": baseurl |
| 28 | +} |
| 29 | + |
| 30 | +html_baseurl = baseurl |
| 31 | + |
6 | 32 | author = 'Community' |
7 | 33 | comments_config = {'hypothesis': False, 'utterances': False} |
8 | 34 | copyright = '2023' |
9 | | - |
10 | 35 | exclude_patterns = ['**.ipynb_checkpoints', '.DS_Store', 'Thumbs.db', '_build'] |
11 | 36 | extensions = ['sphinx_togglebutton', 'sphinx_copybutton', 'myst_nb', 'jupyter_book', 'sphinx_external_toc', 'sphinx.ext.intersphinx', 'sphinx_design', 'sphinx_book_theme', 'sphinx_tags', 'sphinx_jupyterbook_latex', 'sphinx_multitoc_numbering'] |
12 | 37 | external_toc_exclude_missing = False |
|
19 | 44 | html_sourcelink_suffix = '' |
20 | 45 | html_static_path = ['_static'] |
21 | 46 | html_theme = 'sphinx_book_theme' |
22 | | -html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': '', 'deepnote_url': ''}, 'path_to_docs': 'DISCOVER', 'repository_url': 'https://github.com/numfocus/DISCOVER-Cookbook/', 'repository_branch': 'main', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'analytics': {'google_analytics_id': '', 'plausible_analytics_domain': '', 'plausible_analytics_url': 'https://plausible.io/js/script.js'}, 'use_repository_button': True, 'use_edit_page_button': False, 'use_issues_button': True} |
| 47 | +templates_path = ["_templates"] |
| 48 | +html_theme_options = { |
| 49 | + 'search_bar_text': 'Search this book...', |
| 50 | + 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': '', 'deepnote_url': ''}, |
| 51 | + 'path_to_docs': 'DISCOVER', |
| 52 | + 'repository_url': 'https://github.com/numfocus/DISCOVER-Cookbook/', |
| 53 | + 'repository_branch': 'main', |
| 54 | + 'extra_footer': '', |
| 55 | + 'home_page_in_toc': True, |
| 56 | + 'announcement': '', |
| 57 | + 'analytics': {'google_analytics_id': '', 'plausible_analytics_domain': '', 'plausible_analytics_url': 'https://plausible.io/js/script.js'}, |
| 58 | + 'use_repository_button': True, |
| 59 | + 'use_edit_page_button': False, |
| 60 | + 'use_issues_button': True, |
| 61 | + |
| 62 | + |
| 63 | + "article_header_start": ["toggle-primary-sidebar","version-switcher","language-switcher"], |
| 64 | + "navigation_with_keys": False, |
| 65 | + "show_version_warning_banner": True, |
| 66 | + "switcher": { |
| 67 | + "json_url": "https://discover-cookbook.numfocus.org/versions.json", |
| 68 | + "version_match": version, |
| 69 | + }, |
| 70 | +} |
| 71 | + |
23 | 72 | html_title = 'DISCOVER' |
24 | 73 | latex_engine = 'pdflatex' |
25 | 74 | myst_enable_extensions = ['colon_fence', 'dollarmath', 'linkify', 'substitution', 'tasklist'] |
|
0 commit comments