From 08a93c7eb4d77039b28994f95c6f0b55ccdb1d1f Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 5 Oct 2020 11:28:01 -0500 Subject: [PATCH] Set file_scope option Fixes #886 --- .github/workflows/build_book.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_book.yaml b/.github/workflows/build_book.yaml index eb6fbbc..7e26526 100644 --- a/.github/workflows/build_book.yaml +++ b/.github/workflows/build_book.yaml @@ -59,11 +59,16 @@ jobs: uses: actions/cache@v2 with: path: _bookdown_files - key: bookdown-1-${{ hashFiles('**/*Rmd') }} - restore-keys: bookdown-1- + key: bookdown-2-${{ hashFiles('**/*Rmd') }} + restore-keys: bookdown-2- - name: Build site - run: Rscript -e 'bookdown::render_book("index.Rmd", quiet = TRUE)' + run: | + # Allows [implcit heading links] to work; will need to convert + # to explicit before switching to visual editor + options(bookdown.render.file_scope = FALSE) + bookdown::render_book("index.Rmd", quiet = TRUE) + shell: Rscript {0} - name: Deploy to Netlify if: contains(env.isExtPR, 'false')