Jekyll 页面没有更新
Jekyll page isn't updating
我最近将我的静态 Nanoc 站点转换为 Jekyll,这已经快完成了。但是,最近我去添加了一个新页面(通过添加一个名为'menu'的文件夹,在该文件夹中添加一个index.html,并使用相关的YAML事项创建一个根md文件)。该页面呈现良好并且一切正常,但是,当我尝试将内容写入此页面并构建时,它保持默认状态,内容中只有 'Menu' header,没有其他内容。我不确定问题出在哪里,页面在控制台(Jekyll 或开发人员)中没有任何错误,相关文件在那里,当我 运行 [=13= 时页面被识别为已更改] 并进行更改,但它不会将我的更改吐出到 _site/menu 中。我需要在某处添加页面参考吗?有什么问题??
更新(添加代码):
抱歉,我最初发布此代码时无法访问代码。请看下面我的代码
这是损坏页面的页面降价
---
layout: page
title: Menu
permalink: menu/
---
根的 HTML 在这里
---
layout: default
---
<div class="menu">
<div class="container large-padding-top">
<div class="row">
<div class="col-md-12">
<div class="tabbed-area">
<ul class="tabs group">
<li><a href="#box-one">Tab 1</a></li>
<li><a href="#box-two">Tab 2</a></li>
</ul>
<div class="box-wrap">
<div id="box-one">
<p>foo</p>
</div>
<div id="box-two">
<p>bar</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
最后是我的菜单页面(来自构建后的 _site,包括上述 HTML)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Fintons cafe</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--<link rel="apple-touch-icon" href="apple-touch-icon.png">-->
<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700' rel='stylesheet' type='text/css'>
<!--if your on a subpage-->
<link rel="stylesheet" href="../lib/css/bootstrap.min.css">
<link rel="icon" href="../lib/img/favicon.jpg" type="image/x-icon">
<link rel="stylesheet" href="../lib/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="../lib/css/main.css">
<link rel="stylesheet" type="text/css" href="../lib/css/tabs.css">
<script src="../lib/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js"></script>
<script src="../lib/js/main.js"></script>
<script src="../lib/js/vendor/jquery-1.11.2.min.js"></script>
</head>
<body>
<header class="site-header">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img src="../lib/img/logo1.png" class="hidden-xs visible-sm visible-md visible-lg visible-xl" />
<img src="../lib/img/logo1.png" class="visible-xs hidden-sm" style="width:200px;" />
</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a class="nav-link" href="/">Home</a></li> <!--ensures 'Home' is first in list-->
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--ensures that only pages are selected (by checking the title validity), otherwise all root elements are selected-->
<!--hack for making Home go to the left-->
<li><a class="nav-link" href="/about/">About Us</a></li>
<!--site.pages is selected by MD root elements-->
<!--ensures that only pages are selected (by checking the title validity), otherwise all root elements are selected-->
<!--hack for making Home go to the left-->
<li><a class="nav-link" href="/contact/">Contact</a></li>
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--ensures that only pages are selected (by checking the title validity), otherwise all root elements are selected-->
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--ensures that only pages are selected (by checking the title validity), otherwise all root elements are selected-->
<!--hack for making Home go to the left-->
<!--if this is the current page-->
<li><a class="nav-link selected" href="#">Menu</a></li>
</ul>
</div>
</nav>
</header>
<div class="page-content">
<div class="wrapper">
<article class="post">
<header class="post-header">
<h1 class="post-title">Menu</h1>
</header>
<div class="post-content">
</div>
</article>
</div>
</div>
<br />
<footer class="site-footer">
<div class="wrapper">
<center>Copyright © 2016 | Designed by <a href="mailto:rhys.oconnor@outlook.com?Subject=Fintons%20Website">Rhys O'Connor</a></center>
</div>
</footer>
</html>
</body>
</html>
when I tried writing content to this page and building, it stayed
default, with the 'Menu' header in the content and nothing else
如果我没记错的话,{{ content }}
这里不见了:
<div class="post-content">
{{ content }}
</div>
或者您希望它显示的任何其他地方。
希望对您有所帮助。
我最近将我的静态 Nanoc 站点转换为 Jekyll,这已经快完成了。但是,最近我去添加了一个新页面(通过添加一个名为'menu'的文件夹,在该文件夹中添加一个index.html,并使用相关的YAML事项创建一个根md文件)。该页面呈现良好并且一切正常,但是,当我尝试将内容写入此页面并构建时,它保持默认状态,内容中只有 'Menu' header,没有其他内容。我不确定问题出在哪里,页面在控制台(Jekyll 或开发人员)中没有任何错误,相关文件在那里,当我 运行 [=13= 时页面被识别为已更改] 并进行更改,但它不会将我的更改吐出到 _site/menu 中。我需要在某处添加页面参考吗?有什么问题??
更新(添加代码):
抱歉,我最初发布此代码时无法访问代码。请看下面我的代码
这是损坏页面的页面降价
---
layout: page
title: Menu
permalink: menu/
---
根的 HTML 在这里
---
layout: default
---
<div class="menu">
<div class="container large-padding-top">
<div class="row">
<div class="col-md-12">
<div class="tabbed-area">
<ul class="tabs group">
<li><a href="#box-one">Tab 1</a></li>
<li><a href="#box-two">Tab 2</a></li>
</ul>
<div class="box-wrap">
<div id="box-one">
<p>foo</p>
</div>
<div id="box-two">
<p>bar</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
最后是我的菜单页面(来自构建后的 _site,包括上述 HTML)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Fintons cafe</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--<link rel="apple-touch-icon" href="apple-touch-icon.png">-->
<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700' rel='stylesheet' type='text/css'>
<!--if your on a subpage-->
<link rel="stylesheet" href="../lib/css/bootstrap.min.css">
<link rel="icon" href="../lib/img/favicon.jpg" type="image/x-icon">
<link rel="stylesheet" href="../lib/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="../lib/css/main.css">
<link rel="stylesheet" type="text/css" href="../lib/css/tabs.css">
<script src="../lib/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js"></script>
<script src="../lib/js/main.js"></script>
<script src="../lib/js/vendor/jquery-1.11.2.min.js"></script>
</head>
<body>
<header class="site-header">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img src="../lib/img/logo1.png" class="hidden-xs visible-sm visible-md visible-lg visible-xl" />
<img src="../lib/img/logo1.png" class="visible-xs hidden-sm" style="width:200px;" />
</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a class="nav-link" href="/">Home</a></li> <!--ensures 'Home' is first in list-->
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--ensures that only pages are selected (by checking the title validity), otherwise all root elements are selected-->
<!--hack for making Home go to the left-->
<li><a class="nav-link" href="/about/">About Us</a></li>
<!--site.pages is selected by MD root elements-->
<!--ensures that only pages are selected (by checking the title validity), otherwise all root elements are selected-->
<!--hack for making Home go to the left-->
<li><a class="nav-link" href="/contact/">Contact</a></li>
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--ensures that only pages are selected (by checking the title validity), otherwise all root elements are selected-->
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--site.pages is selected by MD root elements-->
<!--ensures that only pages are selected (by checking the title validity), otherwise all root elements are selected-->
<!--hack for making Home go to the left-->
<!--if this is the current page-->
<li><a class="nav-link selected" href="#">Menu</a></li>
</ul>
</div>
</nav>
</header>
<div class="page-content">
<div class="wrapper">
<article class="post">
<header class="post-header">
<h1 class="post-title">Menu</h1>
</header>
<div class="post-content">
</div>
</article>
</div>
</div>
<br />
<footer class="site-footer">
<div class="wrapper">
<center>Copyright © 2016 | Designed by <a href="mailto:rhys.oconnor@outlook.com?Subject=Fintons%20Website">Rhys O'Connor</a></center>
</div>
</footer>
</html>
</body>
</html>
when I tried writing content to this page and building, it stayed default, with the 'Menu' header in the content and nothing else
如果我没记错的话,{{ content }}
这里不见了:
<div class="post-content">
{{ content }}
</div>
或者您希望它显示的任何其他地方。
希望对您有所帮助。