fix #54: root all image urls
1 files added
2 files modified
| | |
| | | ### Enable GitHub Actions |
| | | By default, GitHub disables workflows from running automatically on Forked Repostories. Head to the 'Actions' tab of your forked repository and Enable Workflows to setup deploying your Quartz site! |
| | | |
| | | *Enable GitHub Actions* |
| | | *Enable GitHub Actions* |
| | | |
| | | ### Enable GitHub Pages |
| | | |
| New file |
| | |
| | | {{$src := .Destination | safeURL }} |
| | | {{$external := strings.HasPrefix $src "http" }} |
| | | {{- if $external -}} |
| | | <img src="{{ $src }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}" {{ end }} /> |
| | | {{- else -}} |
| | | {{$fixedUrl := (cond (hasPrefix $src "/") $src (print "/" $src)) | urlize}} |
| | | <img src="{{ $fixedUrl }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}" {{ end }} /> |
| | | {{- end -}} |
| | |
| | | fetchData().then(({content}) => { |
| | | const links = [...document.getElementsByClassName("internal-link")] |
| | | links.forEach(li => { |
| | | console.log(li.dataset.src.replace(baseUrl, "")) |
| | | console.log(content[li.dataset.src.replace(baseUrl, "")]) |
| | | console.log(content) |
| | | const linkDest = content[li.dataset.src.replace(baseUrl, "")] |
| | | // const linkDest = content[li.dataset.src] |
| | | if (linkDest) { |