From fb7f6352243363adf77ab5c959f50eab09c8a71b Mon Sep 17 00:00:00 2001 From: Luong Nguyen Thanh Date: Sun, 23 Jun 2024 09:54:58 +0200 Subject: [PATCH 1/3] Update render_book_on_pr.yml --- .github/workflows/render_book_on_pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/render_book_on_pr.yml b/.github/workflows/render_book_on_pr.yml index 816d935b..1153cde2 100644 --- a/.github/workflows/render_book_on_pr.yml +++ b/.github/workflows/render_book_on_pr.yml @@ -74,10 +74,11 @@ jobs: git add . git commit -m "CI added changes `date +'%Y-%m-%d %H:%M:%S'`" || echo "No changes to commit" git push origin || echo "No changes to commit" + - name: Push changes uses: ad-m/github-push-action@master with: - branch: main + branch: master github_token: ${{ secrets.GITHUB_TOKEN }} force: true From bf7d80c20be367f70c3666d27d9ac1eee15b36df Mon Sep 17 00:00:00 2001 From: Luong Nguyen Thanh Date: Sun, 23 Jun 2024 10:04:07 +0200 Subject: [PATCH 2/3] correct the indentation --- _quarto.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index f5ba8d7c..03c4ed84 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -17,18 +17,18 @@ book: # site-url: https://epirhandbook.com sharing: ["twitter", "facebook", "linkedin"] sidebar: - logo: "images/Applied_Epi_logo.png" - tools: - - icon: twitter - href: "https://twitter.com/appliedepi" - - icon: linkedin - href: "https://www.linkedin.com/company/appliedepi/" - # - icon: github - # menu: - # - text: Source Code - # url: "https://github.com/appliedepi/epihandbook_eng" - # - text: Report a Bug - # url: "https://github.com/appliedepi/epihandbook_eng/issues/new" + logo: "images/Applied_Epi_logo.png" + tools: + - icon: twitter + href: "https://twitter.com/appliedepi" + - icon: linkedin + href: "https://www.linkedin.com/company/appliedepi/" + # - icon: github + # menu: + # - text: Source Code + # url: "https://github.com/appliedepi/epihandbook_eng" + # - text: Report a Bug + # url: "https://github.com/appliedepi/epihandbook_eng/issues/new" date: today date-format: "MMM D, YYYY" From c0b6f325a8c84a3a0c4e2da6217e41afcbf885ed Mon Sep 17 00:00:00 2001 From: Luong Nguyen Thanh Date: Sun, 23 Jun 2024 13:57:35 +0200 Subject: [PATCH 3/3] update github action --- .github/workflows/render_book_on_pr.yml | 5 ++ _quarto.yml | 111 +++++++++++------------- 2 files changed, 57 insertions(+), 59 deletions(-) diff --git a/.github/workflows/render_book_on_pr.yml b/.github/workflows/render_book_on_pr.yml index 1153cde2..81917037 100644 --- a/.github/workflows/render_book_on_pr.yml +++ b/.github/workflows/render_book_on_pr.yml @@ -51,6 +51,11 @@ jobs: # - name: Render the book # # uses: quarto-dev/quarto-actions/render@v2 # run: Rscript -e 'source("quarto_runfile.R")' + - name: Fix locale + run: | + export LANG=en_US.UTF-8 + export LC_CTYPE=en_US.UTF-8 + export LC_ALL=en_US.UTF-8 - name: Render the book shell: Rscript {0} diff --git a/_quarto.yml b/_quarto.yml index 03c4ed84..e9004699 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -8,6 +8,50 @@ published-title: "Last updated" # default: full # group: # - [full, small] +lightbox: true # Lightbox images allow a reader to click to see a larger version of the image (including any caption) + +babelquarto: + languagecodes: + - name: vn + text: "Tiếng Việt" + - name: fr + text: "Français" + - name: es + text: "Español" + - name: jp + text: "日本" + - name: tr + text: "Türkçe" + - name: pt + text: "Português" + - name: ru + text: "Русский" + - name: de + text: "Deutsch" + - name: en + text: "English" + + mainlanguage: 'en' + languages: ['fr', 'es', 'vn', 'jp', 'pt', 'tr', 'ru'] #'de' fr + +title-vn: "Cẩm nang dịch tễ học với R" +title-fr: "Le Epi R Handbook" +title-es: "EpiRhandbook en español" +title-jp: "疫学のための R ハンドブック" +title-tr: "Epidemiyologun R Rehberi" +title-pt: "Manual de R para Epidemiologistas" +title-ru: "Справочник эпидемиолога R" +title-de: "EpiRhandbook auf Deutsch" + +lang: en + +format: + html: + include-in-header: + - banner.html + theme: + light: cosmo + dark: [darkly, theme-dark.scss] book: title: "The Epidemiologist R Handbook" @@ -23,12 +67,12 @@ book: href: "https://twitter.com/appliedepi" - icon: linkedin href: "https://www.linkedin.com/company/appliedepi/" - # - icon: github - # menu: - # - text: Source Code - # url: "https://github.com/appliedepi/epihandbook_eng" - # - text: Report a Bug - # url: "https://github.com/appliedepi/epihandbook_eng/issues/new" + # - icon: github + # menu: + # - text: Source Code + # url: "https://github.com/appliedepi/epihandbook_eng" + # - text: Report a Bug + # url: "https://github.com/appliedepi/epihandbook_eng/issues/new" date: today date-format: "MMM D, YYYY" @@ -48,7 +92,7 @@ book: # ABOUT BOOK - part: "About this book" - part-vn: "Về cuốn sách này" + part-vn: "Về cuốn sách này" part-fr: "À propos de ce livre" part-es: "Acerca de este libro" part-jp: "本書について" @@ -77,7 +121,7 @@ book: - new_pages/r_projects.qmd - new_pages/importing.qmd - # DATA MANGEMENT + # DATA MANAGEMENT - part: "Data Management" part-vn: "Quản lý dữ liệu" part-fr: "Gestion des données" @@ -98,7 +142,6 @@ book: - new_pages/deduplication.qmd - new_pages/iteration.qmd - # ANALYSIS - part: "Analysis" part-vn: "Phân tích dữ liệu" @@ -123,7 +166,6 @@ book: - new_pages/survival_analysis.qmd #done - new_pages/gis.qmd #done - # DATA VIZ - part: "Data Visualization" part-vn: "Trực quan hóa dữ liệu" @@ -165,7 +207,6 @@ book: - new_pages/flexdashboard.qmd #done - new_pages/shiny_basics.qmd #done - # MISCELLANEOUS - part: "Miscellaneous" part-vn: "Các chủ điểm khác" @@ -187,51 +228,3 @@ book: - new_pages/data_table.qmd #done # new_pages/rstudio_advanced.qmd - - -lightbox: true # Lightbox images allow a reader to click to see a larger version of the image (including any caption) - - -babelquarto: - languagecodes: - - name: vn - text: "Tiếng Việt" - - name: fr - text: "Français" - - name: es - text: "Español" - - name: jp - text: "日本" - - name: tr - text: "Türkçe" - - name: pt - text: "Português" - - name: ru - text: "Русский" - - name: de - text: "Deutsch" - - name: en - text: "English" - - mainlanguage: 'en' - languages: ['fr', 'es', 'vn', 'jp', 'pt', 'tr', 'ru'] #'de' fr - -title-vn: Cẩm nang dịch tễ học với R -title-fr: Le Epi R Handbook -title-es: EpiRhandbook en español -title-jp: 疫学のための R ハンドブック -title-tr: Epidemiyologun R Rehberi -title-pt: Manual de R para Epidemiologistas -title-ru: Справочник эпидемиолога R -title-de: EpiRhandbook auf Deutsch - - -lang: en - -format: - html: - include-in-header: - - banner.html - theme: - light: cosmo - dark: [darkly, theme-dark.scss] #superhero \ No newline at end of file