jackyzha0 / quartz

🌱 a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites
https://quartz.jzhao.xyz
MIT License
6.82k stars 2.47k forks source link

Graph-component displays no content on first pageload #1231

Open McGrapefruit opened 3 months ago

McGrapefruit commented 3 months ago

Thank you in advance for your help with this! <3

Describe the bug When my quartz-page is loaded, the graph displays no content on first pageload. Only if the site is refreshed again, the graph-nodes are displayed. I believe it has something to do with the fact, that I made the component desktop only Component.DesktopOnly(Component.Graph()), (since it is on the left sidebar and would otherwise show up in the mobile header-menu)

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://quanta.nikolaus-leonard.de/'
  2. See error: Graph has no content on first load

Expected behavior Graph should show linked notes on first pageload.

Source quartz site: https://quanta.nikolaus-leonard.de/ Github Repository: https://github.com/McGrapefruit/pink-quanta

Desktop (please complete the following information):

McGrapefruit commented 3 months ago

Also, I would love the possibility to add a Component.MobileOnly(Component.Graph()), to the right sidebar (mobile-footer).

Goal: Have the Graph on the left on Desktop and on the bottom on Mobile.

Reality: If I add Component.MobileOnly(Component.Graph()), to the right sidebar, the component is visible in the mobile-footer, but without content. Even if I refresh the page, no nodes will be shown, it stays empty. It seems like the component is not built to be added two times within the quartz.layout.ts ?