proper backlink and graph display in footer

This commit is contained in:
jackyzha0 2021-07-18 13:02:53 -04:00
parent 672a641cec
commit 6896cb007b
14 changed files with 96 additions and 20 deletions

View File

@ -198,4 +198,33 @@ a[href^="/"] {
@media all and (max-width: 1200px) {
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
}
}

View File

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

View File

@ -1,7 +1,21 @@
# 💎 Quartz
Simple second brain and digital garden. 🌱
# 🌱 Quartz
Simple second brain and digital garden.
## 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
[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)

View File

@ -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)
## Troubleshooting
[troubleshooting](notes/troubleshooting.md)

View File

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

9
content/notes/hosting.md Normal file
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +1,12 @@
<head>
<link rel="preconnect" href="https://www.googletagmanager.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 charset="UTF-8">
<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">
<link rel="shortcut icon" type="image/png" href="/icon.png" />