👷 🐛 Add index post list content.
This commit is contained in:
parent
2fd445d193
commit
eab0ea3bb1
@ -8,6 +8,8 @@ baseURL: /
|
||||
|
||||
theme: hugo-theme-next
|
||||
|
||||
mainSections: ["post"]
|
||||
|
||||
defaultContentLanguage: zh-cn
|
||||
languages:
|
||||
zh-cn:
|
||||
@ -304,7 +306,7 @@ params:
|
||||
|
||||
# Read more button
|
||||
# If true, the read more button will be displayed in excerpt section.
|
||||
read_more_btn: true
|
||||
readMoreBtn: true
|
||||
|
||||
# Post meta display settings
|
||||
postMeta:
|
||||
|
@ -12,46 +12,48 @@ ColoneFlag:
|
||||
other: ":"
|
||||
|
||||
SbPostsLable:
|
||||
other: "日志"
|
||||
other: 日志
|
||||
SbCatesTitle:
|
||||
other: "分类"
|
||||
other: 分类
|
||||
SbTagsTitle:
|
||||
other: "标签"
|
||||
other: 标签
|
||||
TableOfContents:
|
||||
other: "文章目录"
|
||||
other: 文章目录
|
||||
SiteOverview:
|
||||
other: "站点概览"
|
||||
other: 站点概览
|
||||
RSSLable:
|
||||
other: "RSS 订阅"
|
||||
other: RSS 订阅
|
||||
CCLinkTitle:
|
||||
other: "共享知识"
|
||||
other: 共享知识
|
||||
BackTopLabel:
|
||||
other: "返回顶部"
|
||||
other: 返回顶部
|
||||
|
||||
PostStickyTitle:
|
||||
other: 置顶
|
||||
PostPublishDate:
|
||||
other: "发表于"
|
||||
other: 发表于
|
||||
PostPublishTime:
|
||||
other: "创建时间"
|
||||
other: 创建时间
|
||||
PostLastModDate:
|
||||
other: "更新于"
|
||||
other: 更新于
|
||||
PostLastModTime:
|
||||
other: "修改时间"
|
||||
other: 修改时间
|
||||
PostWords:
|
||||
other: "字数"
|
||||
other: 字数
|
||||
PostWordCount:
|
||||
other: "{{- .WordCount -}}"
|
||||
PostReading:
|
||||
other: "阅读"
|
||||
other: 阅读
|
||||
PostReadTime:
|
||||
other: "{{- .ReadingTime -}}分钟"
|
||||
PostVisitor:
|
||||
other: "浏览数"
|
||||
other: 浏览数
|
||||
PostCatg:
|
||||
other: "分类"
|
||||
other: 分类
|
||||
PostTag:
|
||||
other: "标签"
|
||||
other: 标签
|
||||
PostReadMore:
|
||||
other: "阅读全文"
|
||||
other: 阅读全文
|
||||
|
||||
UserVistorsLabel:
|
||||
other: 总访客量
|
||||
@ -59,4 +61,4 @@ PageViewsLabel:
|
||||
other: 总访问量
|
||||
|
||||
FooterPowerby:
|
||||
other: "由 %s 强力驱动"
|
||||
other: 由 %s 强力驱动
|
@ -40,9 +40,9 @@
|
||||
</header>
|
||||
<!-- Widgets -->
|
||||
{{ partial "widgets" (dict "P" $P) }}
|
||||
<div class="main-inner">
|
||||
<div class="main-inner index posts-expand">
|
||||
<!-- Submenu,Content,Comment -->
|
||||
{{- block "main" . }}{{- end }}
|
||||
{{- block "main" (dict "P" $P "Page" .Page "Paginate" (.Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections)) "Scratch" .Scratch) }}{{- end }}
|
||||
</div>
|
||||
</main>
|
||||
<footer class="footer">
|
||||
|
@ -1,2 +1,61 @@
|
||||
{{- define "main" }}
|
||||
{{ $P := .P }}
|
||||
{{- $lang := .Scratch.Get "lang" }}
|
||||
{{/* $paginator := .Paginate (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections) */}}
|
||||
{{- range .Paginate.Pages }}
|
||||
<div class="post-block">
|
||||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="{{ $lang }}">
|
||||
<link itemprop="mainEntityOfPage" href="{{ .Permalink }}">
|
||||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||||
<meta itemprop="image" content="{{ $P.avatar.url }}">
|
||||
<meta itemprop="name" content="{{ $P.author }}">
|
||||
</span>
|
||||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||||
<meta itemprop="name" content="{{ .Title }}">
|
||||
<meta itemprop="description" content="{{ .Description }}">
|
||||
</span>
|
||||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||||
<meta itemprop="name" content="{{ .Title }}">
|
||||
<meta itemprop="description" content="{{ .Description }}">
|
||||
</span>
|
||||
<header class="post-header">
|
||||
<h2 class="post-title" itemprop="name headline">
|
||||
{{/*- with .Sticky }}
|
||||
{{- if gt . 0 }}
|
||||
<span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}">
|
||||
<i class="fa fa-thumbtack"></i>
|
||||
</span>
|
||||
{{- end }}
|
||||
{{- end */}}
|
||||
{{/*- if not (eq .Link "") }}
|
||||
<a href="{{ .Link }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external">{{ .Title }}</a>
|
||||
{{- else */}}
|
||||
<a href="{{ .Permalink }}" itemprop="url" class="post-title-link">{{ .Title }}</a>
|
||||
{{/*- end */}}
|
||||
</h2>
|
||||
<div class="post-meta-container">
|
||||
{{/* partial "post/meta" . */}}
|
||||
</div>
|
||||
</header>
|
||||
<!-- POST BODY -->
|
||||
<div class="post-body" itemprop="articleBody">
|
||||
{{/*- if .Expand }}
|
||||
{{ .Content }}
|
||||
{{ else */}}
|
||||
{{ .Summary }}
|
||||
{{/*- end */}}
|
||||
</div>
|
||||
<footer class="post-footer">
|
||||
{{- if and $P.readMoreBtn }}
|
||||
<div class="post-button">
|
||||
<a class="btn" href="{{ .Permalink }}#more" rel="contents">
|
||||
{{ T "PostReadMore" }} »
|
||||
</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
<div class="post-eof"></div>
|
||||
</footer>
|
||||
</article>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
Loading…
Reference in New Issue
Block a user