Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show graph does not work anymore #726

Closed
merlinuwe opened this issue May 21, 2023 · 13 comments
Closed

Show graph does not work anymore #726

merlinuwe opened this issue May 21, 2023 · 13 comments

Comments

@merlinuwe
Copy link

I have already seen this working. I think, this issue must be located in one of the last releases.

Clicking on it has no effect.

image

@dwrolvink
Copy link
Collaborator

Works for me:
image

If you press F12 and click on console, does it show errors?

@merlinuwe
Copy link
Author

This is the last output of the script:

b'C:/Users/uwewe/AppData/Roaming/Python/Python311/Scripts/output/md/Privat/Kunst Lyrik/Zitate - Brand eins.md'
b'C:/Users/uwewe/AppData/Roaming/Python/Python311/Scripts/output/md/Privat/Kunst Lyrik/Zitate - Controlling.md'
b'C:/Users/uwewe/AppData/Roaming/Python/Python311/Scripts/output/md/Privat/Kunst Lyrik/Zitate - Quellen.md'
> COMPILING INDEX FROM DIR STRUCTURE (C:\Users\uwewe\AppData\Roaming\Python\Python311\Scripts\output\html\obs.html\dir_index.html)
< COMPILING INDEX FROM DIR STRUCTURE: Done
> SECOND PASS HTML
< SECOND PASS HTML: Done
< COMPILING HTML FROM MARKDOWN CODE: Done

EXPORTING USER FILES

Is this config.yml correct?

config.yml.txt

@dwrolvink
Copy link
Collaborator

Does custom.css exist in the root of your vault?, ie at H:/Syncthing/Obsidian/custom.css?

If you press F12 and click on console, does it show errors?

Can you answer this please.

@merlinuwe
Copy link
Author

Has it to be exactly this name custom.css? Because now it works.

b'C:/Users/uwewe/AppData/Roaming/Python/Python311/Scripts/output/md/Privat/Kunst Maltechniken/Zeichnen.md'
b'C:/Users/uwewe/AppData/Roaming/Python/Python311/Scripts/output/md/Privat/Kunst Maltechniken/Zeichnen - \xdcbung zum Schraffieren.md'
b'C:/Users/uwewe/AppData/Roaming/Python/Python311/Scripts/output/md/Privat/Kunst Lyrik/Zitate - Brand eins.md'
b'C:/Users/uwewe/AppData/Roaming/Python/Python311/Scripts/output/md/Privat/Kunst Lyrik/Zitate - Controlling.md'
b'C:/Users/uwewe/AppData/Roaming/Python/Python311/Scripts/output/md/Privat/Kunst Lyrik/Zitate - Quellen.md'
> COMPILING INDEX FROM DIR STRUCTURE (C:\Users\uwewe\AppData\Roaming\Python\Python311\Scripts\output\html\obs.html\dir_index.html)
< COMPILING INDEX FROM DIR STRUCTURE: Done
> SECOND PASS HTML
< SECOND PASS HTML: Done
< COMPILING HTML FROM MARKDOWN CODE: Done

EXPORTING USER FILES
Writing C:/Users/uwewe/AppData/Local/obsidianhtml/obsidianhtml/tmpdir/input/custom.css to C:/Users/uwewe/AppData/Roaming/Python/Python311/Scripts/output/html/custom.css (utf-8)
< EXPORTING USER FILES: Done

You can find your output at:
md: C:\Users\uwewe\AppData\Roaming\Python\Python311\Scripts\output\md
html: C:\Users\uwewe\AppData\Roaming\Python\Python311\Scripts\output\html

uwewe@Uwe-PC-SSD MINGW64 ~/AppData/Roaming/Python/Python311/Scripts

@merlinuwe
Copy link
Author

But the graph is not showing.

@merlinuwe
Copy link
Author

F12 console gives this:

image

@dwrolvink
Copy link
Collaborator

Does this happen on every page? I tested with your index page from unterricht, do you have this issue there?

Has it to be exactly this name custom.css? Because now it works.

When I showed you the code for the custom.css, I did state that you had to create that file in the root of your vault unless you changed the paths in the config.yml, which you did not do, so yes, if you configure a file export, the file needs to exist at that specific location.

@merlinuwe
Copy link
Author

@dwrolvink
Copy link
Collaborator

What command did you use to start the webserver?

image

I remember that error, but I don't get it anymore with python -m http.server
obsidianhtml serve has this code added though:

    Handler.extensions_map.update(
        {
            ".js": "application/javascript",
        }
    )

which ought to fix this issue, you might try obsidianhtml serve --directory <directory path> --port 8080
(Be sure to go to http://localhost:8080 instead of http://localhost:8888)

@dwrolvink
Copy link
Collaborator

Might try this fix on Windows also:

As per: https://stackoverflow.com/questions/64013643/failed-to-load-module-script-the-server-responded-with-a-non-javascript-mime-ty

(Make sure that key Content Type exists in that location as shown in the registry editor.)
Not sure if this is the issue though, Windows tires me.

Though as said in that thread, just restarting the server with port 8080 (or any other) might also work? 🤔

@merlinuwe
Copy link
Author

merlinuwe commented May 22, 2023

Njet.

I see this:

image

Shall I change Content Type to "text/javascript"? I do it ... restart the webserver with

python -m http.server --directory output/html 8080

и большая улыбка пробегает по моему лицу

image

;-)
Thank you again!

@merlinuwe
Copy link
Author

(Your solution works with both ports, 8080 and 8888)

@dwrolvink
Copy link
Collaborator

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants