Skip to content

Commit

Permalink
enable last modified info
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Dec 27, 2021
1 parent b4e2697 commit e1911a5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v2

- name: Build Link Index
uses: jackyzha0/hugo-obsidian@v2.5
uses: jackyzha0/hugo-obsidian@v2.6
with:
index: true
input: content
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ help: ## Show all Makefile targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

serve: ## serve
hugo-obsidian -input=content -output=data -index && hugo server
hugo-obsidian -input=content -output=data -index -root=. && hugo server
31 changes: 19 additions & 12 deletions assets/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,25 @@ td, th {
margin: 0.5em 0;
}

article a {
font-family: Source Sans Pro;
font-weight: 600;

// internal link
&[href^="./"], &[href^="/"] {
text-decoration: none;
background-color: transparentize(#8f9fa9, 0.85);
padding: 0 0.1em;
margin: auto -0.1em;
border-radius: 3px;
}
article {
& > .meta {
margin: -1.5em 0 1em 0;
opacity: 0.7;
}

& a {
font-family: Source Sans Pro;
font-weight: 600;

// internal link
&[href^="./"], &[href^="/"] {
text-decoration: none;
background-color: transparentize(#8f9fa9, 0.85);
padding: 0 0.1em;
margin: auto -0.1em;
border-radius: 3px;
}
}
}

.backlinks a {
Expand Down
1 change: 1 addition & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ignoreFiles = [
"/content/private/*",
]
summaryLength = 35
enableGitInfo = true

[markup]
[markup.tableOfContents]
Expand Down
4 changes: 4 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ <h1 id="page-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Data.config.page_titl
</header>
<article>
{{if .Title}}<h1>{{ .Title }}</h1>{{end}}
<p class="meta">
Last updated {{ .Lastmod.Format "January 2, 2006" }}
</p>
{{if $.Site.Data.config.enableToc}}
<aside class="mainTOC">
<h3>Table of Contents</h3>
{{ .TableOfContents }}
</aside>
{{end}}
{{.Content}}

</article>
{{partial "footer.html" .}}
</div>
Expand Down

0 comments on commit e1911a5

Please sign in to comment.