Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sunpech committed Feb 21, 2023
2 parents bb1ff3c + d817dd9 commit 18c590a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 9 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,23 @@ See https://hugo-theme-beautifulhugo.netlify.app/

## Installation

$ mkdir themes
$ cd themes
$ git submodule add https://github.com/sunpech/beautifulhugo.git beautifulhugo
Install Hugo and create a new site. See [the Hugo documentation](https://gohugo.io/getting-started/quick-start/) for details.

Add Beautifulhugo:

$ git submodule add https://github.com/sunpech/beautifulhugo.git themes/beautifulhugo

Copy the content of `exampleSite` at the root of your project:

cp -r themes/beautifulhugo/exampleSite/* . -iv

## My Changes

* Posts *(/layouts/_default/list.html)* display grouping of all posts in descending order, sectioned by the year.
* Footer partial *(/layouts/partials/footer.html)* pulls config parameter, *copyright*, to display copyright year.
Start Hugo:

See [the Hugo documentation](https://gohugo.io/themes/installing/) for more information.
hugo serve

## Extra Features

Expand Down
17 changes: 13 additions & 4 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<!-- Site Title, Description, Author, and Favicon -->
{{- with ($.Scratch.Get "Title") }}
<title>{{ . }} - {{ $.Site.Title }}</title>
{{- end }}

<!-- Site Title, Description, Author, and Favicon -->

{{ if .IsHome }}
{{- with .Site.Params.homeTitle }}
<title>{{ . }}</title>
{{- end }}
{{ else }}
{{- with ($.Scratch.Get "Title") }}
<title>{{ . }} - {{ $.Site.Params.homeTitle }}</title>
{{- end }}
{{ end }}

{{- with ($.Scratch.Get "Description") }}
<meta name="description" content="{{ . }}">
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/post_preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h3 class="post-subtitle">
{{ partial "post_meta.html" . }}
</p>
<div class="post-entry">
{{ if .Truncated }}
{{ if or (.Truncated) (.Params.summary) }}
{{ .Summary }}
<a href="{{ .Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a>
{{ else }}
Expand Down
6 changes: 6 additions & 0 deletions static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -939,3 +939,9 @@ h4.see-also {
color: #CC0;
}
}

/* --- Make long KaTeX equations scrollable in the x-axis --- */
.katex-display>.katex {
overflow-x: auto;
overflow-y: hidden;
}

0 comments on commit 18c590a

Please sign in to comment.