diff --git a/_quarto.yml b/_quarto.yml index 9e0ae91..4f16d21 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -10,6 +10,8 @@ format: css: styles/report.css embed-resources: true toc: false + filters: + - filters/html-no-extra-meta.lua typst: lang: fa mainfont: IRNazanin diff --git a/examples/product-test.qmd b/examples/product-test.qmd index 4ff4918..9ca2555 100644 --- a/examples/product-test.qmd +++ b/examples/product-test.qmd @@ -11,16 +11,6 @@ author: # Shown on the PDF sidebar (not the travel-report meta block). destinations: - نتایج تست پیگمنت‌های شرکت اسمالتس -format: - html: - include-before-body: - - text: | -
-
موضوع
نتایج تست پیگمنت‌های شرکت اسمالتس
-
نویسنده
دیاکو سلطانپور
-
تاریخ
۲۲ تا ۴/۶/۲۶
-
- typst: default --- # اطلاعات کلی diff --git a/filters/html-no-extra-meta.lua b/filters/html-no-extra-meta.lua new file mode 100644 index 0000000..c814763 --- /dev/null +++ b/filters/html-no-extra-meta.lua @@ -0,0 +1,9 @@ +-- Keep YAML author for Typst/PDF (sidebar + document metadata), +-- but strip it from HTML so the page does not show more than the PDF body. +function Meta(meta) + if quarto.doc.is_format("html") then + meta.author = nil + meta["by-author"] = nil + end + return meta +end diff --git a/styles/report.css b/styles/report.css index 8a1c52a..3e95548 100644 --- a/styles/report.css +++ b/styles/report.css @@ -45,8 +45,10 @@ h1.title { } .quarto-title-meta, -.quarto-title-meta-contents { - text-align: right; +.quarto-title-meta-contents, +p.author, +.quarto-title-meta-author { + display: none; } .report-meta {