Giter VIP home page Giter VIP logo

hugo-obsidian's Introduction

                                                                                ## #
                         ^                             ^                       # #                      
      ^    ^            /|\            ^    ^         /|\ ^                   ##         ^              
  ^  /|\  /|\  ^        /|\  ^     ^  /|\  /|\  ^     /|\/|\    ^          __||         /|\ ^    ^   ^ 
 /|\ /|\  /|\ /|\       /|\ /|\   /|\ /|\  /|\ /|\    /|\/|\   /|\        /.\__\        /|\/|\  /|\ /|\
 .|  #|.. .|& /|\        | #&|.   .|  #|.. .|& /|\     | #|.   /|\        |O | |        .| #|.. .|& /|\

independent research, distributed systems, interaction design, and enjoying sunsets

hugo-obsidian's People

Contributors

alonelysheep avatar bur3ku avatar colintedford avatar jackyzha0 avatar l3gacyb3ta avatar posener avatar vincenthuang75025 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hugo-obsidian's Issues

[Feature Request] Grey out broken links

Obsidian Publish, when serving a note that contains links to non-public notes, shows the link doesn't exist by greying it out and making it not redirect when clicked. Quartz makes the link look like an existent link, but when clicked the link 404's, which is less clean.

In the case in which a vault has a large proportion of links to non-public notes (either because of only wanting to serve a portion of the true vault or by using links as note ToDos) this makes the vault navigable only if you can put up with a significant proportion of your clicks being 404'd.

[Bug] Fail to render Hugo sites on Windows 11

Cannot render local website by running hugo-obsidian -input=content -output=data -index -root=. then hugo server. Returns

ERROR 2022/02/12 10:31:26 render of "page" failed: execute of template failed: template: _default/single.html:34:6: executing "_default/single.html" at <partial "footer.html" .>: error calling partial: execute of template failed: template: partials/footer.html:4:10: executing "partials/footer.html" at <partial "backlinks.html" .>: error calling partial: "..\layouts\partials\backlinks.html:12:30": execute of template failed: template: partials/backlinks.html:12:30: executing "partials/backlinks.html" at <index (index $contentTable .) "title">: error calling index: index of untyped nil

The problem is caused by Line 12 in layouts\partials\backlinks.html:

<a href="{{.}}">{{index (index $contentTable .) "title"}}</a>

This error can be reproduced on Windows 11 and Golang version 1.17.6 Windows/AMD 64.

[BUG]Multiple nodes for files with spaces in their name

Title is self explanatory. Problem doesn't occur without spaces.

Here's my attempt at understanding the problem, I will try tomorrow or in the next days to see if I can confirm and maybe fix it.

For the linkIndex.yaml generation, if I understand correctly,
the program will use the file name+path for the source , and the link inside the page for target .
With markdown styled links obsidian uses encoded urls (' ' -> '%20').
This creates a name difference between the target("a%20b") and the source("a b"), resulting in 2 different nodes pointing at the same file.

Use filename as default contentIndex.json title

Hi, is it possible to add a flag that can use the filename as the default title on contentIndex.json?

Reasoning:

Some markdown pages do not have frontmatter data, and because of this, the Backlinks section will have empty divs, and the interactive graph will show the relative path instead.

chrome_0uyoqE2rQN

Thanks

failed to install Hugo-obsidian

I tried to install Hugo-obsidan, but it seemed that I didn't install it

$ go install github.com/jackyzha0/hugo-obsidian
go install: version is required when current directory is not in a module
	Try 'go install github.com/jackyzha0/hugo-obsidian@latest' to install the latest version
MacBook-Pro:quartz leo$ go install github.com/jackyzha0/hugo-obsidian@latest
MacBook-Pro:quartz leo$ hugo-obsidian -input=content -output=data
-bash: hugo-obsidian: command not found

Would you please help out?
Thanks

Best regards

Backlinks and graph doesn't work with wikilinks

Hi. Thank you for your work!

I have to use links like this in markdown

[[notes/Числівник|Числівник]]

Instead of

[[Числівник]]

In order for graphs and backlinks to work

Images' links can't parse correctly

Such as assets/xxx.png won't parse to relative path. If add / at beginning, it's ok.
But the markdown files like xxx/xxx.md can be parsed to ../../xxx/xxx.md

Allow to change default for "draft"

I've configured Hugo to use draft: true by default for all notes so I have to explicitly specify draft: false in the notes I want to publish using Hugo.

Unfortunately, this setup results in hugo-obsidian still processing all notes and building the index for them. This results in the content of the other notes being publicly available in the contentIndex.json file.

My proposal to eliminate that issue would be to add a new option like -draft=true to allow changing the default draft status.

Compatibility with TOML frontmatter

Hello,

I notice that if I use YAML formatted FrontMatter in md files, hugo-obsidian correctly read the title (i.e. title: "My Title") and write it in the json generated file (contentIndex.json).

But, if now I use TOML formatted FrontMatter in my markdown files (i.e. title = "My Title"), then "My Title" is not correctly retrieved and the contentIndex.json is populated with the name of the markdown file instead of the title field.

Any chance to have hugo-obsidian compatible with TOML formatted FrontMatter ?

PB

Orphaned Links are added to graph indices

Describe the bug
Orphaned links are added in the indices. If the notes contain many orphan links,
this would results in increased node size and unnecessary clutter in graph.

Expected Behavior
Non existent nodes either should not be added to indices or represented separately in graph.
Further A config can also be provided to enable or disable orphan nodes.

Screenshot
I added these two links markdownlink,[[wikilink]]
orphan_link
orphan_link2

Links to domain .md could not be recognized correctly

  • I tried to add a markdown link [Obsidian](https://obsidian.md) on the website using quartz. However, when click the link on the website, it forward the address to https://obsidian/, an address without .md.
  • I think maybe quartz recognize the domian .md as a markdown file, thus forward it to a wrong address.
  • I also changed the https://obsidian.md to https://www.obsidian.md, but it's the same result without .md
  • I tried this on chrome browser both on android and macOS.
  • Here is what the image of what has been rendered:
    image

Please check it out,
Regards.

This issue is recommended to be filed here from jackyzha0/quartz#11 (comment)

How do I get the Hugo build to "pick up" the updated index?

Hey there! This is really great work! But I'm having a bit of a hiccup - I can't seem to get my re-built contentindex.json and linkindex.json to actually feed into the re-build of my site. When I deploy it's still the "old" index which 404s a TON of links that have been moved around.

After running

hugo-obsidian -input=content -output=data -index=true

I then run

hugo serve site --ignoreCache

and while the site dutifully renders the fresh site, with all other changes I'm looking for - however the interactive graph lags behind. (I'm using a fork of the Amethyst repo, which still has the original indices from the sample site) Can you help me understand that part of the build picture I'm missing here? Thanks!

Footnotes are treated as links

Hey, I want to thank you first for your great work!
I just noticed that footnotes are treated as links between file, and this leads to broken nodes in graph-view in quartz.

Example:
图片
In quartz, this footnote is represented as follows in linkIndex.json:
图片

Because linkIndex.json is generated by hugo-obsidian, so I think the problem can be fixed by excluding all the footnotes when generating linkIndex.json.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.