Giter Club home page Giter Club logo

Comments (4)

DeemOnSecurity avatar DeemOnSecurity commented on August 28, 2024

I believe the issue is that obsidian grabs a file name or the contents of [[]] as the title, where Quartz uses the frontmatter, it's unable to grab a title because there is no frontmatter to the file.

from quartz.

navneethatgodreams avatar navneethatgodreams commented on August 28, 2024

Yes that is likely. Although since the file is not created yet, this could probably be fixed with a conditional check if file exists type of command before the link is created in the graph code itself.

Unfortunately I'm not a coder, or I would've tried it myself :/

from quartz.

navneethatgodreams avatar navneethatgodreams commented on August 28, 2024

Perhaps an if statement of sorts here would be a quick fix?

  1. I changed the "//draw labels" sections in Layouts->Partials->Graph

from:
.text((d) => content[decodeURI(d.id).replace(/\s+/g, '-')]?.title || "Untitled")
to
.text((d) => content[decodeURI(d.id).replace(/\s+/g, '-')]?.title || "")

and this makes the titles on the unnamed nodes disappear. The nodes still show up, but i'm guessing adding an exception somewhere in "//draw individual nodes" should help?

from quartz.

jackyzha0 avatar jackyzha0 commented on August 28, 2024

It is actually intended behaviour to name notes 'Untitled' if they do not have a title.

To change this, you can filter out notes without title by modifying all instances of neighbours.add(...) to check for the title.

e.g.

parseIdsFromLinks(links).forEach(id => neighbours.add(id))

becomes

parseIdsFromLinks(links)
	.filter(id => !!content[decodeURI(id).replace(/\s+/g, '-')]?.title)
	.forEach(id => neighbours.add(id))

from quartz.

Related Issues (20)

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.