Code Monkey home page Code Monkey logo

monreestudio.github.io's People

Contributors

monreestudio avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

monreestudio.github.io's Issues

给 Header 加一点魔法

@MonreeStudio 要在特定的页面隐藏 Header,可以考虑魔改一下布局文件,当 page.layout 含有 no-header 子串时跳过 Header 的加载。

themes/edinburgh/layout/layout.ejs

diff --git a/layout/layout.ejs b/layout/layout.ejs
index 5a69488..4cd9a80 100644
--- a/layout/layout.ejs
+++ b/layout/layout.ejs
@@ -5,8 +5,11 @@
 
   <body>
   	<div class="container-fluid navbar-container m-sm-5">
-      <!-- Header -->
-      <%- partial('_partial/header') %>
+      <% // Skip header if page.layout contains '-no-header' substring %>
+      <% if (!(page.layout && page.layout.includes("-no-header"))) { %>
+        <!-- Header -->
+        <%- partial('_partial/header') %>
+      <% } %>
 
   		<div class="row">
   			<%- body %>

下面是一个测试用的页面:

---
title: Summer
date: 2020-08-09 22:05:58
layout: page-no-header
---

## 夏天

天青色等烟雨,而我在等你。
月色被打捞起,晕开了结局。

效果如下:

图片

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.