diff --git a/.github/workflows/build_book.yml b/.github/workflows/build_book.yml index d590e4d..2502f14 100644 --- a/.github/workflows/build_book.yml +++ b/.github/workflows/build_book.yml @@ -15,7 +15,6 @@ jobs: env: CRAN: "https://packagemanager.posit.co/cran/__linux__/jammy/latest" GITHUB_PAT: ${{ secrets.PAT }} - if: "contains(github.event.head_commit.message, 'deploy: {')" steps: - uses: actions/checkout@v3 @@ -37,10 +36,11 @@ jobs: pak::pak(c("arrow", "cluster", "dplyr", "flextable", "formatters", "gdtools", "gfonts", "ggforce", "ggplot2", "grid", "magick", "officer", "palmerpenguins", "patchwork", "ragg", "readxl", "rmarkdown", "scales", "stringr", "systemfonts", "tables", "tibble", "tidyverse", "yaml", "remotes", "tinytex", "quarto", "knitr", "htmltools", "here", "renv")) shell: Rscript {0} - - name: Generate books + # Generate the Quarto book + - name: Render Quarto Project run: | - quarto::quarto_render(input = ".", as_job = FALSE) - shell: Rscript {0} + quarto render + shell: bash - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 diff --git a/03-flextable-exo.qmd b/03-flextable-exo.qmd index bf2290a..366df64 100644 --- a/03-flextable-exo.qmd +++ b/03-flextable-exo.qmd @@ -13,7 +13,7 @@ library(tidyverse) ## Tableau des cancers en 2021 -On va travailler sur un jeu de données présenté sur le site https://data.ameli.fr/pages/data-pathologies/. Le jeu présente quelques statistiques sur le cancer en 2021. +On va travailler sur un jeu de données présenté sur le site . Le jeu présente quelques statistiques sur le cancer en 2021. On vous demande de construire de façon itérative un tableau présentant simplement les données tout en suivant quelques règles de formatage. diff --git a/_init.qmd b/_init.qmd index 9e6df92..a0e0a18 100644 --- a/_init.qmd +++ b/_init.qmd @@ -1,24 +1,8 @@ - - - ```{r include=FALSE} - # Execute in other qmd files by calling {{< include _init.qmd >}} - - library(knitr) library(flextable) -#Load options -options <- yaml::yaml.load_file('_options.yml', handlers=list(logical=traindown:::verbatim_logical)) -for (name in names(options)) { - assign(x = name, value = options[[name]], envir = .GlobalEnv) -} - -#For backwards compatibility when calling just show_answer and not options$show_answer -list2env(options, envir = globalenv()) - - # Additions to temp file paths so they don't cause latex error with "C:" tempfile <- function(...) { base::tempfile(...) |> normalizePath(winslash = '/', mustWork = FALSE) @@ -28,21 +12,6 @@ tempdir <- function(...) { } - -rmd_file_show <- function(path) { - x <- list(path = path) - class(x) <- "rmd_file_show" - x -} - -knit_print.rmd_file_show <- function(x, echo=FALSE, ...) { - str <- c("````markdown", - readLines(con = x$path), - "````" - ) |> paste0(collapse = "\n") - asis_output(str) -} - gdtools::register_gfont("Open Sans") opts_chunk$set(ft.tabcolsep = 2) @@ -73,11 +42,5 @@ opts_chunk$set( ) ) -if (options$use_df_printer) { - use_df_printer() -} - - - - +use_df_printer() ```