Skip to content

Commit

Permalink
Switch html_theme to pydata_sphinx_theme
Browse files Browse the repository at this point in the history
because it supports Ablog extension. Add `posts.rst` and `cources.md` to
have corresponding top level sections. The `pydata_sphinx_theme` draws
top level section at the top of the page and removes them from the side bar.
So we add `navbar-nav` to `index` side-bar for better visibility.
  • Loading branch information
reznikmm committed Sep 22, 2024
1 parent 4011603 commit 3ad771b
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 10 deletions.
7 changes: 7 additions & 0 deletions content/courses.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Курси

```{toctree}
:maxdepth: 1
Введення в Ada <courses/intro-to-ada-ukr/index>
```
16 changes: 11 additions & 5 deletions content/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Ada-Ukraine.github.io

## Що ж таке Ада?
## Що ж таке Ада?

Ада - це сучасна мова програмування, яку команди розробників по всьому
світу використовують для створення критично важливого програмного
забезпечення: від мікроядер і мініатюрних вбудованих систем реального
часу до масштабних корпоративних рішень і всього, що знаходиться між цим.

## Спробуй Аду прямо зараз:
## Спробуй Аду саме зараз:

```{code} ada run_button project=Introduction main=learn.adb
Expand All @@ -28,16 +28,22 @@ end Learn;
````{only} builder_html
```{toctree}
:maxdepth: 4
about
Про Ada Ukraine <about>
```
````
```{toctree}
:maxdepth: 1
:caption: "Courses:"
Введення в Ada <courses/intro-to-ada-ukr/index>
Курси <courses>
```
````{only} builder_html
```{toctree}
Статті <posts>
```
````
`````
4 changes: 4 additions & 0 deletions content/posts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Статті
======

.. postlist::
1 change: 1 addition & 0 deletions frontend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ablog==0.11.11
myst_parser==4.0.0
pydata_sphinx_theme==0.15.4
coverage==7.6.0
docutils==0.20.1
graphviz==0.20.3
Expand Down
20 changes: 17 additions & 3 deletions frontend/sphinx/conf_patch_ukr.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,28 @@

html_logo = "img/logo_ukr.svg"

html_sidebars = {
'index': [
'navbar-nav',
'ablog/postcard.html', 'ablog/recentposts.html',
'ablog/tagcloud.html', 'ablog/categories.html',
'ablog/archives.html',
],
'**': [
'sidebar-nav-bs',
'ablog/postcard.html', 'ablog/recentposts.html',
'ablog/tagcloud.html', 'ablog/categories.html',
'ablog/archives.html',
]
}

html_theme = "pydata_sphinx_theme"

html_theme_options = {
'logo_only': True,
'display_version': False,
}

language = 'uk'

myst_update_mathjax = False # ablog docs sets this


# master_doc = 'index_ukr'
4 changes: 2 additions & 2 deletions frontend/sphinx/img/logo_ukr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3ad771b

Please sign in to comment.