Skip to content

Commit

Permalink
Merge branch 'master' into hg/bayes-sde
Browse files Browse the repository at this point in the history
  • Loading branch information
yebai authored Jun 14, 2024
2 parents 6700a7b + 71e2303 commit bb6283b
Show file tree
Hide file tree
Showing 17 changed files with 4,875 additions and 350 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
const prNumber = context.payload.pull_request.number;
const repoName = context.repo.repo;
const previewUrl = `https://turinglang.org/${repoName}/pr-previews/${prNumber}`;
const commentBody = `Preview the changes: ${previewUrl}`;
const commentBody = `Preview the changes: ${previewUrl}, Please avoid using the search feature and navigation bar in PR previews!`;
const botUsername = 'github-actions[bot]';
// Check for existing comments by the bot
Expand Down Expand Up @@ -135,4 +135,4 @@ jobs:
body: commentBody,
});
}


19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
- name: Render Quarto site
run: quarto render

- name: Rename original search index
run: mv _site/search.json _site/search_original.json

- name: Save _freeze folder
id: cache-primes-save
uses: actions/cache/save@v4
Expand All @@ -44,6 +47,22 @@ jobs:
_freeze/
key: ${{ runner.os }}-primes-${{ github.run_id }}

- name: Install jq
run: sudo apt-get install jq

- name: Fetch search_original.json from main site
run: curl -O https://raw.githubusercontent.com/TuringLang/turinglang.github.io/gh-pages/search_original.json

- name: Convert main site search index URLs to relative URLs
run: |
jq 'map(
if .href then .href = "../" + .href else . end |
if .objectID then .objectID = "../" + .objectID else . end)' search_original.json > fixed_main_search.json
- name: Merge both search index
run: |
jq -s '.[0] + .[1]' _site/search_original.json fixed_main_search.json > _site/search.json
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Documentation and Tutorials for Turing.jl

This repository contains the Turing.jl documentation and tutorials.
This repository is part of [Turing.jl's](https://turinglang.org/) website (i.e. `https://turinglang.org/docs/`). It contains the Turing.jl documentation and tutorials.

- The `master` branch contains the quarto source
- The `gh-pages` branch contains the `html` version of these documents compiled from the `master` branch.
- The `gh-pages` branch contains the `html` version of these documents compiled from the `master` branch.

To get started with the docs website locally, you'll need to have the following prerequisite installed:

Expand Down Expand Up @@ -38,7 +38,12 @@ Note: Avoid clicking links in the navbar while previewing locally because they w
```
This will render the full website in `_site` folder.

This repository is part of [Turing.jl's](https://turinglang.org/) Website, i.e. `https://turinglang.org/docs/`. You can see the main website's repo [here](https://github.com/TuringLang/turinglang.github.io).
It is also possible to render a single tutorial or `qmd` file without compiling the entire site. This is often helpful to speed up compilation when editing a single docs page. To do this, first `cd` to the file's folder, and run `quarto preview` or `quarto render`:
```
cd somedocs # This is the folder containing a docs `qmd` file.
quarto render index.qmd
```
## License
Expand Down
4 changes: 4 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ website:
- text: "Quick Start"
href: tutorials/docs-14-using-turing-quick-start/index.qmd
- tutorials/docs-12-using-turing-guide/index.qmd
- text: "Mode Estimation"
href: tutorials/docs-17-mode-estimation/index.qmd
- tutorials/docs-09-using-turing-advanced/index.qmd
- tutorials/docs-10-using-turing-autodiff/index.qmd
- tutorials/docs-13-using-turing-performance-tips/index.qmd
Expand Down Expand Up @@ -106,6 +108,8 @@ website:
contents:
- tutorials/docs-04-for-developers-abstractmcmc-turing/index.qmd
- tutorials/docs-07-for-developers-variational-inference/index.qmd
- text: "Implementing Samplers"
href: tutorials/docs-17-implementing-samplers/index.qmd


page-footer:
Expand Down
Loading

0 comments on commit bb6283b

Please sign in to comment.