Skip to content

Commit

Permalink
Fix reload inconsistency when updating frontmatter (#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
Parcly-Taxel authored and Marvin Chin committed Apr 10, 2020
1 parent 9060f56 commit 8b7898e
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ class Page {
}

collectAllPageSections() {
this.pageSectionsHtml = {}; // This resets the pageSectionsHTML whenever we collect.
this.collectPageSection('header');
this.collectPageSection(`#${SITE_NAV_ID}`);
this.collectPageSection('footer');
Expand Down
2 changes: 1 addition & 1 deletion src/template/default/_markbind/footers/footer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<footer>
<!-- Support MarkBind by including a link to us on your landing page! -->
<div class="text-center">
<small>[Generated by {{MarkBind}} on {{timestamp}}]</small>
<small>[Generated by {{MarkBind}}]</small>
</div>
</footer>
6 changes: 6 additions & 0 deletions src/template/default/_markbind/layouts/default/footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<footer>
<!-- Support MarkBind by including a link to us on your landing page! -->
<div class="text-center">
<small>[Generated by {{MarkBind}}]</small>
</div>
</footer>
16 changes: 16 additions & 0 deletions src/template/default/_markbind/layouts/default/header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<header>
<navbar type="dark">
<a slot="brand" href="{{baseUrl}}/index.html" title="Home" class="navbar-brand">Your Logo</a>
<li><a href="{{baseUrl}}/contents/topic1.html" class="nav-link">Topic 1</a></li>
<li><a href="{{baseUrl}}/contents/topic2.html" class="nav-link">Topic 2</a></li>
<dropdown header="Topic 3" class="nav-link">
<li><a href="{{baseUrl}}/contents/topic3a.html" class="dropdown-item">Topic 3a</a></li>
<li><a href="{{baseUrl}}/contents/topic3b.html" class="dropdown-item">Topic 3b</a></li>
</dropdown>
<li slot="right">
<form class="navbar-form">
<searchbar :data="searchData" placeholder="Search" :on-hit="searchCallback" menu-align-right></searchbar>
</form>
</li>
</navbar>
</header>
8 changes: 8 additions & 0 deletions src/template/default/_markbind/layouts/default/navigation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<navigation>
* [Home :house:]({{ baseUrl }}/index.html)
* [Topic 1]({{baseUrl}}/contents/topic1.html)
* [Topic 2]({{baseUrl}}/contents/topic2.html)
* Topic 3 :expanded:
* [Topic 3a]({{baseUrl}}/contents/topic3a.html)
* [Topic 3b]({{baseUrl}}/contents/topic3b.html)
</navigation>
3 changes: 3 additions & 0 deletions src/template/minimal/_markbind/layouts/default/footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<footer>

</footer>
3 changes: 3 additions & 0 deletions src/template/minimal/_markbind/layouts/default/header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<header>

</header>
3 changes: 3 additions & 0 deletions src/template/minimal/_markbind/layouts/default/navigation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<navigation>

</navigation>
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ <h1 id="topic-1">Topic 1<a class="fa fa-anchor" href="#topic-1"></a></h1>
</blockquote>
</div>
</div>
<footer>

<div class="text-center">
<small>[Generated by <a href="https://markbind.org/">MarkBind 2.11.0</a>]</small></div>
</footer>
</div>
</body>
<script src="../markbind/js/vue.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
<span class="fas fa-tools"></span><span> This is a placeholder page</span></box>
</div>
</div>
<footer>

<div class="text-center">
<small>[Generated by <a href="https://markbind.org/">MarkBind 2.11.0</a>]</small></div>
</footer>
</div>
</body>
<script src="../markbind/js/vue.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
<span class="fas fa-tools"></span><span> This is a placeholder page</span></box>
</div>
</div>
<footer>

<div class="text-center">
<small>[Generated by <a href="https://markbind.org/">MarkBind 2.11.0</a>]</small></div>
</footer>
</div>
</body>
<script src="../markbind/js/vue.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
<span class="fas fa-tools"></span><span> This is a placeholder page</span></box>
</div>
</div>
<footer>

<div class="text-center">
<small>[Generated by <a href="https://markbind.org/">MarkBind 2.11.0</a>]</small></div>
</footer>
</div>
</body>
<script src="../markbind/js/vue.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ <h1 id="heading-3">Heading 3<a class="fa fa-anchor" href="#heading-3"></a></h1>
</div>
</nav>
</div>
<footer>

<div class="text-center">
<small>[Generated by <a href="https://markbind.org/">MarkBind 2.11.0</a>]</small></div>
</footer>
</div>
</body>
<script src="markbind/js/vue.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@
<link rel="stylesheet" href="markbind/css/github.min.css">
<link rel="stylesheet" href="markbind/css/markbind.css">
<link rel="stylesheet" href="markbind/layouts/default/styles.css">
<link rel="stylesheet" href="markbind/css/site-nav.css">
</head>

<body>
<div id="app">
<header></header>
<div id="flex-body">
<nav id="site-nav" class="navbar navbar-light bg-transparent">
<div class="border-right-grey nav-inner position-sticky slim-scroll"></div>
</nav>
<div id="content-wrapper">
<h1 id="welcome-to-markbind">Welcome to Markbind<a class="fa fa-anchor" href="#welcome-to-markbind"></a></h1>
<p>This is a minimalistic template. To learn more about authoring contents in Markbind, visit the <a href="https://markbind.org/userGuide/authoringContents.html">User Guide</a>.</p>
Expand Down

0 comments on commit 8b7898e

Please sign in to comment.