Skip to content

Commit

Permalink
Add system for building hidden future tutorials (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
melund authored Oct 7, 2024
1 parent ca24eee commit 5fe23b8
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 7 deletions.
5 changes: 0 additions & 5 deletions A_study_of_studies/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ objective of this tutorial is to explain the sequence of a typical study from
its mechanical system information, to the initial conditions, kinematics to the
inverse dynamic analysis.

::::{if-builder:: html
```{rubric} Tutorial content
```
::::

```{toctree}
:maxdepth: 1
Expand Down
18 changes: 18 additions & 0 deletions Introduction_to_mechanics/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

::: {rst-class} break
:::


# Introduction to mechanics in AnyBody


The individual windows will be explained in greater detail in the
following lessons:

```{toctree}
:maxdepth: 1
Lesson1 <lesson1>
```

10 changes: 10 additions & 0 deletions Introduction_to_mechanics/lesson1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
::: {rst-class} break
:::

# Lesson 1: What is multibody dynamics

hello world

## Subsection 1

hello again
6 changes: 5 additions & 1 deletion Tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ Posture_and_movement/intro
Interface_features/index
Troubleshooting_anyscript/intro
Validation_of_models/index
```
```




37 changes: 37 additions & 0 deletions Tutorials_future.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
sd_hide_title: true
---
:::::::::{if-builder} html

# **Future Tutorials**


```{rubric} Future tutorials
:class: sd-fs-4
```

You can find the available tutorials in the sidebar. The tutorials are ordered in a suitable sequence for new users who are unfamiliar with AnyBody, but this sequence may not be optimal for you depending on your background and interests.


{doc}`Introduction to mechanics </Introduction_to_mechanics/index>`
: Shows the basics of AnyBody.


:::::::::



```{toctree}
:caption: Future tutorials
:includehidden: true
:maxdepth: 2
:hidden: true
:titlesonly: true
Introduction_to_mechanics/index
```




4 changes: 4 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ def tagged_commit():
".pytest_cache",
]

if not tags.has("future_tutorials"):
exclude_patterns.append("Tutorials_future.md")
exclude_patterns.append("Introduction_to_mechanics/*")


# The name of the Pygments (syntax highlighting) style to use.
highlight_language = "AnyScriptDoc"
Expand Down
3 changes: 2 additions & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ GettingStarted
:maxdepth: 2
:hidden:
:titlesonly: True
:glob:
Tutorials
Tutorials*
about
```

Expand Down
1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ clean = "rm -rf _build"
linkcheck = {cmd="sphinx-build -M linkcheck . _build -q", depends-on = ["clean"]}
build-pdf = {cmd="sphinx-build -M simplepdf . _build", depends-on = ["clean"]}
build-html = "sphinx-build -M html . _build"
build-html-future = "sphinx-build -M html . _build -t future_tutorials"
build-html-all = "sphinx-build -M html . _build -a"
html = {cmd= 'explorer .\_build\html\index.html', depends_on = ["build-html-all"]}
pdf = {cmd= 'explorer .\_build\simplepdf\Agada-Documentation.pdf', depends_on = ["build-pdf"]}
Expand Down

0 comments on commit 5fe23b8

Please sign in to comment.