proper backlink and graph display in footer

hugo
jackyzha0 3 years ago
parent 672a641cec
commit 6896cb007b

@ -199,3 +199,32 @@ a[href^="/"] {
margin: 25px 5vw; margin: 25px 5vw;
} }
} }
.page-end {
display: flex;
flex-direction: row;
& > * {
flex: 1 0 0;
}
& > .backlinks-container {
& > ul {
list-style: none;
padding-left: 0;
margin-right: 2em;
& > li {
margin: 0.5em 0;
padding: 0.25em 1em;
border: var(--outlinegray) 1px solid;
border-radius: 5px
}
}
}
& #graph-container {
border: var(--outlinegray) 1px solid;
border-radius: 5px
}
}

@ -1,6 +1,6 @@
baseURL = "https://quartz.jzhao.xyz/" baseURL = "https://quartz.jzhao.xyz/"
languageCode = "en-us" languageCode = "en-us"
googleAnalytics = "UA-148413215-1" googleAnalytics = "G-XYFD95KB4J"
pygmentsUseClasses = true pygmentsUseClasses = true
ignoreFiles = ["/content/templates/*"] ignoreFiles = ["/content/templates/*"]

@ -1,7 +1,21 @@
# 💎 Quartz # 🌱 Quartz
Simple second brain and digital garden. 🌱 Simple second brain and digital garden.
## Why Quartz? ## Why Quartz?
Hosting a public digital garden isn't easy. There are an overwhelming number of tutorials, resources, and guides for tools like [Notion](https://www.notion.so/), [Roam](https://roamresearch.com/), and [Obsidian](https://obsidian.md/), yet none of them have super easy to use *free* tools to publish that garden to the world.
I've personally found that
1. It's nice to access notes from anywhere
2. Having a public digital garden invites open conversations
3. It makes keeping personal notes and knowledge *playful and fun*
> “He who works with the door open gets all kinds of interruptions, but he also occasionally gets clues as to what the world is and what might be important.” — Richard Hamming
**The goal of Quartz is to make hosting your own public digital garden free and simple.**
## Get Started ## Get Started
[directory](moc/directory.md) The entire Quartz documentation is fully hosted using Quartz! You can navigate it using the interactive Graph view below.
If you'd prefer more traditional navigation, you can also find all relevant pages through the main directory.
👉 [Directory](moc/directory.md)

@ -1,7 +1,16 @@
--- ---
title: "Directory" title: "Quartz Documentation"
--- ---
[setup](notes/setup.md) Welcome to Quartz! Whether you're setting up a website and project for the first time or a seasoned digital gardener, I hope that you'll find something useful about this project.
Let's get to business and get you started!
## Setup
📚 [setup](notes/setup.md)
## Configuration
[config](notes/config.md) [config](notes/config.md)
## Troubleshooting
[troubleshooting](notes/troubleshooting.md) [troubleshooting](notes/troubleshooting.md)

@ -1,3 +1,3 @@
--- ---
title: "config" title: "Configuration"
--- ---

@ -0,0 +1,9 @@
---
title: "Deploying to GitHub Pages"
---
Change `baseURL` in `/config.toml`
```toml
baseURL = "https://quartz.jzhao.xyz/"
```

@ -0,0 +1,3 @@
---
title: "Obsidian Vault Integration"
---

@ -1,6 +1,6 @@
enableLegend: false enableLegend: false
enableDrag: true enableDrag: true
enableZoom: false enableZoom: true
base: base:
node: "#284b63" node: "#284b63"
activeNode: "#f28482" activeNode: "#f28482"

@ -3,9 +3,9 @@
{{ partial "head.html" . }} {{ partial "head.html" . }}
<body> <body>
<div id="landing-container"> <div>
{{partial "darkmode.html" .}} {{partial "darkmode.html" .}}
<div id="landing-overlay" class="lt-content-column"> <div>
<h1>404.</h1> <h1>404.</h1>
<h3>Hey! You look a little lost.</h3> <h3>Hey! You look a little lost.</h3>
<ul id="sub-nav"> <ul id="sub-nav">

@ -9,7 +9,7 @@
{{.Content}} {{.Content}}
<!-- Contact Info --> <!-- Contact Info -->
<div class="lt-centre"> <div>
{{partial "footer.html" .}} {{partial "footer.html" .}}
</div> </div>
</div> </div>

@ -1,9 +1,16 @@
<ol class="backlinks"> <h3>Backlinks</h3>
<ul class="backlinks">
{{$curPage := strings.TrimRight "/" .Page.RelPermalink }} {{$curPage := strings.TrimRight "/" .Page.RelPermalink }}
{{$inbound := index $.Site.Data.linkIndex.index.backlinks $curPage}} {{$inbound := index $.Site.Data.linkIndex.index.backlinks $curPage}}
{{if $inbound}}
{{- range $inbound -}} {{- range $inbound -}}
<li> <li>
<a href="{{index . "source"}}">{{index . "source"}}</a> <a href="{{index . "source"}}">{{index . "source"}}</a>
</li> </li>
{{- end -}} {{- end -}}
</ol> {{else}}
<li>
No backlinks found
</li>
{{end}}
</ul>

@ -1,11 +1,15 @@
<div> <hr/>
<hr/> <div class="page-end">
{{partial "backlinks.html" .}} <div class="backlinks-container">
{{partial "graph.html" .}} {{partial "backlinks.html" .}}
</div>
<div>
{{partial "graph.html" .}}
</div>
</div> </div>
<!-- Contact Info --> <!-- Contact Info -->
<div id="contact_buttons" class="lt-centre"> <div id="contact_buttons">
<footer> <footer>
<p>Made by {{ $.Site.Data.config.name }} using <a href="https://github.com/jackyzha0/quartz">Quartz</a>, © {{ dateFormat "2006" now }}</p> <p>Made by {{ $.Site.Data.config.name }} using <a href="https://github.com/jackyzha0/quartz">Quartz</a>, © {{ dateFormat "2006" now }}</p>
{{ if not .IsHome }} {{ if not .IsHome }}

@ -1,4 +1,5 @@
<script src="https://cdn.jsdelivr.net/npm/d3@6"></script> <script src="https://cdn.jsdelivr.net/npm/d3@6"></script>
<h3>Interactive Graph</h3>
<div id="graph-container"></div> <div id="graph-container"></div>
<style> <style>
:root { :root {

@ -1,12 +1,12 @@
<head> <head>
<link rel="preconnect" href="https://www.googletagmanager.com"> <link rel="preconnect" href="https://www.googletagmanager.com">
<link crossorigin rel="preconnect" href="https://www.google-analytics.com"> <link crossorigin rel="preconnect" href="https://www.google-analytics.com">
{{ template "_internal/google_analytics_async.html" . }} {{ template "_internal/google_analytics.html" . }}
<!-- Meta tags --> <!-- Meta tags -->
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="description" content="{{$.Site.Data.config.description}}"> <meta name="description" content="{{$.Site.Data.config.description}}">
<title>{{$.Site.Data.config.page_title}}</title> <title>{{ if .Title }}{{ .Title }}{{ else }}{{ $.Site.Data.config.page_title }}{{ end }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="/icon.png" /> <link rel="shortcut icon" type="image/png" href="/icon.png" />

Loading…
Cancel
Save