Skip to content

Commit

Permalink
add makefile, fix link padding, test capitalization
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Dec 26, 2021
1 parent 2ba01c8 commit 43837f9
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 29 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DEFAULT_GOAL := serve

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
45 changes: 23 additions & 22 deletions assets/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,6 @@ p, ul, text {
padding: revert;
}

a {
font-family: Inter;
font-weight: 700;
font-size: 1em;
text-decoration: none;
transition: all 0.2s ease;
color: var(--secondary);

&:hover {
color: var(--tertiary) !important;
}
}

#TableOfContents > ol {
counter-reset: section;
margin-left: 0em;
Expand Down Expand Up @@ -128,13 +115,36 @@ td, th {
article a {
font-family: Source Sans Pro;
font-weight: 600;

// internal link
&[href^="./"], &[href^="/"] {
text-decoration: none;
background-color: #afbfc933;
padding: 0 0.2em;
margin-right: -0.2em;
font-weight: 600;
border-radius: 3px;
}
}

sup > a {
text-decoration: none;
padding: 0 0.1em 0 0.2em;
}

a {
font-family: Inter, sans-serif;
font-weight: 700;
font-size: 1em;
text-decoration: none;
transition: all 0.2s ease;
color: var(--secondary);

&:hover {
color: var(--tertiary) !important;
}
}

pre {
font-family: 'Fira Code';
padding: 0.75em;
Expand Down Expand Up @@ -187,15 +197,6 @@ hr {
background-color: var(--dark);
}

// internal link
a[href^="./"] {
text-decoration: none;
background-color: #afbfc933;
padding: 0 0.2em;
font-weight: 600;
border-radius: 3px;
}

.singlePage {
margin: 4em 30vw;

Expand Down
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ baseURL = "https://quartz.jzhao.xyz/"
languageCode = "en-us"
googleAnalytics = "G-XYFD95KB4J"
pygmentsUseClasses = true
relativeURLs = true
relativeURLs = false
disablePathToLower = true
ignoreFiles = [
"/content/templates/*",
Expand Down
2 changes: 1 addition & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 🪴 Quartz v2.1
title: 🪴 Quartz 3
---
Host your second brain and [digital garden](https://jzhao.xyz/posts/digital-gardening) for free. Quartz features
1. Extremely fast full-text search by pressing `/`
Expand Down
4 changes: 2 additions & 2 deletions content/notes/editing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Quartz runs on top of [Hugo](https://gohugo.io/) so all notes are written in [Ma
### Obsidian
I *strongly* recommend using [Obsidian](http://obsidian.md/) as a way to edit and grow your digital garden. It comes with a really nice editor and graphical interface to preview all of my local files.

**🔗 [How to link your Obsidian Vault](notes/obsidian.md)**
🔗 How to link your Obsidian Vault](notes/Obsidian.md)

Of course, all the files are in Markdown so you could just use your favourite text editor of choice.

Expand Down Expand Up @@ -54,4 +54,4 @@ Now that you know the basics of managing your digital garden using Quartz, you c

🌍 [Hosting Quartz online!](notes/hosting.md)

Having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
Having problems? Checkout our [FAQ and Troubleshooting guide](notes/troubleshooting.md).
2 changes: 1 addition & 1 deletion content/notes/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ source ~/.bash_profile
```

### How come my notes aren't being rendered?
You probably forgot to include front matter in your Markdown files. You can either setup [Obsidian](notes/obsidian) to do this for you or you need to manually define it. More details in [the 'how to edit' guide](notes/editing.md).
You probably forgot to include front matter in your Markdown files. You can either setup [Obsidian](notes/Obsidian) to do this for you or you need to manually define it. More details in [the 'how to edit' guide](notes/editing.md).

### My custom domain isn't working!
Walk through the steps in [the hosting guide](notes/hosting.md) again. Make sure you wait 30 min to 1 hour for changes to take effect.
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="singlePage">
<!-- Begin actual content -->
<header>
{{if .Title}}<h1>{{ .Title }}</h1>{{end}}
<h1>{{if .Title}}{{ .Title }}{{else}}Untitled{{end}}</h1>
<svg tabindex="0" id="search-icon" aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title id="title">Search Icon</title><desc id="desc">Icon to open search</desc><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"/><circle cx="8" cy="8" r="7"/></g></svg>
<div class="spacer"></div>
{{partial "darkmode.html" .}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ <h3>${resultTitle}</h3>
}

const redir = (id, term) => {
window.location.href = "{{.Site.BaseURL}}" + `${id.toLowerCase()}#:~:text=${encodeURIComponent(term)}`
window.location.href = "{{.Site.BaseURL}}" + `${id}#:~:text=${encodeURIComponent(term)}`
}

const fetch = id => ({
Expand Down

0 comments on commit 43837f9

Please sign in to comment.