diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index ac5e8de26..000000000
--- a/Dockerfile
+++ /dev/null
@@ -1,10 +0,0 @@
-FROM alpine:3.16
-
-RUN apk add --no-cache go hugo git make perl
-RUN go install github.com/jackyzha0/hugo-obsidian@latest
-ENV PATH="/root/go/bin:$PATH"
-RUN git clone https://github.com/jackyzha0/quartz.git /quartz
-
-WORKDIR /quartz
-
-CMD ["make", "serve"]
diff --git a/Makefile b/Makefile
index bbd3be7a8..0d29bdacf 100644
--- a/Makefile
+++ b/Makefile
@@ -17,8 +17,4 @@ update-force: ## Forcefully pull all changes and don't ask to patch
git checkout upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data
serve: ## Serve Quartz locally
- hugo-obsidian -input=content -output=assets/indices -index -root=.
- hugo server --enableGitInfo --minify --bind=$(or $(HUGO_BIND),0.0.0.0) --baseURL=$(or $(HUGO_BASEURL),http://localhost) --port=$(or $(HUGO_PORT),1313) --appendPort=$(or $(HUGO_APPENDPORT),true) --liveReloadPort=$(or $(HUGO_LIVERELOADPORT),-1)
-
-docker: ## Serve locally using Docker
- docker run -it --volume=$(shell pwd):/quartz -p 1313:1313 ghcr.io/jackyzha0/quartz:hugo
+ hugo-obsidian -input=content -output=assets/indices -index -root=. && hugo server --enableGitInfo
diff --git a/README.md b/README.md
index 058b8ba7b..717103c1a 100644
--- a/README.md
+++ b/README.md
@@ -2,10 +2,10 @@
Host your second brain and [digital garden](https://jzhao.xyz/posts/networked-thought) for free. Quartz features
-1. Extremely fast natural-language search
+1. Extremely fast full-text search by pressing `Ctrl` + `k`
2. Customizable and hackable design based on Hugo
3. Automatically generated backlinks, link previews, and local graph
-4. Built-in CJK + Latex Support and Admonition-style callouts
+4. Built-in CJK + Latex Support
5. Support for both Markdown Links and Wikilinks
Check out some of the [amazing gardens that community members](https://quartz.jzhao.xyz/notes/showcase/) have published with Quartz!
diff --git a/assets/js/callouts.js b/assets/js/callouts.js
deleted file mode 100644
index 080bbb489..000000000
--- a/assets/js/callouts.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const addCollapsibleCallouts = () => {
- const collapsibleCallouts = document.querySelectorAll("blockquote.callout-collapsible");
- collapsibleCallouts.forEach(el => el.addEventListener('click', event => {
- event.currentTarget.classList.toggle("callout-collapsed");
- }));
-}
diff --git a/assets/js/clipboard.js b/assets/js/clipboard.js
index 10e02c689..cd928c1a4 100644
--- a/assets/js/clipboard.js
+++ b/assets/js/clipboard.js
@@ -8,38 +8,33 @@ const addCopyButtons = () => {
let els = document.getElementsByClassName("highlight");
// for each highlight
for (let i = 0; i < els.length; i++) {
- try {
- if (els[i].getElementsByClassName("clipboard-button").length) continue;
+ if (els[i].getElementsByClassName("clipboard-button").length) continue;
- // find pre > code inside els[i]
- let codeBlocks = els[i].getElementsByTagName("code");
+ // find pre > code inside els[i]
+ let codeBlocks = els[i].getElementsByTagName("code");
- // line numbers are inside first code block
- let lastCodeBlock = codeBlocks[codeBlocks.length - 1];
- const button = document.createElement("button");
- button.className = "clipboard-button";
- button.type = "button";
- button.innerHTML = svgCopy;
- button.ariaLabel = "opy the shown code";
- // remove every second newline from lastCodeBlock.innerText
- button.addEventListener("click", () => {
- navigator.clipboard.writeText(lastCodeBlock.innerText.replace(/\n\n/g, "\n")).then(
- () => {
- button.blur();
- button.innerHTML = svgCheck;
- setTimeout(() => {
- button.innerHTML = svgCopy
- button.style.borderColor = ""
- }, 2000);
- },
- (error) => (button.innerHTML = "Error")
- );
- });
- // find chroma inside els[i]
- let chroma = els[i].getElementsByClassName("chroma")[0];
- els[i].insertBefore(button, chroma);
- } catch(error) {
- console.debug(error);
- }
+ // line numbers are inside first code block
+ let lastCodeBlock = codeBlocks[codeBlocks.length - 1];
+ const button = document.createElement("button");
+ button.className = "clipboard-button";
+ button.type = "button";
+ button.innerHTML = svgCopy;
+ // remove every second newline from lastCodeBlock.innerText
+ button.addEventListener("click", () => {
+ navigator.clipboard.writeText(lastCodeBlock.innerText.replace(/\n\n/g, "\n")).then(
+ () => {
+ button.blur();
+ button.innerHTML = svgCheck;
+ setTimeout(() => {
+ button.innerHTML = svgCopy
+ button.style.borderColor = ""
+ }, 2000);
+ },
+ (error) => (button.innerHTML = "Error")
+ );
+ });
+ // find chroma inside els[i]
+ let chroma = els[i].getElementsByClassName("chroma")[0];
+ els[i].insertBefore(button, chroma);
}
}
diff --git a/assets/js/code-title.js b/assets/js/code-title.js
index 325e16d5e..698edc9b6 100644
--- a/assets/js/code-title.js
+++ b/assets/js/code-title.js
@@ -1,17 +1,13 @@
function addTitleToCodeBlocks() {
- const els = document.getElementsByClassName("highlight");
- for (let i = 0; i < els.length; i++) {
- try {
- if (els[i].title.length) {
- let div = document.createElement("div");
- if (els[i].getElementsByClassName("code-title").length) continue;
- div.textContent = els[i].title;
- div.classList.add("code-title")
- els[i].insertBefore(div, els[i].firstChild);
- }
- } catch (error) {
- console.debug(error);
+ var els = document.getElementsByClassName("highlight");
+ for (var i = 0; i < els.length; i++) {
+ if (els[i].title.length) {
+ let div = document.createElement("div");
+ if (els[i].getElementsByClassName("code-title").length) continue;
+ div.textContent=els[i].title;
+ div.classList.add("code-title")
+ els[i].insertBefore(div, els[i].firstChild);
}
}
-}
+};
diff --git a/assets/js/full-text-search.js b/assets/js/full-text-search.js
deleted file mode 100644
index 709a3b366..000000000
--- a/assets/js/full-text-search.js
+++ /dev/null
@@ -1,61 +0,0 @@
-; (async function() {
- const encoder = (str) => str.toLowerCase().split(/([^a-z]|[^\x00-\x7F])/)
- const contentIndex = new FlexSearch.Document({
- cache: true,
- charset: "latin:extra",
- optimize: true,
- index: [
- {
- field: "content",
- tokenize: "reverse",
- encode: encoder,
- },
- {
- field: "title",
- tokenize: "forward",
- encode: encoder,
- },
- ],
- })
-
- const { content } = await fetchData
- for (const [key, value] of Object.entries(content)) {
- contentIndex.add({
- id: key,
- title: value.title,
- content: removeMarkdown(value.content),
- })
- }
-
- const formatForDisplay = (id) => ({
- id,
- url: id,
- title: content[id].title,
- content: content[id].content,
- })
-
- registerHandlers((e) => {
- const term = e.target.value
- const searchResults = contentIndex.search(term, [
- {
- field: "content",
- limit: 10,
- },
- {
- field: "title",
- limit: 5,
- },
- ])
- const getByField = (field) => {
- const results = searchResults.filter((x) => x.field === field)
- if (results.length === 0) {
- return []
- } else {
- return [...results[0].result]
- }
- }
- const allIds = new Set([...getByField("title"), ...getByField("content")])
- const finalResults = [...allIds].map(formatForDisplay)
- displayResults(term, finalResults, true)
- })
-})()
diff --git a/assets/js/graph.js b/assets/js/graph.js
index 8985e86a9..3c5cdc954 100644
--- a/assets/js/graph.js
+++ b/assets/js/graph.js
@@ -1,14 +1,14 @@
async function drawGraph(baseUrl, isHome, pathColors, graphConfig, modal = false) {
let {
- depth,
- enableDrag,
- enableLegend,
- enableZoom,
- opacityScale,
- scale,
- repelForce,
- fontSize } = graphConfig;
+ depth,
+ enableDrag,
+ enableLegend,
+ enableZoom,
+ opacityScale,
+ scale,
+ repelForce,
+ fontSize} = graphConfig;
const elementId = modal ? "graph-container-modal" : "graph-container" ;
@@ -87,7 +87,7 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig, modal = false
d.fy = null
}
- const noop = () => { }
+ const noop = () => {}
return d3
.drag()
.on("start", enableDrag ? dragstarted : noop)
@@ -115,7 +115,7 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig, modal = false
.append("svg")
.attr("width", width)
.attr("height", height)
- .attr('viewBox', [-width / 2 / scale, -height / 2 / scale, width / scale, height / scale])
+ .attr('viewBox', [-width / 2 * 1 / scale, -height / 2 * 1 / scale, width * 1 / scale, height * 1 / scale])
if (enableLegend) {
const legend = [{ Current: "var(--g-node-active)" }, { Note: "var(--g-node)" }, ...pathColors]
@@ -157,7 +157,7 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig, modal = false
const nodeRadius = (d) => {
const numOut = index.links[d.id]?.length || 0
const numIn = index.backlinks[d.id]?.length || 0
- return 2 + Math.sqrt(numOut + numIn)
+ return 3 + (numOut + numIn) / 4
}
// draw individual nodes
@@ -170,18 +170,9 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig, modal = false
.style("cursor", "pointer")
.on("click", (_, d) => {
// SPA navigation
- const targ = `${baseUrl}${decodeURI(d.id).replace(/\s+/g, "-")}/`
- window.Million.navigate(new URL(targ), ".singlePage")
- plausible("Link Click", {
- props: {
- href: targ,
- broken: false,
- internal: true,
- graph: true,
- }
- })
+ window.Million.navigate(new URL(`${baseUrl}${decodeURI(d.id).replace(/\s+/g, "-")}/`), ".singlePage")
})
- .on("mouseover", function(_, d) {
+ .on("mouseover", function (_, d) {
d3.selectAll(".node").transition().duration(100).attr("fill", "var(--g-node-inactive)")
const neighbours = parseIdsFromLinks([
@@ -201,7 +192,7 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig, modal = false
// highlight links
linkNodes.transition().duration(200).attr("stroke", "var(--g-link-active)")
- const bigFont = fontSize * 1.5
+ const bigFont = fontSize*1.5
// show text for self
d3.select(this.parentNode)
@@ -211,10 +202,10 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig, modal = false
.duration(200)
.attr('opacityOld', d3.select(this.parentNode).select('text').style("opacity"))
.style('opacity', 1)
- .style('font-size', bigFont + 'em')
+ .style('font-size', bigFont+'em')
.attr('dy', d => nodeRadius(d) + 20 + 'px') // radius is in px
})
- .on("mouseleave", function(_, d) {
+ .on("mouseleave", function (_, d) {
d3.selectAll(".node").transition().duration(200).attr("fill", color)
const currentId = d.id
@@ -225,12 +216,12 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig, modal = false
linkNodes.transition().duration(200).attr("stroke", "var(--g-link)")
d3.select(this.parentNode)
- .select("text")
- .transition()
- .duration(200)
- .style('opacity', d3.select(this.parentNode).select('text').attr("opacityOld"))
- .style('font-size', fontSize + 'em')
- .attr('dy', d => nodeRadius(d) + 8 + 'px') // radius is in px
+ .select("text")
+ .transition()
+ .duration(200)
+ .style('opacity', d3.select(this.parentNode).select('text').attr("opacityOld"))
+ .style('font-size', fontSize+'em')
+ .attr('dy', d => nodeRadius(d) + 8 + 'px') // radius is in px
})
.call(drag(simulation))
@@ -240,10 +231,10 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig, modal = false
.attr("dx", 0)
.attr("dy", (d) => nodeRadius(d) + 8 + "px")
.attr("text-anchor", "middle")
- .text((d) => content[d.id]?.title || (d.id.charAt(1).toUpperCase() + d.id.slice(2)).replace("-", " "))
+ .text((d) => content[d.id]?.title || d.id.replace("-", " "))
.style('opacity', (opacityScale - 1) / 3.75)
.style("pointer-events", "none")
- .style('font-size', fontSize + 'em')
+ .style('font-size', fontSize+'em')
.raise()
.call(drag(simulation))
diff --git a/assets/js/popover.js b/assets/js/popover.js
index 101d1c0cf..6fec7e5e0 100644
--- a/assets/js/popover.js
+++ b/assets/js/popover.js
@@ -5,14 +5,14 @@ function htmlToElement(html) {
return template.content.firstChild
}
-function initPopover(baseURL, useContextualBacklinks) {
+function initPopover(baseURL, useContextualBacklinks, renderLatex) {
const basePath = baseURL.replace(window.location.origin, "")
fetchData.then(({ content }) => {
const links = [...document.getElementsByClassName("internal-link")]
links
.filter(li => li.dataset.src || (li.dataset.idx && useContextualBacklinks))
.forEach(li => {
- let el
+ var el
if (li.dataset.ctx) {
const linkDest = content[li.dataset.src]
const popoverElement = `
@@ -24,16 +24,9 @@ function initPopover(baseURL, useContextualBacklinks) {
} else {
const linkDest = content[li.dataset.src.replace(/\/$/g, "").replace(basePath, "")]
if (linkDest) {
- let splitLink = li.href.split("#")
- let cleanedContent = removeMarkdown(linkDest.content)
- if (splitLink.length > 1) {
- let headingName = decodeURIComponent(splitLink[1]).replace(/\-/g, " ")
- let headingIndex = cleanedContent.toLowerCase().indexOf("
" + headingName + "")
- cleanedContent = cleanedContent.substring(headingIndex, cleanedContent.length)
- }
const popoverElement = `
${linkDest.title}
-
${cleanedContent.split(" ", 20).join(" ")}...
+
${removeMarkdown(linkDest.content).split(" ", 20).join(" ")}...
${new Date(linkDest.lastmodified).toLocaleDateString()}
`
el = htmlToElement(popoverElement)
@@ -42,11 +35,13 @@ function initPopover(baseURL, useContextualBacklinks) {
if (el) {
li.appendChild(el)
- if (LATEX_ENABLED) {
+ if (renderLatex) {
renderMathInElement(el, {
delimiters: [
{ left: '$$', right: '$$', display: false },
{ left: '$', right: '$', display: false },
+ { left: '\\(', right: '\\)', display: false },
+ { left: '\\[', right: '\\]', display: false }
],
throwOnError: false
})
@@ -64,11 +59,6 @@ function initPopover(baseURL, useContextualBacklinks) {
})
el.classList.add("visible")
- plausible("Popover Hover", {
- props: {
- href: li.dataset.src
- }
- })
})
li.addEventListener("mouseout", () => {
el.classList.remove("visible")
diff --git a/assets/js/router.js b/assets/js/router.js
index c29ab7737..efaa10e8a 100644
--- a/assets/js/router.js
+++ b/assets/js/router.js
@@ -15,6 +15,7 @@ export const attachSPARouting = (init, rerender) => {
}
const render = () => requestAnimationFrame(rerender)
+
window.addEventListener("DOMContentLoaded", () => {
apply((doc) => init(doc))
init()
diff --git a/assets/js/util.js b/assets/js/search.js
similarity index 57%
rename from assets/js/util.js
rename to assets/js/search.js
index 530bd7dc0..5896061ba 100644
--- a/assets/js/util.js
+++ b/assets/js/search.js
@@ -40,32 +40,33 @@ const removeMarkdown = (
.replace(/^\s{0,3}>\s?/g, "")
.replace(/(^|\n)\s{0,3}>\s?/g, "\n\n")
.replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, "")
- .replace(/([\*_]{1,3})(\S.*?\S?)\1/g, "$2")
- .replace(/([\*_]{1,3})(\S.*?\S?)\1/g, "$2")
+ .replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g, "$2")
+ .replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g, "$2")
.replace(/(`{3,})(.*?)\1/gm, "$2")
.replace(/`(.+?)`/g, "$1")
.replace(/\n{2,}/g, "\n\n")
- .replace(/\[![a-zA-Z]+\][-\+]? /g, "")
} catch (e) {
console.error(e)
return markdown
}
return output
}
+// -----
const highlight = (content, term) => {
const highlightWindow = 20
+
// try to find direct match first
const directMatchIdx = content.indexOf(term)
if (directMatchIdx !== -1) {
- const h = highlightWindow
+ const h = highlightWindow / 2
const before = content.substring(0, directMatchIdx).split(" ").slice(-h)
const after = content
- .substring(directMatchIdx + term.length, content.length - 2)
+ .substring(directMatchIdx + term.length, content.length - 1)
.split(" ")
.slice(0, h)
return (
- (before.length === h ? `...${before.join(" ")}` : before.join(" ")) +
+ (before.length == h ? `...${before.join(" ")}` : before.join(" ")) +
`
${term}` +
after.join(" ")
)
@@ -102,56 +103,68 @@ const highlight = (content, term) => {
})
.join(" ")
.replaceAll('
', " ")
- return `${startIndex === 0 ? "" : "..."}${mappedText}${endIndex === splitText.length ? "" : "..."
- }`
+ return `${startIndex === 0 ? "" : "..."}${mappedText}${
+ endIndex === splitText.length ? "" : "..."
+ }`
}
-// Common utilities for search
-const resultToHTML = ({ url, title, content }) => {
- return ``
-}
-
-const redir = (id, term) => {
- const shouldTrim = PRODUCTION && SEARCH_ENABLED
- const baseURLPrefix = shouldTrim ? "" : BASE_URL.replace(/\/$/g, "")
- const urlString = `${baseURLPrefix}${id}#:~:text=${encodeURIComponent(term)}/`
- window.Million.navigate(
- new URL(urlString),
- ".singlePage",
- )
- closeSearch()
- plausible("Search", {
- props: {
- term
- }
+;(async function () {
+ const encoder = (str) => str.toLowerCase().split(/([^a-z]|[^\x00-\x7F])+/)
+ const contentIndex = new FlexSearch.Document({
+ cache: true,
+ charset: "latin:extra",
+ optimize: true,
+ index: [
+ {
+ field: "content",
+ tokenize: "reverse",
+ encode: encoder,
+ },
+ {
+ field: "title",
+ tokenize: "forward",
+ encode: encoder,
+ },
+ ],
+ })
+
+ const { content } = await fetchData
+ for (const [key, value] of Object.entries(content)) {
+ contentIndex.add({
+ id: key,
+ title: value.title,
+ content: removeMarkdown(value.content),
+ })
+ }
+
+ const resultToHTML = ({ url, title, content, term }) => {
+ const text = removeMarkdown(content)
+ const resultTitle = highlight(title, term)
+ const resultText = highlight(text, term)
+ return ``
+ }
+
+ const redir = (id, term) => {
+ // SPA navigation
+ window.Million.navigate(
+ new URL(`${BASE_URL.replace(/\/$/g, "")}${id}#:~:text=${encodeURIComponent(term)}/`),
+ ".singlePage",
+ )
+ closeSearch()
+ }
+
+ const formatForDisplay = (id) => ({
+ id,
+ url: id,
+ title: content[id].title,
+ content: content[id].content,
})
-}
-function openSearch() {
const source = document.getElementById("search-bar")
const results = document.getElementById("results-container")
- const searchContainer = document.getElementById("search-container")
- if (searchContainer.style.display === "none" || searchContainer.style.display === "") {
- source.value = ""
- results.innerHTML = ""
- searchContainer.style.display = "block"
- source.focus()
- } else {
- searchContainer.style.display = "none"
- }
-}
-
-function closeSearch() {
- const searchContainer = document.getElementById("search-container")
- searchContainer.style.display = "none"
-}
-
-const registerHandlers = (onInputFn) => {
- const source = document.getElementById("search-bar")
- const searchContainer = document.getElementById("search-container")
let term
source.addEventListener("keyup", (e) => {
if (e.key === "Enter") {
@@ -159,7 +172,68 @@ const registerHandlers = (onInputFn) => {
redir(anchor.id, term)
}
})
- source.addEventListener("input", onInputFn)
+ source.addEventListener("input", (e) => {
+ term = e.target.value
+ const searchResults = contentIndex.search(term, [
+ {
+ field: "content",
+ limit: 10,
+ },
+ {
+ field: "title",
+ limit: 5,
+ },
+ ])
+ const getByField = (field) => {
+ const results = searchResults.filter((x) => x.field === field)
+ if (results.length === 0) {
+ return []
+ } else {
+ return [...results[0].result]
+ }
+ }
+ const allIds = new Set([...getByField("title"), ...getByField("content")])
+ const finalResults = [...allIds].map(formatForDisplay)
+
+ // display
+ if (finalResults.length === 0) {
+ results.innerHTML = ``
+ } else {
+ results.innerHTML = finalResults
+ .map((result) =>
+ resultToHTML({
+ ...result,
+ term,
+ }),
+ )
+ .join("\n")
+ const anchors = [...document.getElementsByClassName("result-card")]
+ anchors.forEach((anchor) => {
+ anchor.onclick = () => redir(anchor.id, term)
+ })
+ }
+ })
+
+ const searchContainer = document.getElementById("search-container")
+
+ function openSearch() {
+ if (searchContainer.style.display === "none" || searchContainer.style.display === "") {
+ source.value = ""
+ results.innerHTML = ""
+ searchContainer.style.display = "block"
+ source.focus()
+ } else {
+ searchContainer.style.display = "none"
+ }
+ }
+
+ function closeSearch() {
+ searchContainer.style.display = "none"
+ }
+
document.addEventListener("keydown", (event) => {
if (event.key === "k" && (event.ctrlKey || event.metaKey)) {
event.preventDefault()
@@ -172,55 +246,16 @@ const registerHandlers = (onInputFn) => {
})
const searchButton = document.getElementById("search-icon")
- searchButton.addEventListener("click", (_) => {
+ searchButton.addEventListener("click", (evt) => {
openSearch()
})
- searchButton.addEventListener("keydown", (_) => {
+ searchButton.addEventListener("keydown", (evt) => {
openSearch()
})
- searchContainer.addEventListener("click", (_) => {
+ searchContainer.addEventListener("click", (evt) => {
closeSearch()
})
document.getElementById("search-space").addEventListener("click", (evt) => {
evt.stopPropagation()
})
-}
-
-const displayResults = (term, finalResults, extractHighlight = false) => {
- const results = document.getElementById("results-container")
- if (finalResults.length === 0) {
- results.innerHTML = ``
- } else {
- results.innerHTML = finalResults
- .map((result) => {
- if (extractHighlight) {
- return resultToHTML({
- url: result.url,
- title: highlight(result.title, term),
- content: highlight(removeMarkdown(result.content), term)
- })
- } else {
- return resultToHTML(result)
- }
- }
- )
- .join("\n")
- if (LATEX_ENABLED) {
- renderMathInElement(results, {
- delimiters: [
- { left: '$$', right: '$$', display: false },
- { left: '$', right: '$', display: false },
- ],
- throwOnError: false
- })
- }
-
- const anchors = [...document.getElementsByClassName("result-card")]
- anchors.forEach((anchor) => {
- anchor.onclick = () => redir(anchor.id, term)
- })
- }
-}
+})()
diff --git a/assets/js/semantic-search.js b/assets/js/semantic-search.js
deleted file mode 100644
index fca2851eb..000000000
--- a/assets/js/semantic-search.js
+++ /dev/null
@@ -1,54 +0,0 @@
-// Note: Currently, we use the REST API for Operand because of some unpkg/webpack issues.
-// In the future, we'd like to use the SDK (https://github.com/operandinc/typescript-sdk).
-// If someone knows how to do this w/o breaking the Operand typescript-sdk for npm users,
-// please let Morgan (@morgallant) and/or (@_jzhao) know! <3
-
-const apiKey = "{{$.Site.Data.config.search.operandApiKey}}"
-const indexId = "{{$.Site.Data.config.search.operandIndexId}}"
-
-function parseSearchResults(searchResults) {
- return searchResults.matches.map((m) => ({
- content: m.content,
- title: searchResults.objects[m.objectId].properties.properties._title.text,
- url: searchResults.objects[m.objectId].properties.properties._url.text,
- }))
-}
-
-async function searchContents(query) {
- const result = await fetch("https://api.operand.ai/operand.v1.ObjectService/SearchWithin", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- Authorization: `${apiKey}`,
- "Operand-Index-ID": `${indexId}`,
- },
- body: JSON.stringify({
- query: query,
- limit: 10,
- }),
- })
- if (result.ok) {
- return parseSearchResults(await result.json())
- } else {
- console.error(result)
- }
-}
-
-function debounce(func, timeout = 200) {
- let timer
- return (...args) => {
- clearTimeout(timer)
- timer = setTimeout(() => {
- func.apply(this, args)
- }, timeout)
- }
-}
-
-registerHandlers(
- debounce((e) => {
- let term = e.target.value
- if (term !== "") {
- searchContents(term).then((results) => displayResults(term, results))
- }
- }),
-)
diff --git a/assets/styles/_callouts.scss b/assets/styles/_callouts.scss
deleted file mode 100644
index 04fd2f662..000000000
--- a/assets/styles/_callouts.scss
+++ /dev/null
@@ -1,170 +0,0 @@
-:root {
- --callout-summary: #00b0ff;
- --callout-summary-accent: #7fd7ff;
- --callout-bug: #f50057;
- --callout-bug-accent: #ff7aa9;
- --callout-danger: #ff1744;
- --callout-danger-accent: #ff8aa1;
- --callout-example: #7c4dff;
- --callout-example-accent: #bda5ff;
- --callout-fail: #ff5252;
- --callout-fail-accent: #ffa8a8;
- --callout-info: #00b8d4;
- --callout-info-accent: #69ebff;
- --callout-note: #448aff;
- --callout-note-accent: #a1c4ff;
- --callout-question: #64dd17;
- --callout-question-accent: #b0f286;
- --callout-quote: #9e9e9e;
- --callout-quote-accent: #cecece;
- --callout-done: #00c853;
- --callout-done-accent: #63ffa4;
- --callout-important: #00bfa5;
- --callout-important-accent: #5fffe9;
- --callout-warning: #ff9100;
- --callout-warning-accent: #ffc87f;
-}
-
-[saved-theme=dark] {
- --callout-summary: #00b0ff !important;
- --callout-summary-accent: #00587f !important;
- --callout-bug: #f50057 !important;
- --callout-bug-accent: #7a002b !important;
- --callout-danger: #ff1744 !important;
- --callout-danger-accent: #8b001a !important;
- --callout-example: #7c4dff !important;
- --callout-example-accent: #2b00a6 !important;
- --callout-fail: #ff5252 !important;
- --callout-fail-accent: #a80000 !important;
- --callout-info: #00b8d4 !important;
- --callout-info-accent: #005c6a !important;
- --callout-note: #448aff !important;
- --callout-note-accent: #003ca1 !important;
- --callout-question: #64dd17 !important;
- --callout-question-accent: #006429 !important;
- --callout-quote: #9e9e9e !important;
- --callout-quote-accent: #4f4f4f !important;
- --callout-done: #00c853 !important;
- --callout-done-accent: #006429 !important;
- --callout-important: #00bfa5 !important;
- --callout-important-accent: #005f52 !important;
- --callout-warning: #ff9100 !important;
- --callout-warning-accent: #7f4800 !important;
-}
-
-blockquote.callout-collapsible {
- cursor: pointer;
-
- &.callout-collapsible::after {
- content: '-';
- right: 6px;
- font-weight: bolder;
- font-family: Courier New, Courier, monospace;
- }
-}
-
-blockquote.callout-collapsed {
- & > p { border-bottom-right-radius: 5px !important; }
- padding-bottom: 0 !important;
- &::after {
- content: '+' !important;
- }
- & > *:not(:first-child) {
- display: none !important;
- }
-}
-
-blockquote[class*="-callout"] {
- margin-right: 0;
- border-radius: 5px;
- position: relative;
- padding-left: 0 !important;
- padding-bottom: 0.25em;
- color: var(--dark);
- background-color: var(--lightgray);
- border-left: 6px solid var(--primary) !important;
- & > p {
- border-top-right-radius: 5px;
- padding: 0.5em 1em;
- margin: 0;
- color: var(--gray);
- &:first-child {
- font-weight: 600;
- color: var(--dark);
- padding: 0.4em 30px;
- }
- }
-}
-
-blockquote[class*="-callout"] > p:first-child::after, blockquote.callout-collapsible::after {
- display: inline-block;
- height: 18px;
- width: 18px;
- position: absolute;
- top: 0.4em;
- margin: 0.2em 0.4em;
-}
-
-blockquote[class*="-callout"] > p:first-child {
- font-weight: bold;
- padding: 0.4em 35px;
-
- &::after {
- left: 0;
- }
-}
-
-$summary: summary, abstract, tldr;
-$bug: bug;
-$danger: danger, error;
-$example: example;
-$fail: fail, failure, missing;
-$info: info, todo;
-$note: note;
-$question: question, help, faq;
-$quote: quote, cite;
-$done: done, success, check;
-$important: important, tip, hint;
-$warning: warning, caution, attention;
-$types: $summary, $bug, $danger, $example, $fail, $info, $note, $question, $quote, $done, $important, $warning;
-$svgs: ();
-$svgs: map-merge($svgs, ($summary: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='book' class='svg-inline--callout-fa fa-book fa-w-14' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='currentColor' d='M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($bug: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='bug' class='svg-inline--callout-fa fa-bug fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($danger: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='bolt' class='svg-inline--callout-fa fa-bolt fa-w-10' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='currentColor' d='M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($example: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='list-ol' class='svg-inline--callout-fa fa-list-ol fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($fail: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='times-circle' class='svg-inline--callout-fa fa-times-circle fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($info: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='info-circle' class='svg-inline--callout-fa fa-info-circle fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($note: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='pencil-alt' class='svg-inline--callout-fa fa-pencil-alt fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($question: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='question-circle' class='svg-inline--callout-fa fa-question-circle fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($quote: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='quote-right' class='svg-inline--callout-fa fa-quote-right fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($done: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='check-circle' class='svg-inline--callout-fa fa-check-circle fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='currentColor' d='M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($important: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='fire' class='svg-inline--callout-fa fa-fire fa-w-12' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='currentColor' d='M216 23.86c0-23.8-30.65-32.77-44.15-13.04C48 191.85 224 200 224 288c0 35.63-29.11 64.46-64.85 63.99-35.17-.45-63.15-29.77-63.15-64.94v-85.51c0-21.7-26.47-32.23-41.43-16.5C27.8 213.16 0 261.33 0 320c0 105.87 86.13 192 192 192s192-86.13 192-192c0-170.29-168-193-168-296.14z'%3E%3C/path%3E%3C/svg%3E")));
-$svgs: map-merge($svgs, ($warning: url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-icon='exclamation-triangle' class='svg-inline--callout-fa fa-exclamation-triangle fa-w-18' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='currentColor' d='M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'%3E%3C/path%3E%3C/svg%3E")));
-
-@function getstr($l) {
- $v: nth($l, 1);
- @return $v;
-}
-
-@each $type in $types {
- @each $s in $type {
- blockquote.#{$s}-callout {
- border-left: 6px solid var(--callout-#{getstr($type)}) !important;
- & > p:first-child {
- background-color: var(--callout-#{getstr($type)}-accent) !important;
- &::after {
- content: '';
- -webkit-mask: map-get($svgs, $type);
- mask: map-get($svgs, $type);
- background-color: var(--callout-#{getstr($type)}) !important;
- -webkit-mask-size: contain;
- mask-size: contain;
- -webkit-mask-repeat: no-repeat;
- mask-repeat: no-repeat;
- -webkit-mask-position: center;
- mask-position: center;
- }
- }
- }
- }
-}
diff --git a/assets/styles/custom.scss b/assets/styles/custom.scss
index 21730ec41..03287c81b 100644
--- a/assets/styles/custom.scss
+++ b/assets/styles/custom.scss
@@ -11,7 +11,6 @@
--lightgray: #f0f0f0;
--outlinegray: #dadada;
--million-progress-bar-color: var(--secondary);
- --highlighted: #f5dfaf88;
}
[saved-theme="dark"] {
@@ -24,5 +23,4 @@
--gray: #d4d4d4 !important;
--lightgray: #292633 !important;
--outlinegray: #343434 !important;
- --highlighted: #574010;
}
diff --git a/assets/styles/syntax.scss b/assets/styles/syntax.scss
index 6267f5cf3..62a9fe932 100644
--- a/assets/styles/syntax.scss
+++ b/assets/styles/syntax.scss
@@ -60,7 +60,3 @@
pre.chroma {
-moz-tab-size:4;-o-tab-size:4;tab-size:4;
}
-
-.katex {
- font-size: 1.1em !important;
-}
diff --git a/config.toml b/config.toml
index 9cb3d65a2..1c42c7b8f 100644
--- a/config.toml
+++ b/config.toml
@@ -1,5 +1,6 @@
baseURL = "https://www.dhammacharts.org/quartz/"
languageCode = "en-us"
+googleAnalytics = "G-XYFD95KB4J"
relativeURLs = false
disablePathToLower = true
ignoreFiles = [
diff --git a/content/notes/callouts.md b/content/notes/callouts.md
deleted file mode 100644
index 74b837d61..000000000
--- a/content/notes/callouts.md
+++ /dev/null
@@ -1,63 +0,0 @@
----
-title: "Callouts"
----
-
-## Callout support
-
-Quartz supports the same Admonition-callout syntax as Obsidian.
-
-This includes
-- 12 Distinct callout types (each with several aliases)
-- Collapsable callouts
-
-See [documentation on supported types and syntax here](https://help.obsidian.md/How+to/Use+callouts#Types).
-
-## Showcase
-
-> [!EXAMPLE] Examples
->
-> Aliases: example
-
-> [!note] Notes
->
-> Aliases: note
-
-> [!abstract] Summaries
->
-> Aliases: abstract, summary, tldr
-
-> [!info] Info
->
-> Aliases: info, todo
-
-> [!tip] Hint
->
-> Aliases: tip, hint, important
-
-> [!success] Success
->
-> Aliases: success, check, done
-
-> [!question] Question
->
-> Aliases: question, help, faq
-
-> [!warning] Warning
->
-> Aliases: warning, caution, attention
-
-> [!failure] Failure
->
-> Aliases: failure, fail, missing
-
-> [!danger] Error
->
-> Aliases: danger, error
-
-> [!bug] Bug
->
-> Aliases: bug
-
-> [!quote] Quote
->
-> Aliases: quote, cite
diff --git a/content/notes/docker.md b/content/notes/docker.md
deleted file mode 100644
index 4576b65f3..000000000
--- a/content/notes/docker.md
+++ /dev/null
@@ -1,57 +0,0 @@
----
-title: "Hosting with Docker"
-tags:
-- setup
----
-
-If you want to host Quartz on a machine without using a webpage hosting service, it may be easier to [install Docker Compose](https://docs.docker.com/compose/install/) and follow the instructions below than to [install Quartz's dependencies manually](notes/preview%20changes.md).
-## Hosting Quartz Locally
-You can serve Quartz locally at `http://localhost:1313` with the following script, replacing `/path/to/quartz` with the
-actual path to your Quartz folder.
-
-docker-compose.yml
-```
-services:
- quartz-hugo:
- image: ghcr.io/jackyzha0/quartz:hugo
- container_name: quartz-hugo
- volumes:
- - /path/to/quartz:/quartz
- ports:
- - 1313:1313
-
- # optional
- environment:
- - HUGO_BIND=0.0.0.0
- - HUGO_BASEURL=http://localhost
- - HUGO_PORT=1313
- - HUGO_APPENDPORT=true
- - HUGO_LIVERELOADPORT=-1
-```
-
-Then run with: `docker-compose up -d` in the same directory as your `docker-compose.yml` file.
-
-While the container is running, you can update the `quartz` fork with: `docker exec -it quartz-hugo make update`.
-
-## Exposing Your Container to the Internet
-
-### To Your Public IP Address with Port Forwarding (insecure)
-
-Assuming you are already familiar with [port forwarding](https://en.wikipedia.org/wiki/Port_forwarding) and [setting it up with your router model](https://portforward.com):
-
-1. You should set the environment variable `HUGO_BASEURL=http://your-public-ip` and then start your container.
-2. Set up port forwarding on your router from port `p` to `your-local-ip:1313`.
-3. You should now be able to access Quartz from outside your local network at `http://your-public-ip:p`.
-
-However, your HTTP connection will be unencrypted and **this method is not secure**.
-
-### To a Domain using Cloudflare Proxy
-
-1. Port forward 443 (HTTPS) from your machine.
-2. Buy a custom domain (say, `your-domain.com`) from [Cloudflare](https://www.cloudflare.com/products/registrar/). Point a DNS A record from `your-domain.com` to your public IP address and enable the proxy.
-3. Set the environment variables `HUGO_BASEURL=https://your-domain.com`, `HUGO_PORT=443`, and `HUGO_APPENDPORT=false`. Change `1313:1313` to `443:443` for the `ports` in `docker-compose.yml`.
-4. Spin up your Quartz container and enjoy it at `https://your-domain.com`!
-
-### To a Domain using a Reverse Proxy
-
-If you want to serve more than just Quartz to the internet on this machine (or don't want to use the Cloudflare registrar and proxy), you should follow the steps in the section above (as appropriate) and also set up a reverse proxy, like [Traefik](https://doc.traefik.io/traefik). Be sure to configure your TLS certificates too!
diff --git a/content/notes/search.md b/content/notes/search.md
deleted file mode 100644
index 045769365..000000000
--- a/content/notes/search.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-title: "Search"
----
-
-Quartz supports two modes of searching through content.
-
-## Full-text
-Full-text search is the default in Quartz. It produces results that *exactly* match the search query. This is easier to setup but usually produces lower quality matches.
-
-```yaml {title="data/config.yaml"}
-# the default option
-enableSemanticSearch: false
-```
-
-## Natural Language
-Natural language search is powered by [Operand](https://beta.operand.ai/). It understands language like a person does and finds results that best match user intent. In this sense, it is closer to how Google Search works.
-
-Natural language search tends to produce higher quality results than full-text search.
-
-Here's how to set it up.
-
-1. Login or Register for a new Operand account. Click the verification link sent to your email, and you'll be redirected to the dashboard. (Note) You do not need to enter a credit card to create an account, or get started with the Operand API. The first $10 of usage each month is free. To learn more, see pricing. If you go over your free quota, we'll (politely) reach out and ask you to configure billing.
-2. Create your first index. On the dashboard, under "Indexes", enter the name and description of your index, and click "Create Index". Note down the ID of the index (obtained by clicking on the index name in the list of indexes), as you'll need it in the next step. IDs are unique to each index, and look something like `uqv1duxxbdxu`.
-3. Click into the index you've created. Under "Index Something", select "SITEMAP" from the dropdown and click "Add Source".
-4. For the "Sitemap.xml URL", put your deployed site's base URL followed by `sitemap.xml`. For example, for `quartz.jzhao.xyz`, put `https://quartz.jzhao.xyz/sitemap.xml`. Leave the URL Regex empty.
-5. Get your API key. On the dashboard, under "API Keys", you can manage your API keys. If you don't already have an API key, click "Create API Key". You'll need this for the next step.
-6. Open `data/config.yaml`. Set `enableSemanticSearch` to `true`, `operandApiKey` to your copied key, and `operandIndexId` to the ID of the index we created from earlier..
-
-```yaml {title="data/config.yaml"}
-# the default option
-search:
- enableSemanticSearch: true
- operandApiKey: "jp9k5hudse2a828z98kxd6z3payi8u90rnjf"
- operandIndexId: "s0kf3bd6tldw"
-```
-7. Push your changes to the site and wait for it to deploy.
-8. Check the Operand dashboard and wait for your site to index. Enjoy natural language search powered by Operand!
diff --git a/i18n/ar.toml b/i18n/ar.toml
deleted file mode 100644
index 631c07155..000000000
--- a/i18n/ar.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "يبدو أنك ضللت الطريق. هذه الصفحة غير موجودة (أو قد تكون خاصة)."
-
-[404_back]
-other = "↳ العودة للرئيسية."
-
-[all_posts]
-other = "كل منشورات {{.Title}}"
-
-[last_updated]
-other = "آخر تعديل"
-
-[notes_count]
-other = "ملاحظات بهذه التسمية"
-
-[first_10]
-other = "(تعرض أول 10 نتائج فقط)"
-
-[tag]
-other = "التسمية"
-
-[backlinks]
-other = "الروابط الخلفية"
-
-[no_backlinks]
-other = "لا توجد روابط خلفية"
-
-[home]
-other = "الرئيسية"
-
-[light_mode]
-other = "السمة الفاتحة"
-
-[dark_mode]
-other = "السمة الداكنة"
-
-[edit_source]
-other = "تعديل المصدر"
-
-[interactive_graph]
-other = "المخطط التفاعلي"
-
-[search]
-other = "البحث"
-
-[search_icon]
-other = "أيقونة البحث"
-
-[icon_search]
-other = "أيقونة فتح نافذة البحث"
-
-[recent_notes]
-other = "الملاحظات اﻷخيرة"
-
-[first_3_notes]
-other = "أول 3 {{ .notes }}"
-
-[search_for_something]
-other = "ابحث عن شيء ما..."
-
-[toc]
-other = "الفهرس"
-
-[copyright]
-other = "صُمم بواسطة {{ .name }} باستخدام كوارتز، {{ .year }} ©"
diff --git a/i18n/bn.toml b/i18n/bn.toml
deleted file mode 100644
index 2d3acfb21..000000000
--- a/i18n/bn.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "এই পাতাটি নেই (অথবা ব্যক্তিগত)"
-
-[404_back]
-other = "↳ হোম পেজে ফিরে যাই"
-
-[all_posts]
-other = "সকল {{.Title}}"
-
-[last_updated]
-other = "সর্বশেষ পরিবর্তিত"
-
-[notes_count]
-other = "সংখ্যক এই ট্যাগের"
-
-[first_10]
-other = "প্রথম ১০ টি ফলাফল"
-
-[tag]
-other = "ট্যাগ"
-
-[backlinks]
-other = "পিছন পাতা"
-
-[no_backlinks]
-other = "পিছনে কোন পাতা নেই"
-
-[home]
-other = "হোম"
-
-[light_mode]
-other = "আলোকিত"
-
-[dark_mode]
-other = "অন্ধকার"
-
-[edit_source]
-other = "সম্পাদন করুন"
-
-[interactive_graph]
-other = "জ্ঞানকোষের গ্রাফ"
-
-[search]
-other = "খুঁজুন"
-
-[search_icon]
-other = "খোঁজার আইকন"
-
-[icon_search]
-other = "জ্ঞানকোষ"
-
-[recent_notes]
-other = "সাম্প্রতিক"
-
-[first_3_notes]
-other = "প্রথম ৩ {{ .notes }}"
-
-[search_for_something]
-other = "খুঁজুন..."
-
-[toc]
-other = "সূচিপত্র"
-
-[copyright]
-other = "{{ .name }} কর্তৃক Quartz ব্যবহার করে তৈরিকৃত © {{ .year }}"
\ No newline at end of file
diff --git a/i18n/de.toml b/i18n/de.toml
deleted file mode 100644
index 266bfd71c..000000000
--- a/i18n/de.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "Hey! Hast du dich verirrt? Diese Seite existiert leider nicht (oder ist privat)."
-
-[404_back]
-other = "↳ Zurück zur Startseite."
-
-[all_posts]
-other = "Alle {{.Title}}"
-
-[last_updated]
-other = "Zuletzt aktualisiert"
-
-[notes_count]
-other = "Beiträge mit diesem Tag"
-
-[first_10]
-other = "Zeige die ersten 10 Ergebnisse"
-
-[tag]
-other = "Tag"
-
-[backlinks]
-other = "Backlinks"
-
-[no_backlinks]
-other = "Keine Backlinks gefunden"
-
-[home]
-other = "Home"
-
-[light_mode]
-other = "Light Mode"
-
-[dark_mode]
-other = "Dark Mode"
-
-[edit_source]
-other = "Quelldatei bearbeiten"
-
-[interactive_graph]
-other = "Interaktiver Graph"
-
-[search]
-other = "Suche"
-
-[search_icon]
-other = "Suchsymbol"
-
-[icon_search]
-other = "Symbol, um die Suche zu öffnen"
-
-[recent_notes]
-other = "Neuste Beiträge"
-
-[first_3_notes]
-other = "Die ersten 3 {{ .notes }}"
-
-[search_for_something]
-other = "Suche nach etwas ..."
-
-[toc]
-other = "Inhaltsverzeichnis"
-
-[copyright]
-other = "Made by {{ .name }} using Quartz, © {{ .year }}"
diff --git a/i18n/en.toml b/i18n/en.toml
deleted file mode 100644
index b9ce33e6c..000000000
--- a/i18n/en.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "Hey! You look a little lost. This page doesn't exist (or may be private)."
-
-[404_back]
-other = "↳ Let's get you home."
-
-[all_posts]
-other = "All {{.Title}}"
-
-[last_updated]
-other = "Last updated"
-
-[notes_count]
-other = "notes with this tag"
-
-[first_10]
-other = "showing first 10 results"
-
-[tag]
-other = "Tag"
-
-[backlinks]
-other = "Backlinks"
-
-[no_backlinks]
-other = "No backlinks found"
-
-[home]
-other = "Home"
-
-[light_mode]
-other = "Light Mode"
-
-[dark_mode]
-other = "Dark Mode"
-
-[edit_source]
-other = "Edit Source"
-
-[interactive_graph]
-other = "Interactive Graph"
-
-[search]
-other = "Search"
-
-[search_icon]
-other = "Search Icon"
-
-[icon_search]
-other = "Icon to open search"
-
-[recent_notes]
-other = "Recent Notes"
-
-[first_3_notes]
-other = "first 3 {{ .notes }}"
-
-[search_for_something]
-other = "Search for something..."
-
-[toc]
-other = "Table of Contents"
-
-[copyright]
-other = "Made by {{ .name }} using Quartz, © {{ .year }}"
diff --git a/i18n/es.toml b/i18n/es.toml
deleted file mode 100644
index 2effa2371..000000000
--- a/i18n/es.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "Hey! Te ves un poco perdido. Esta página no existe (o puede que sea privada)."
-
-[404_back]
-other = "↳ Vamos a llevarte de regreso a casa."
-
-[all_posts]
-other = "Todos {{.Title}}"
-
-[last_updated]
-other = "Actualizado por última vez"
-
-[notes_count]
-other = "notas con esta etiqueta"
-
-[first_10]
-other = "mostrando los primeros 10 resultados"
-
-[tag]
-other = "Etiqueta"
-
-[backlinks]
-other = "Backlinks"
-
-[no_backlinks]
-other = "No se encontraron backlinks"
-
-[home]
-other = "Casa"
-
-[light_mode]
-other = "Modo Claro"
-
-[dark_mode]
-other = "Modo Oscuro"
-
-[edit_source]
-other = "Editar Fuente"
-
-[interactive_graph]
-other = "Gráfico Interactivo"
-
-[search]
-other = "Búsqueda"
-
-[search_icon]
-other = "Ícono de Búsqueda"
-
-[icon_search]
-other = "Ícono para abrir la búsqueda"
-
-[recent_notes]
-other = "Notas Recientes"
-
-[first_3_notes]
-other = "primeras 3 {{ .notes }}"
-
-[search_for_something]
-other = "Buscar algo..."
-
-[toc]
-other = "Tabla de Contenido"
-
-[copyright]
-other = "Hecho por {{ .name }} usando Quartz, © {{ .year }}"
diff --git a/i18n/fr.toml b/i18n/fr.toml
deleted file mode 100644
index e87008d54..000000000
--- a/i18n/fr.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "Hey ! Vous semblez perdu‧e. Cette page n'existe pas (ou est privée)."
-
-[404_back]
-other = "↳ On va te faire retourner à l'accueil"
-
-[all_posts]
-other = "Tout {{.Title}}"
-
-[last_updated]
-other = "Dernière modification"
-
-[notes_count]
-other = "notes avec ce tag"
-
-[first_10]
-other = "affichant les 10 premiers résultats"
-
-[tag]
-other = "Tag"
-
-[backlinks]
-other = "Backlinks"
-
-[no_backlinks]
-other = "Pas de backlinks trouvés"
-
-[home]
-other = "Accueil"
-
-[light_mode]
-other = "Mode Clair"
-
-[dark_mode]
-other = "Mode Sombre"
-
-[edit_source]
-other = "Editer la source"
-
-[interactive_graph]
-other = "Graphique interactif"
-
-[search]
-other = "Rechercher"
-
-[search_icon]
-other = "Icône de recherche"
-
-[icon_search]
-other = "Icon pour ouvrir la recherche"
-
-[recent_notes]
-other = "Notes récentes"
-
-[first_3_notes]
-other = "3 premières {{ .notes }}"
-
-[search_for_something]
-other = "Rechercher quelque-chose..."
-
-[toc]
-other = "Table des matières"
-
-[copyright]
-other = "Fait par {{ .name }} en utilisant Quartz, © {{ .year }}"
diff --git a/i18n/it.toml b/i18n/it.toml
deleted file mode 100644
index f5817b453..000000000
--- a/i18n/it.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "Hey, ti sei perso? Questa pagina non esiste (o è privata)"
-
-[404_back]
-other = "↳ Torna alla home."
-
-[all_posts]
-other = "Tutti {{.Title}}"
-
-[last_updated]
-other = "Ultima modifica"
-
-[notes_count]
-other = "note con questo tag"
-
-[first_10]
-other = "mostrando i primi 10 risultati"
-
-[tag]
-other = "Tag"
-
-[backlinks]
-other = "Backlinks"
-
-[no_backlinks]
-other = "Nessun Backlink trovato"
-
-[home]
-other = "Home"
-
-[light_mode]
-other = "Modalità Chiara"
-
-[dark_mode]
-other = "Modalità Scura"
-
-[edit_source]
-other = "Modifica Sorgente"
-
-[interactive_graph]
-other = "Grafico Interattivo"
-
-[search]
-other = "Cerca"
-
-[search_icon]
-other = "Icona di ricerca"
-
-[icon_search]
-other = "Icona per aprire la ricerca"
-
-[recent_notes]
-other = "Note Recenti"
-
-[first_3_notes]
-other = "prime 3 {{ .notes }}"
-
-[search_for_something]
-other = "Cerca qualcosa..."
-
-[toc]
-other = "Indice"
-
-[copyright]
-other = "Realizzato da {{ .name }} con Quartz, © {{ .year }}"
diff --git a/i18n/no.toml b/i18n/no.toml
deleted file mode 100644
index 79e700ff6..000000000
--- a/i18n/no.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "Hei! Ser ut til at du har gått deg vill. Denne siden finnes ikke (eller den kan være privat)."
-
-[404_back]
-other = "↳ La oss få deg hjem."
-
-[all_posts]
-other = "Alle {{.Title}}"
-
-[last_updated]
-other = "Sist oppdatert"
-
-[notes_count]
-other = "notater med denne taggen"
-
-[first_10]
-other = "viser første 10 resultatene"
-
-[tag]
-other = "Tag"
-
-[backlinks]
-other = "Tilbakekoblinger"
-
-[no_backlinks]
-other = "Ingen tilbakekoblinger funnet"
-
-[home]
-other = "Hjem"
-
-[light_mode]
-other = "Lys Modus"
-
-[dark_mode]
-other = "Mørk Modus"
-
-[edit_source]
-other = "Rediger Kilde"
-
-[interactive_graph]
-other = "Interaktiv Graf"
-
-[search]
-other = "Søk"
-
-[search_icon]
-other = "Søkeikon"
-
-[icon_search]
-other = "Ikon for å åpne søk"
-
-[recent_notes]
-other = "Nylige notater"
-
-[first_3_notes]
-other = "første 3 {{ .notes }}"
-
-[search_for_something]
-other = "Søk etter noe..."
-
-[toc]
-other = "Innholdsfortegnelse"
-
-[copyright]
-other = "Opprettet av {{ .name }} ved hjelp av Quartz, © {{ .year }}"
diff --git a/i18n/tr.toml b/i18n/tr.toml
deleted file mode 100644
index 0515128b6..000000000
--- a/i18n/tr.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "Hey! Biraz kaybolmuş görünüyorsun. Bu sayfa mevcut değil (veya özel olabilir)."
-
-[404_back]
-other = "↳ Seni eve götürelim."
-
-[all_posts]
-other = "Hepsi {{.Title}}"
-
-[last_updated]
-other = "Son güncelleme"
-
-[notes_count]
-other = "Bu etikete sahip notlar"
-
-[first_10]
-other = "İlk 10 sonuç gösteriliyor"
-
-[tag]
-other = "Etiket"
-
-[backlinks]
-other = "Geri bağlantılar"
-
-[no_backlinks]
-other = "Geri bağlantı bulunamadı"
-
-[home]
-other = "Ev"
-
-[light_mode]
-other = "Aydınlık Modu"
-
-[dark_mode]
-other = "Karanlık Modu"
-
-[edit_source]
-other = "Kaynağı Düzenle"
-
-[interactive_graph]
-other = "Etkileşimli Grafik"
-
-[search]
-other = "Ara"
-
-[search_icon]
-other = "Arama Simgesi"
-
-[icon_search]
-other = "Aramayı açmak için simge tıklayın"
-
-[recent_notes]
-other = "Son Notlar"
-
-[first_3_notes]
-other = "İlk Üç {{ .notes }}"
-
-[search_for_something]
-other = "Bir şey ara..."
-
-[toc]
-other = "İçindekiler"
-
-[copyright]
-other = "{{ .name }} tarafından Quartz kullanılarak yapılmıştır, © {{ .year }}"
diff --git a/i18n/uk.toml b/i18n/uk.toml
deleted file mode 100644
index f84f5ce01..000000000
--- a/i18n/uk.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "Хей! Виглядаєте здивовано. Цієї сторінки не існує (або вона приватна)."
-
-[404_back]
-other = "↳ Повернемося додому."
-
-[all_posts]
-other = "Всі {{.Title}}"
-
-[last_updated]
-other = "Оновлено"
-
-[notes_count]
-other = "нонаток з цим тегом"
-
-[first_10]
-other = "показано 10 перших результатів"
-
-[tag]
-other = "Тег"
-
-[backlinks]
-other = "Зворотнє посилання"
-
-[no_backlinks]
-other = "Зворотних посилань не знайдено"
-
-[home]
-other = "Дім"
-
-[light_mode]
-other = "Світлий Режим"
-
-[dark_mode]
-other = "Темний Режим"
-
-[edit_source]
-other = "Редагувати Джерело"
-
-[interactive_graph]
-other = "Інтерактивний граф"
-
-[search]
-other = "Пошук"
-
-[search_icon]
-other = "Іконка Пошуку"
-
-[icon_search]
-other = "Іконка для відкриття пошуку"
-
-[recent_notes]
-other = "Нещодавні Нотатки"
-
-[first_3_notes]
-other = "перші 3 {{ .notes }}"
-
-[search_for_something]
-other = "Знайти щось..."
-
-[toc]
-other = "Зміст"
-
-[copyright]
-other = "Створено {{ .name }} з використанням Quartz, © {{ .year }}"
diff --git a/i18n/zh-cn.toml b/i18n/zh-cn.toml
deleted file mode 100644
index ca8c1b1eb..000000000
--- a/i18n/zh-cn.toml
+++ /dev/null
@@ -1,65 +0,0 @@
-[404_message]
-other = "喔哦...... 你是不是迷路了呀..... (⌯' '⌯ ) 这个页面并不存在(也许它还未被发布)。"
-
-[404_back]
-other = "↳ 回到主页"
-
-[all_posts]
-other = "所有 {{.Title}}"
-
-[last_updated]
-other = "最后更新于"
-
-[notes_count]
-other = "带有此标签的笔记"
-
-[first_10]
-other = "正在展示前10个结果"
-
-[tag]
-other = "标签"
-
-[backlinks]
-other = "反向链接"
-
-[no_backlinks]
-other = "没有找到反向链接"
-
-[home]
-other = "主页"
-
-[light_mode]
-other = "明亮模式"
-
-[dark_mode]
-other = "黑暗模式"
-
-[edit_source]
-other = "编辑源码"
-
-[interactive_graph]
-other = "互动图"
-
-[search]
-other = "搜索"
-
-[search_icon]
-other = "搜索图标"
-
-[icon_search]
-other = "打开搜索图标"
-
-[recent_notes]
-other = "近期笔记"
-
-[first_3_notes]
-other = "前3个 {{ .notes }}"
-
-[search_for_something]
-other = "进行搜索......"
-
-[toc]
-other = "目录"
-
-[copyright]
-other = "由 {{ .name }} 用 Quartz 创造, © {{ .year }}"
diff --git a/layouts/404.html b/layouts/404.html
index 5607e6345..424839502 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,5 +1,5 @@
-
+
{{ partial "head.html" . }}
@@ -7,9 +7,10 @@
{{partial "darkmode.html" .}}
+
diff --git a/layouts/_default/_markup/render-codeblock-mermaid.html b/layouts/_default/_markup/render-codeblock-mermaid.html
deleted file mode 100644
index 59641551c..000000000
--- a/layouts/_default/_markup/render-codeblock-mermaid.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
- {{- .Inner | safeHTML }}
-
-{{ .Page.Store.Set "hasMermaid" true }}
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index be36d2e9e..4757b7284 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -1,9 +1,9 @@
-{{$dashedurl := replace .Destination "%20" "-" }}
+{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
+{{$dashedurl := replace $trimmed "%20" "-" }}
{{$external := strings.HasPrefix $dashedurl "http" }}
{{- if $external -}}
{{ .Text | safeHTML }}
{{- else -}}
-{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
{{$spacedurl := replace $trimmed "%20" " " }}
{{$fixedUrl := (cond (hasPrefix $spacedurl "/") $spacedurl (print "/" $spacedurl)) | urlize}}
{{$nonexistent := eq (.Page.GetPage $spacedurl).RelPermalink ""}}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 8754b1f28..ccb3b93ac 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,5 +1,5 @@
-
+
{{ block "head" . }}
{{ end }}
diff --git a/layouts/_default/section.html b/layouts/_default/section.html
index f88b85fce..96611c4ce 100644
--- a/layouts/_default/section.html
+++ b/layouts/_default/section.html
@@ -1,5 +1,5 @@
-
+
{{ partial "head.html" . }}
@@ -8,7 +8,7 @@
{{partial "header.html" .}}
- {{ i18n "all_posts" . }}
+ All {{.Title}}
{{with .Params.description}}
{{.}}
{{end}}
@@ -18,4 +18,5 @@
{{partial "contact.html" .}}
+
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
index 01ec325ac..7e401ae03 100644
--- a/layouts/_default/taxonomy.html
+++ b/layouts/_default/taxonomy.html
@@ -1,5 +1,5 @@
-
+
{{ partial "head.html" . }}
@@ -8,7 +8,7 @@
{{partial "header.html" .}}
- {{ i18n "all_posts" . }}
+ All {{.Title}}
{{with .Params.description}}
{{.}}
{{end}}
@@ -16,7 +16,7 @@
{{ range .Site.Taxonomies.tags.ByCount }}
{{ with ($.Site.GetPage (printf "/tags/%s" .Page.Title)) }}
{{partial "page-list.html" (first 10 .Pages.ByLastmod.Reverse)}}
@@ -27,4 +27,5 @@
{{partial "contact.html" .}}
+
diff --git a/layouts/_default/term.html b/layouts/_default/term.html
index 6bda201bc..79bd4eb05 100644
--- a/layouts/_default/term.html
+++ b/layouts/_default/term.html
@@ -1,5 +1,5 @@
-
+
{{ partial "head.html" . }}
@@ -8,7 +8,7 @@
{{partial "header.html" .}}
- {{ i18n "tag" }}: {{ .Title }}
+ Tag: {{ .Title }}
{{with .Params.description}}
{{.}}
{{end}}
@@ -18,4 +18,5 @@
{{partial "contact.html" .}}
+
diff --git a/layouts/partials/backlinks.html b/layouts/partials/backlinks.html
index ae6ea1a8e..23c9091a5 100644
--- a/layouts/partials/backlinks.html
+++ b/layouts/partials/backlinks.html
@@ -1,4 +1,4 @@
-{{ i18n "backlinks" }}
+Backlinks
{{$url := urls.Parse .Site.BaseURL }}
{{$host := strings.TrimRight "/" $url.Path }}
@@ -24,7 +24,7 @@
{{- end -}}
{{else}}
-
- {{ i18n "no_backlinks" }}
+ No backlinks found
{{end}}
diff --git a/layouts/partials/contact.html b/layouts/partials/contact.html
index 3de7d2c68..e52dc4474 100644
--- a/layouts/partials/contact.html
+++ b/layouts/partials/contact.html
@@ -1,17 +1,12 @@
-
-{{ $config := cond (eq $.Site.Language.Lang "en") "config" (printf "config.%s" $.Site.Language.Lang) }}
-{{ $data := index $.Site.Data $config }}