mirror of https://gitlab.com/curben/blog
perf: cache head and header partials
- https://hexo.io/docs/templates#Optimization
This commit is contained in:
parent
30fe50290c
commit
e57d471d24
|
@ -1,5 +1,5 @@
|
|||
<article id="<%= post.layout %>-<%= post.slug %>" class="h-entry article article-type-<%= post.layout %>" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
|
||||
<%- partial('_partial/header') %>
|
||||
<%- partial('_partial/header', {}, { cache: true }) %>
|
||||
<hr class="header-hr">
|
||||
<div class="article-inner">
|
||||
<%- partial('post/gallery') %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="archive-container">
|
||||
<%- partial('_partial/header') %>
|
||||
<%- partial('_partial/header', {}, { cache: true }) %>
|
||||
<hr class="header-hr"/>
|
||||
<%- partial('_partial/archive', {pagination: config.archive, index: true}) %>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="category-container">
|
||||
<%- partial('_partial/header') %>
|
||||
<%- partial('_partial/header', {}, { cache: true }) %>
|
||||
<hr class="header-hr">
|
||||
<%- partial('_partial/archive', {pagination: config.category, index: true}) %>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="<%= config.language %>">
|
||||
<%- partial('_partial/head') %>
|
||||
<%- partial('_partial/head', {}, { cache: true }) %>
|
||||
<%/* set /about page to use "home" page layout */%>
|
||||
<% if (is_current('about/index.html')) { %>
|
||||
<body class="home-body">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="category-container">
|
||||
<%- partial('_partial/header') %>
|
||||
<%- partial('_partial/header', {}, { cache: true }) %>
|
||||
<hr class="header-hr">
|
||||
<%- partial('_partial/archive', {pagination: config.tag, index: true}) %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue