Skip to content
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

Implements single.html #9

Closed
4 tasks done
raeperd opened this issue Jan 8, 2022 · 2 comments · Fixed by #15
Closed
4 tasks done

Implements single.html #9

raeperd opened this issue Jan 8, 2022 · 2 comments · Fixed by #15
Assignees
Labels
enhancement New feature or request

Comments

@raeperd
Copy link
Owner

raeperd commented Jan 8, 2022

  • Implements ArticlePage
  • Code Block syntax highlight
  • Add GFM supports
  • KaTex supports
{{ define "main" }}

<article class="post-single">
  <header class="post-title">
    <p>
      <time>{{ .Date | time.Format ":date_medium" }}</time>
      {{ if or .Params.Author site.Author.name }}
      <span>{{ .Params.Author | default site.Author.name }}</span>
      {{ end }}
    </p>
    <h1>{{ .Title }}</h1>
  </header>
  <section class="post-content">{{ .Content }}</section>

  <!-- Post Tags -->
  {{ if .Params.tags }}
  <footer class="post-tags">
    {{ range .Params.tags }} {{ $href := print (absURL "tags/") (urlize .) }}
    <a href="{{ $href }}">{{ . }}</a>
    {{ end }}
  </footer>


  {{ end }}

  <!-- Post Nav -->
  {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}<!---->
  {{ if and (gt (len $pages) 1) (in $pages . ) }}
  <nav class="post-nav">
    {{ with $pages.Next . }}
    <a class="prev" href="{{ .Permalink }}"><span></span><span>{{ .Name }}</span></a>
    {{ end }} {{ with $pages.Prev . }}
    <a class="next" href="{{ .Permalink }}"><span>{{ .Name }}</span><span></span></a>
    {{ end }}
  </nav>
  {{ end }}

  <!-- Disqus -->
  {{ if and site.DisqusShortname (not (eq .Params.comments false)) }}
  <div id="disqus_thread" class="post-comments"></div>
  <script>
    var disqusShortname = '{{ site.DisqusShortname }}';
    var script = document.createElement('script');
    script.src = 'https://' + disqusShortname + '.disqus.com/embed.js';
    script.setAttribute('data-timestamp', +new Date());
    document.head.appendChild(script);
  </script>
  {{ end }}
</article>

{{ end }}
@raeperd raeperd added the enhancement New feature or request label Jan 8, 2022
@raeperd raeperd self-assigned this Jan 8, 2022
raeperd added a commit that referenced this issue Jan 9, 2022
raeperd added a commit that referenced this issue Jan 9, 2022
raeperd added a commit that referenced this issue Jan 9, 2022
raeperd added a commit that referenced this issue Jan 9, 2022
raeperd added a commit that referenced this issue Jan 9, 2022
@raeperd
Copy link
Owner Author

raeperd commented Jan 9, 2022

Add katex supports using Release v0.15.1 · KaTeX/KaTeX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant