html - Octopress site.title 没有改变?

标签 html css octopress

我使用 Octopress 和 coogie 的名为 Oscailte 的主题创建了一个新博客。不过我遇到了一些麻烦。我为博客添加了标题,所有页面都提取了正确的页面标题,但着陆页除外,它提取的是默认标题 - “这是您主页的标题”。

_config.yml 中的代码:

title: TheHopefulWebDev
subtitle: TheHopefulWebDev
author: Joseph Sawyer
simple_search: http://google.com/search
description: TheHopefulWebDev

/source/_includes/custom/header.html 中的代码

<div class="grid__item two-fifths lap-four-sixths palm-one-whole">
  <a href="{{ root_url }}/" class="site-title">{{ site.title }}</a>
</div>

这显示正确。所以我不明白为什么它没有在着陆页上为网站本身提取正确的标题。

感谢任何帮助。

编辑:我应该补充一点,它在浏览器标题栏中显示的完整标题是“这是您主页的标题 -- TheHopefulWebDev”。尝试从/_deploy/index.html 中删除“This is the title..”位,现在显示为:

<title>TheHopefulWebDev</title>

关闭服务器,使用 rake 预览重新启动,仍然得到相同的标题。 :/

最佳答案

想通了。必须在顶部编辑/source/_layouts/default.html:

---
title: Main
---

现在标题栏显示“Main - The Hopeful Web Dev”

希望对大家有帮助。

关于html - Octopress site.title 没有改变?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20535846/

相关文章:

html - 选择选项箭头,响应位置

java - 如何在eclipse中配置 jetty ?

javascript - 模拟固定的正确位置

html - 与 d3 一起使用时文本溢出属性不起作用

macos - Octopress 运行 rake 预览失败

javascript - 添加将 htm 页面加载到 div 区域的 onclick

javascript - 为什么在获取图像值时 this.value 未定义?

css - 为什么这个 less 声明不起作用?

ruby - 使用 Yari-Dependency 在 Windows 7 上安装 Octopress 在执行捆绑安装时不会加载