Skip to content

Commit d9d0b86

Browse files
Merge pull request #174 from brightway-lca/docusearch_algolia
Add DocSearch/Algolia
2 parents c98d274 + d1d33e4 commit d9d0b86

File tree

5 files changed

+42
-10
lines changed

5 files changed

+42
-10
lines changed

environment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ dependencies:
2121
- sphinx-copybutton=0.5.2 # for copy button in code blocks # https://anaconda.org/conda-forge/sphinx-copybutton/files
2222
# build process
2323
- sphinx-autobuild=2024.9.17 # live-html support # https://anaconda.org/conda-forge/sphinx-autobuild/files
24+
# other packages
25+
- pip
26+
- pip:
27+
- sphinx-docsearch

source/_templates/autoapi/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
API
2+
===
3+
4+
This page contains auto-generated API reference documentation [#f1]_.
5+
6+
.. toctree::
7+
:titlesonly:
8+
9+
{% for page in pages|selectattr("is_top_level_object") %}
10+
{{ page.include_path }}
11+
{% endfor %}
12+
13+
.. [#f1] Created with `sphinx-autoapi <https://github.com/readthedocs/sphinx-autoapi>`_

source/conf.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
"sphinx_copybutton",
4545
# hover-over tooltips for cross-references
4646
# 'hoverxref.extension', # currently no support for markdown as per https://github.com/readthedocs/sphinx-hoverxref/issues/250
47+
# powerful search engine
48+
"sphinx_docsearch",
4749
]
4850

4951
root_doc = 'index'
@@ -81,13 +83,15 @@
8183

8284
html_sidebars = {
8385
"**": [
84-
"search-field.html",
8586
"sidebar-nav-bs.html",
8687
],
88+
"content/contact/contact": [],
89+
"content/other/support": [],
90+
"content/other/credits": [],
8791
}
8892

8993
html_theme_options = {
90-
"announcement": "<p><a href='https://2024.brightcon.link/'>REGISTER NOW</a>: Brightcon 2024 Hybrid Conference and Hackathon 🇩🇪 September 23 - 27 in Hamburg</p>",
94+
# "announcement": "<p><a href='https://2024.brightcon.link/'>REGISTER NOW</a>: Brightcon 2024 Hybrid Conference and Hackathon 🇩🇪 September 23 - 27 in Hamburg</p>",
9195
# https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html
9296
"switcher": {
9397
"json_url": "https://raw.githubusercontent.com/brightway-lca/brightway-documentation/main/source/_static/switcher.json",
@@ -100,7 +104,7 @@
100104
"footer_start": ["copyright"],
101105
"footer_end": ["footer"],
102106
"secondary_sidebar_items": ["page-toc", "edit-this-page", "sourcelink", "support"],
103-
"header_links_before_dropdown": 8,
107+
"header_links_before_dropdown": 7,
104108
# page elements content
105109
"icon_links": [
106110
{
@@ -147,6 +151,15 @@
147151
### Extension Configuration ########################################################################
148152
####################################################################################################
149153

154+
# sphinx DocSearch configuration #########################################
155+
156+
# "exposed anyway", so we can just set the values here
157+
# https://sphinx-docsearch.readthedocs.io/credentials.html
158+
159+
docsearch_app_id = "AB3D1FH6W0"
160+
docsearch_api_key = "5f985eef1633581416cd50fb544ab61c"
161+
docsearch_index_name = "brightway"
162+
150163
# copybutton Configuration ###############################################
151164

152165
copybutton_prompt_text = ">>>"
@@ -214,6 +227,8 @@
214227
autoapi_root = 'content/api'
215228
autoapi_keep_files = True
216229

230+
autoapi_template_dir = '_templates/autoapi' # https://sphinx-autoapi.readthedocs.io/en/latest/how_to.html#how-to-customise-the-index-page
231+
217232
# myst_parser Configuration ############################################
218233
# https://myst-parser.readthedocs.io/en/latest/configuration.html
219234

source/content/contact/contact.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ The Brightway community is active and growing. There are many ways to get in tou
99
| Mailing Lists | [`brightway.groups.io`](https://brightway.groups.io/) | Time-tested old-school-cool e-mail chains |
1010
| Chat Rooms | [`brightway:matrix.org`](https://matrix.to/#/#brightway:matrix.org) | Real-time chat with markdown support and end-to-end encryption |
1111
| Stack Overflow | [`tagged/brightway`](https://stackoverflow.com/questions/tagged/brightway) | Questions and answers on the most popular software development website |
12-
| Development Blog | [`chris.mutel.org`](https://chris.mutel.org/) | In-depth description of speficic improvements and development of Brightway |
12+
| Chris' Blog | [`chris.mutel.org`](https://chris.mutel.org/) | In-depth description of developments related to Brightway |
1313

1414
## Meet and Learn in Person
1515

1616
| Event | Location | Description |
1717
| ----- | -------- | ----------- |
18-
| [Brightcon Conference](http://brightcon.link) | Luxembourg (2023) | Annual user and developer conference with hackathon and workshops |
18+
| [Brightcon Conference](http://brightcon.link) | Europe | Annual user and developer conference with hackathon and workshops |
19+
| [DdS Brightway Schools](https://www.d-d-s.ch) | Europe, Americas, Asia | Regular training courses on Brightway and LCA |
1920

2021
![image](_images/brightcon_banner.jpg)

source/index.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ Learn more {fas}`arrow-right`
3939

4040
## What's New?
4141

42-
__September 2024__: New [Cheat Sheet](./content/cheatsheet/index.md) with all common Brightway commands. Thank you, @[Chris Mutel](https://github.com/cmutel) \
43-
__May 2024__: New section `Getting Started` added to the documentation (since replaced by the `Cheat Sheet`). This section will help you kickstart your first Brightway project. Thank you, @[KarinTreyer](https://github.com/KarinTreyer) and @[michaelweinold](https://github.com/michaelweinold)! \
44-
__April 2024__: New section [Terminology](./content/theory/terminology.md) added to the documentation. This section explains the most important terms used in the Brightway documentation. Thank you, @[marc-vdm](https://github.com/marc-vdm)! \
45-
__April 2024__: New sub-section [Teaching Materials](./content/examples/index.md) added to the documentation. This section collects materials used to teach Brightway. Thank you, @[KarinTreyer](https://github.com/KarinTreyer)!
46-
42+
__October 2024__: New AI-powered [Algolia/DocSearch](https://docsearch.algolia.com) search engine. Thank you, @[michaelweinold](https://github.com/michaelweinold)! \
43+
__September 2024__: Updated [Cheat Sheet](./content/cheatsheet/index.md) with all common Brightway commands. Thank you, @[cmutel](https://github.com/cmutel)! \
44+
__May 2024__: Initial [Cheat Sheet](./content/cheatsheet/index.md) with some common Brightway commands. Thank you, @[KarinTreyer](https://github.com/KarinTreyer) and @[michaelweinold](https://github.com/michaelweinold)! \
45+
__April 2024__: New [Glossay](./content/overview/glossary.md) page explaining the most important Brightway terms. Thank you, @[marc-vdm](https://github.com/marc-vdm)!
4746

4847
```{toctree}
4948
---

0 commit comments

Comments
 (0)