【问题标题】:Distill and postcards: empty space above navbar蒸馏和明信片:导航栏上方的空白区域
【发布时间】:2022-01-05 06:24:28
【问题描述】:

我的 distill 网站的 postcards 主页在导航栏上方有一个不会消失的空白区域。编辑theme.cssindex.rmd 不会影响空白。其他 HTML 页面看起来不错。由于空白只影响index.html,我假设它与postcards有关。

另外,footer.html 不会出现在 index.html 上,但页脚会出现在其他 HTML 页面上。

只有在我将构建好的网站推送到 Github 时才会出现空白。 index.html 在本地查看时看起来不错。

---
title: "My Name"
image: images/me.jpg
links:
  - label: Twitter
    url: "https://twitter.com/myname"
  - label: GitHub
    url: "https://github.com/mygithubusername"
base_url: https://mygithubusername.github.io/
preview: images/me.jpg
site: distill::distill_website
output: postcards::trestles
---
name: "mygithubusername.github.io"
title: "My Name"
base_url: https://mygithubusername.github.io/
repository_url: https://github.com/mygithubusername/mygithubusername.github.io
twitter:
  site: "@myname"
description: |
  My Website
output_dir: "docs"
theme: theme.css 
navbar:
  right:
    - text: "Home"
      href: index.html
    - text: "Resume"
      href: resume/resume.html
    - text: "Projects"
      menu:
        - text: "project1"
          href: https://github.com/mygithubusername/project1
        - text: "project2"
          href: https://github.com/mygithubusername/project2
        - text: "project3"
          href: project3.html
output: distill::distill_article

【问题讨论】:

    标签: html r r-markdown


    【解决方案1】:

    通过卸载并重新安装 distillpostcards 并将此行添加到 theme.css 来修复它:

    body { margin:0; padding: 0; }
    

    注意:这并不能解决index.html 上没有出现页脚的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-09
      • 2023-03-15
      相关资源
      最近更新 更多