-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
記事一覧参照URLの変更 #1
Comments
{{ define "main" }}
{{ $paginator := .Paginate ( where .Site.RegularPages "Type" "post" ) 10 }}
<main aria-role="main">
<header class="homepage-header">
<h1>{{.Title}}</h1>
{{ with .Params.subtitle }}
<span class="subtitle">{{.}}</span>
{{ end }}
</header>
<div class="homepage-content">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{.Content}}
</div>
<div>
<!-- Note that .Pages is the same as .Site.RegularPages on the homepage template. -->
{{ range $paginator.Pages }}
{{ .Render "summary"}}
{{ end }}
<!-- ここに以下3行コメントアウトを入れるとなぜかうまく表示される。まじでわかんない -->
<!-- {{ range .Site.Pages}} -->
<!-- {{.Render "summary"}} -->
<!-- {{ end }} -->
</div>
{{ if gt $paginator.TotalPages 1 }}
{{ $current := $paginator.PageNumber }}
<div class="nav-links">
<ul class="pagination">
{{ with $paginator.First }}
<a href="{{ .URL }}" aria-label="First"><span aria-hidden="true">«</span></a>
{{ end }}
<a href="{{ if $paginator.HasPrev }}{{ $paginator.Prev.URL }}{{ end }}" aria-label="Previous"><span aria-hidden="true">Previous Page</span></a>
{{ range $paginator.Pagers }}
{{ if eq $current .PageNumber }}
<span href="{{ .URL }}">{{ .PageNumber }}</a>
{{ else }}
<a href="{{ .URL }}">{{ .PageNumber }}</a>
{{ end }}
{{ end }}
<a href="{{ if $paginator.HasNext }}{{ $paginator.Next.URL }}{{ end }}" aria-label="Next"><span aria-hidden="true">Next Page</span></a>
{{ with $paginator.Last }}
<a href="{{ .URL }}" aria-label="Last"><span aria-hidden="true">»</span></a>
{{ end }}
</ul>
</div>
{{ end }}
{{ partial "ad_double_rectangle.html" . }}
</main>
{{ end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What
http://localhost:1313/post
で記事の一覧を確認することができるhttp://localhost:1313/
で記事一覧が確認できるようにしたいThe text was updated successfully, but these errors were encountered: