Browse Source

Use `partial` call to include partial templates

Replace `template` call with the `partial` call (new in Hugo v0.12)
for including partial templates
Anthony Fok 10 years ago
parent
commit
e1a4df05e8
3 changed files with 6 additions and 6 deletions
  1. 2
    2
      layouts/_default/list.html
  2. 2
    2
      layouts/_default/single.html
  3. 2
    2
      layouts/index.html

+ 2
- 2
layouts/_default/list.html View File

1
-{{ template "theme/partials/head.html" . }}
1
+{{ partial "head.html" . }}
2
 <body>
2
 <body>
3
 
3
 
4
-  {{ template "theme/partials/sidebar.html" . }}
4
+{{ partial "sidebar.html" . }}
5
 
5
 
6
   <div class="content container">
6
   <div class="content container">
7
     <ul class="posts">
7
     <ul class="posts">

+ 2
- 2
layouts/_default/single.html View File

1
-{{ template "theme/partials/head.html" . }}
1
+{{ partial "head.html" . }}
2
 <body>
2
 <body>
3
 
3
 
4
-{{ template "theme/partials/sidebar.html" . }}
4
+{{ partial "sidebar.html" . }}
5
 
5
 
6
     <div class="content container">
6
     <div class="content container">
7
 <div class="post">
7
 <div class="post">

+ 2
- 2
layouts/index.html View File

1
-{{ template "theme/partials/head.html" . }}
1
+{{ partial "head.html" . }}
2
 <body>
2
 <body>
3
 
3
 
4
-{{ template "theme/partials/sidebar.html" . }}
4
+{{ partial "sidebar.html" . }}
5
 
5
 
6
     <div class="content container">
6
     <div class="content container">
7
 <div class="posts">
7
 <div class="posts">