diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml new file mode 100644 index 0000000..8c382c7 --- /dev/null +++ b/.github/workflows/check-broken-links.yml @@ -0,0 +1,20 @@ +name: Check broken links + +on: + workflow_dispatch: + pull_request: + +jobs: + linkChecker: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check for broken links in docs + uses: JustinBeckwith/linkinator-action@v1 + with: + paths: 'docs/**/*.md' + markdown: true + # There is crawler checking on some DOI sites, so lets skip them + linksToSkip: "https://doi.org*" \ No newline at end of file diff --git a/docs/for-developers/index.md b/docs/for-developers/index.md index d4a9372..442f72f 100644 --- a/docs/for-developers/index.md +++ b/docs/for-developers/index.md @@ -17,5 +17,5 @@ Choose your operating system: ## Contribute to the web site -If you wish to contribute to the development of the TreePPL web site, there are detailed instructions on how to fork the TreePPL web site repo, edit the content, render the new content locally to check it out, and create a pull request in the README file in the [TreePPL web site repo](https://github.com/treeppl/treeppl/treeppl.github.io). +If you wish to contribute to the development of the TreePPL web site, there are detailed instructions on how to fork the TreePPL web site repo, edit the content, render the new content locally to check it out, and create a pull request in the README file in the [TreePPL web site repo](https://github.com/treeppl/treeppl.github.io). diff --git a/docs/for-developers/install_windows.md b/docs/for-developers/install_windows.md index 8fbea26..7905a8c 100644 --- a/docs/for-developers/install_windows.md +++ b/docs/for-developers/install_windows.md @@ -6,4 +6,4 @@ Install WSL2 and GUI [support](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps). -Then follow the [Linux instructions](./install_linux). +Then follow the [Linux instructions](./install_linux.md). diff --git a/docs/index.md b/docs/index.md index d20127d..3259ad9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,20 +5,19 @@ sidebar_position: 1 # TreePPL documentation -If you are new to universal probabilistic programming and TreePPL, we recommend beginning by going through our [introductory tutorial](docs/tutorials/treeppl-intro). +If you are new to universal probabilistic programming and TreePPL, we recommend beginning by going through our [introductory tutorial](./tutorials/treeppl-intro.md). The TreePPL documentation consists of: - - [Installing TreePPL](docs/installing), with instructions on how to install TreePPL, - - [Python interface](docs/python-interface), documenting the Python interface, - - [Jupyter interface](docs/jupyter-interface), describing how to work with TreePPL in Jupyter notebooks, - - [R interface](docs/R-interface), documenting the R interface, - - [Tutorials](docs/tutorials), in which the user learns by doing something meaningful, towards some achievable goal, - - [Language overview](docs/language-overview), which contains a basic language description, - - [Distributions](docs/distributions), describing available distributions and related information, - - [Inference methods](docs/inference), describing available inference techniques, - - [Model library](docs/model-library), which contains model examples that can be used as templates, - - [Troubleshooting](docs/troubleshooting), describing solutions to problems you may encounter when installing or running TreePPL, - - [Contribute to TreePPL development](docs/for-developers), with instructions for installing the command-line version and for contributing to the TreePPL development effort, - - [How to cite](docs/how_to_cite), with information on how to cite TreePPL. - + - [Installing TreePPL](./installing.md), with instructions on how to install TreePPL, + - [Python interface](./python-interface.md), documenting the Python interface, + - [Jupyter interface](./jupyter-interface.md), describing how to work with TreePPL in Jupyter notebooks, + - [R interface](./R-interface/index.md), documenting the R interface, + - [Tutorials](./tutorials/index.md), in which the user learns by doing something meaningful, towards some achievable goal, + - [Language overview](./language-overview.md), which contains a basic language description, + - [Distributions](./distributions.md), describing available distributions and related information, + - [Inference methods](./inference.md), describing available inference techniques, + - [Model library](./model-library/index.md), which contains model examples that can be used as templates, + - [Troubleshooting](./troubleshooting.md), describing solutions to problems you may encounter when installing or running TreePPL, + - [Contribute to TreePPL development](./for-developers/index.md), with instructions for installing the command-line version and for contributing to the TreePPL development effort, + - [How to cite](./how_to_cite.md), with information on how to cite TreePPL. diff --git a/docs/installing.md b/docs/installing.md index 7071b2c..7b4abaf 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -9,11 +9,11 @@ import TabItem from '@theme/TabItem'; We have developed R and Python interfaces to facilitate installation, data preparation, program compilation and execution, post-processing, and visualization of inference results. We strive to provide the same functionalities in R and Python, but there might be small differences between the two interfaces because the project is under active development. -If you want to contribute to TreePPL development, see [Instructions for developers](/docs/for-developers/). If you encounter problems following the instructions below, see our [troubleshooting guide](/docs/troubleshooting). +If you want to contribute to TreePPL development, see [Instructions for developers](./for-developers/index.md). If you encounter problems following the instructions below, see our [troubleshooting guide](./troubleshooting.md). :::warning -We currently support Linux and MacOS only. For Windows users there are two options: use a virtual machine/server/cluster or use TreePPL with _WSL_ (see [Windows installation instructions](/docs/for-developers/install_windows)). +We currently support Linux and MacOS only. For Windows users there are two options: use a virtual machine/server/cluster or use TreePPL with _WSL_ (see [Windows installation instructions](./for-developers/install_windows.md)). ::: diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 20f385c..222fbf0 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -5,9 +5,9 @@ sidebar_position: 11 # Troubleshooting -Here we collect a few tips on how to solve problems you may encounter when installing or running TreePPL. If you cannout solve your problem using any of the tips listed here, please open an issue on TreePPL's [github repo](https://https://github.com/treeppl/treeppl). +Here we collect a few tips on how to solve problems you may encounter when installing or running TreePPL. If you cannout solve your problem using any of the tips listed here, please open an issue on TreePPL's [github repo](https://github.com/treeppl/treeppl). If you find errors or have suggestions for improvement in the documentation, report it to the [web site repo](https://github.com/treeppl/treeppl.github.io). -You can also contribute to addressing the issue(s) yourself.See instructions [here](for-developers). +You can also contribute to addressing the issue(s) yourself.See instructions [here](for-developers/index.md). ## Installation diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md index 2b1b446..2cd96c0 100644 --- a/docs/tutorials/index.md +++ b/docs/tutorials/index.md @@ -7,5 +7,5 @@ sidebar_position: 6 The objective of the tutorials is to teach you a skill by example. The following tutorials are available currently: - - [Introduction to probabilistic programming in TreePPL](docs/tutorials/treeppl-intro.md). + - [Introduction to probabilistic programming in TreePPL](./treeppl-intro.md). diff --git a/docs/tutorials/pigeons.md b/docs/tutorials/pigeons.md index 46a7d98..c706a67 100644 --- a/docs/tutorials/pigeons.md +++ b/docs/tutorials/pigeons.md @@ -12,7 +12,7 @@ import TabItem from '@theme/TabItem'; In this tutorial we will demonstrate how to use the Julia package [Pigeons.jl](https://pigeons.run/stable/) to parallelize and improve MCMC inference in TreePPL with parallel tempering. Parallel tempering is particularly powerful for combinatorial, multimodal and overparametrized posteriors, which abound in statistical phylogenetics. -We will use the [constant rate birth-death](../examples/div.md#constant-rate-birth-death) (CRBD) model as the running example. +We will use the [constant rate birth-death](../model-library/div.md#constant-rate-birth-death) (CRBD) model as the running example. ### What is parallel tempering and Pigeons? MCMC algorithms are inherently sequential algorithms, since the next iteration depends explicitly on what we are computing in the current. diff --git a/docusaurus.config.js b/docusaurus.config.js index 2c26811..328dc61 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -17,10 +17,8 @@ const config = { organizationName: 'treeppl', trailingSlash: false, deploymentBranch: 'gh-pages', - // TODO We should eventually fix broken links and throw if any are found - // onBrokenLinks: 'throw', - onBrokenLinks: 'warn', - onBrokenMarkdownLinks: 'warn', + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'throw', favicon: 'img/favicon.ico', presets: [