feat: remove useless codes

gh-pages
nodejh 4 years ago
parent 7a9d0220bf
commit ba0e0ac249

@ -1,18 +1 @@
{{ partial "head.html" . }}
<body>
{{ partial "navigation.html" . }}
<section id="wrapper" class="home">
<article class="post">
<header>
<h1>{{ with .Site.Params.title404 }}{{ . }}{{ else }}404 - Page not found{{ end }}</h1>
<h3>{{ with .Site.Params.subtitle404 }}{{ . }}{{ else }}The content you're looking for doesn't seem to exist.{{ end }}</h3>
</header>
{{ partial "latest-posts.html" . }}
</article>
{{ partial "footer.html" . }}
</section>
</body>
</html>
404

@ -1,4 +1,3 @@
<p class="markdown-image">
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
</p>

@ -3,7 +3,7 @@
<head>
<title>{{ block "title" . }}{{ with .Params.Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
{{ partialCached "site-head.html" . }}
{{ partialCached "head.html" . }}
</head>

@ -1,30 +0,0 @@
{{ partial "head.html" . }}
<body>
{{ partial "navigation.html" . }}
{{ partial "profile.html" . }}
<section id="wrapper" class="home">
{{ range .Data.Pages.GroupByDate "2006" }}
<div class="archive">
<h3>{{ .Key }}</h3>
<ul>
{{ range .Pages }}
<div class="post-item">
<div class="post-time">{{ .Date.Format "Jan 2" }}</div>
<a href="{{ .Permalink }}" class="post-link">
{{ .Title }}
</a>
</div>
{{ end }}
</ul>
</div>
{{ end }}
{{ partial "footer.html" . }}
</section>
<div class="dd">
</div>
{{ partial "js.html" . }}
</body>
</html>

@ -1,55 +0,0 @@
{{ partial "head.html" . }}
<body>
{{ partial "navigation.html" . }}
<section id="wrapper" class="post">
<article>
<header>
<h1>
{{ .Title }}
</h1>
<h2 class="headline">
{{ .Date.Format "Jan 2, 2006 15:04" }}
· {{ if lt 1 .WordCount }}{{ .WordCount }} words{{ else }}{{ .WordCount }} word{{ end }}
· {{ .ReadingTime }} minute read
<span class="tags">
{{ with .Params.tags }}
{{ if ge (len .) 1 }}
{{ range . }}
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
{{ end}}
</span>
</h2>
</header>
{{ if .Site.Params.enableToc }}
{{ if .TableOfContents }}
<div id="toc">
{{ .TableOfContents }}
</div>
{{ end }}
{{ end }}
<section id="post-body">
{{ .Content }}
</section>
</article>
{{ if .Site.Params.enableShare }}
{{ partial "share.html" . }}
{{ end }}
{{ if .Site.Params.enableDisqus }}
{{ partial "disqus.html" . }}
{{ end }}
{{ if .Site.Params.showLatestPosts }}
{{ partial "latest-posts.html" . }}
{{ end }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>

@ -2,6 +2,7 @@
{{ partial "profile.html" . }}
<section id="archive">
{{ range .Data.Pages.GroupByDate "2006" }}
<div class="group">
<h3 class="key">
@ -29,9 +30,11 @@
</div>
{{ end }}
</div>
{{ end }}
</section>

@ -1,27 +0,0 @@
{{ partial "head.html" . }}
<body>
{{ partial "navigation.html" . }}
{{ partial "profile.html" . }}
<section id="wrapper" class="tags">
<div class="page-tags">
<ul>
{{ $data := .Data }}
{{ range $key, $value := .Data.Terms.ByCount }}
{{ if ($value.Name) }}
<li>
<a href="{{ $.Site.BaseURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}">
{{ $value.Name | upper }} <span>({{ $value.Count }})</span>
</a>
</li>
{{ end }}
{{ end }}
</ul>
</div>
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>

@ -1,16 +0,0 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ partial "profile.html" . }}
<section id="wrapper" class="home">
{{ partial "post-list.html" . }}
{{ partial "pagination.html" . }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>
cl

@ -1,13 +0,0 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ .Site.Params.disqusShortname }}';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>

@ -1,31 +1,27 @@
<!DOCTYPE html>
<html {{ with .Site.LanguageCode }}lang="{{ . }}"{{ end }}>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ if .Site.Params.enableTwitterCard }}
{{ partial "twitter-cards.html" . }}
{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ .Hugo.Generator }}
<title>{{ if .IsHome }}{{ .Title }}{{ else }}{{ .Title }} &middot; {{ .Site.Title }}{{ end }}</title>
<link rel="shortcut icon" href="{{ .Site.BaseURL }}images/favicon.ico">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/highlight.css">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
{{ hugo.Generator }}
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }}
{{ if eq .Site.Params.iconFont "font-awesome" }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/font-awesome.min.css">
{{ else }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/monosocialiconsfont.css">
{{ end }}
<link rel="stylesheet" href={{ "css/style.css" | relURL }}>
<link rel="shortcut icon" href={{ "/images/favicon.ico" | relURL }} type="image/x-icon" />
{{ if .Site.Params.enableRSS }}
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
{{ end }}
</head>
{{ if .OutputFormats.Get "RSS" }}
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ end }}
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}

@ -1,25 +0,0 @@
<script src="{{ .Site.BaseURL }}js/jquery-3.3.1.min.js"></script>
<script src="{{ .Site.BaseURL }}js/main.js"></script>
<script src="{{ .Site.BaseURL }}js/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{ range .Site.Params.customJS }}
<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
{{ end }}
{{ if .Site.Params.enableGoogleAnalytics }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ if .Site.Params.enableBaiduAnalytics }}
<script>
var baiduAnalytics = '{{ .Site.Params.baiduAnalytics }}';
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?" + baiduAnalytics;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
{{ end }}

@ -1,11 +0,0 @@
<ul id="post-list" class="archive readmore">
<h3>{{ .Site.Params.readMore | default "Read more" }}</h3>
{{ $kind := where .Site.RegularPages "Section" "!=" "" }}
{{ $othr := where $kind "URL" "!=" .URL }}
{{ range first 10 $othr }}
<li>
<a href="{{ .URL }}">{{ .LinkTitle }}<aside class="dates">{{ .Date.Format "Jan 2 2006" }}</aside></a>
</li>
{{ end }}
</ul>

@ -4,16 +4,13 @@
<a href='{{ .Site.BaseURL }}'> <span class="arrow"></span>{{ with .Site.Params.home }}{{ . }}{{ else }}Home{{ end }}</a>
{{ end }}
<a href='{{ .Site.BaseURL }}posts'>{{ with .Site.Params.archive }}{{ . }}{{ else }}Archive{{ end }}</a>
<a href='{{ .Site.BaseURL }}tags'>{{ with .Site.Params.tags }}{{ . }}{{ else }}Tags{{ end }}</a>
<a href='{{ .Site.BaseURL }}about'>{{ with .Site.Params.about }}{{ . }}{{ else }}About{{ end }}</a>
{{ range $element := .Site.Params.Links }}
<a href="{{ $element.path }}">{{ $element.name }}</a>
{{ end }}
{{ range $val := .Site.Params.Li }}
<a href="{{ $val }}">{{ $val }}</a>
{{ end }}
{{ if .Site.Params.enableRSS }}
<a class="button" href="{{ .Site.RSSLink }}">{{ with .Site.Params.subscribe }}{{ . }}{{ else }}Subscribe{{ end }}</a>
{{ end }}

@ -1,18 +0,0 @@
<nav id="post-nav">
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
{{ if .Paginator.HasPrev }}
<span class="prev">
<a href="{{.Paginator.Prev.URL}}">
<span class="arrow"></span> {{ with .Site.Params.newerPosts }}{{ . }}{{ else }}Newer Posts{{ end }}
</a>
</span>
{{ end }}
{{ if .Paginator.HasNext }}
<span class="next">
<a href="{{.Paginator.Next.URL}}">
{{ with .Site.Params.olderPosts }}{{ . }}{{ else }}Older Posts{{ end }} <span class="arrow"></span>
</a>
</span>
{{ end }}
{{ end }}
</nav>

@ -1,20 +0,0 @@
<ul id="post-list">
{{ range where .Paginator.Pages "Params.hidden" "ne" "true" }}
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if ne $url "about/" }}
<li>
<aside class="dates">{{ .Date.Format "Jan 2" }}</aside>
<a href='{{ .Permalink }}'>
{{ .Title }}
{{ if .Site.Params.enableSummary }}
{{ if .Site.Params.useDescriptionReplaceSummary }}
<h2>{{ .Description | plainify }}</h2>
{{ else }}
<h2>{{ .Summary | plainify | htmlUnescape }}</h2>
{{ end }}
{{ end }}
</a>
</li>
{{ end }}
{{ end }}
</ul>

@ -1,9 +0,0 @@
<a class="twitter" href="https://twitter.com/intent/tweet?text={{ .Permalink }} - {{ .LinkTitle }} {{ with .Site.Params.twitter }}by @{{ . }}{{ end }}"><span class="icon-twitter"> {{ .Site.Params.tweet | default "tweet" }}</span></a>
<a class="facebook" href="#" onclick="
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
'facebook-share-dialog',
'width=626,height=436');
return false;"><span class="icon-facebook-rect"> {{ .Site.Params.share | default "Share" }}</span>
</a>

@ -1,31 +0,0 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
{{ hugo.Generator }}
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }}
<link rel="stylesheet" href={{ "css/style.css" | relURL }}>
<link rel="shortcut icon" href={{ "/images/favicon.ico" | relURL }} type="image/x-icon" />
{{ if .OutputFormats.Get "RSS" }}
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ end }}
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}

@ -1,46 +0,0 @@
{{ if .IsPage }}
{{ with .Params.images }}
<!-- Twitter summary card with large image must be at least 280x150px -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image:src" content="{{ index . 0 | absURL }}"/>
{{ else }}
<meta name="twitter:card" content="summary"/>
{{ if .Site.Params.twitterCardImage }}
<meta name="twitter:image" content="{{ .Site.Params.twitterCardImage | absURL }}" />
{{ else }}
<meta name="twitter:image" content="{{ .Site.BaseURL }}images/avatar.png" />
{{ end }}
{{ end }}
<!-- Twitter Card data -->
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>
{{ with .Site.Params.twitter }}
<meta name="twitter:site" content="@{{ . }}"/>
{{ end }}
{{ range .Site.Authors }}
{{ with .twitter }}
<meta name="twitter:creator" content="@{{ . }}"/>
{{ end }}
{{ end }}
<!-- no post authors, show site author -->
{{ if eq (len .Site.Authors) 0 }}
<meta name="twitter:creator" content="@{{ .Site.Params.author }}"/>
{{ end }}
{{ else }}
<meta name="twitter:card" content="summary" />
{{ with .Site.Params.twitter }}
<meta name="twitter:site" content="@{{ . }}"/>
{{ end }}
{{ with .Site.Params.author }}
<meta name="twitter:creator" content="@{{ . }}"/>
{{ end }}
<meta name="twitter:title" content="{{ .Site.Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>
{{ if .Site.Params.twitterCardImage }}
<meta name="twitter:image" content="{{ .Site.Params.twitterCardImage | absURL }}" />
{{ else }}
<meta name="twitter:image" content="{{ .Site.BaseURL }}images/avatar.png" />
{{ end }}
{{ end }}

@ -1,19 +0,0 @@
{{ partial "head.html" . }}
<body>
{{ partial "navigation.html" . }}
{{ partial "profile.html" . }}
<section id="about" class="home">
{{ .Content }}
{{ if .Site.Params.enableDisqus }}
{{ if ne .Params.disabledisqus "true" }}
{{ partial "disqus.html" . }}
{{ end }}
{{ end }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
Loading…
Cancel
Save