[英]Building Bookdown to HTML loses styled formatting
我有一個很大的 Bookdown 文檔,我想將它作為 HTML 文件托管在網站上。 我使用bookdown::gitbook
構建到一個網站,本地預覽看起來不錯。 但是,當我在網站中托管 html 文件時,它們似乎丟失了 HTML 樣式並且看起來很糟糕。 有什么解決方法嗎?
編輯:在我的 Index.Rmd 文件的開頭添加 yaml:
---
title: "Team Documentation"
author: "Maxx"
date: "Updated on `r Sys.Date()`"
knit: "bookdown::render_book"
site: bookdown::bookdown_site
bibliography: [book.bib]
biblio-style: apalike
link-citations: yes
colorlinks: yes
lot: yes
lof: yes
fontsize: 13pt
monofontoptions: "Scale=0.7"
description: "This is a collection of commonly used information and how-to documents"
output:
bookdown::gitbook:
self_contained: true
css: css/style.css
split_by: section+number
config:
toc:
collapse: section
before: |
<li><a href="./index.html">Documentation</a></li>
after: null
toolbar:
position: fixed
edit: null
download: null
search: yes
sharing: false
info: yes
bookdown::html_book:
css: css/toc.css
---
找到了一個解決方案:將 Bookdown Gitbook 粉碎成一個獨立的 html 文件以托管在靜態站點上會導致糟糕的情況 + 額外的維護步驟,所以我最終放棄了靜態站點,轉而托管為 Azure 應用程序服務站點。 我的步驟:
該解決方案具有以下優勢:
我希望這對其他人也有幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.