ylc395 / joplin-plugin-pages-publisher

A Joplin plugin to generate static blog website from picked notes, and publish it as Github Pages
109 stars 19 forks source link

Links leading to a 404 error due to a missing .html in the path #2

Closed Klemet closed 3 years ago

Klemet commented 3 years ago

Hello, there !

Thank you for your plugin. It's absolutely wonderful, and I think that it adds a lot to Joplin.

However, I've been running into a couple of issues when trying to preview the website that I tried to make by using python to server the html pages (as indicated in your wiki).

First, the index page is empty :

image

Second, the Archives and About links lead to a 404 error.

image

This is solved by adding ".html" at the end of the URI.

image

The same thing goes for all of the links in the website : none of them work, except if "html" is added at the end.

Would you have an idea as to how to fix this ?

ylc395 commented 3 years ago

First, the index page is empty :

Yes , that is what It should be like. It's just a simple Home Page. You can visit my website: https://cyl.moe

Second, the Archives and About links lead to a 404 error.

When your pages are served by Github Pages, no .html is OK, but Python HTTP server does not have this feature. I do not realize this because I usually use Node.js HTTP Server, which also allows .html missed.

I'll update the wiki later. You can use Node.js HTTP Server for previewing:

Step1: install Node.js Step2: In Terminal:

npm install --global http-server
http-server <output-dir>
Klemet commented 3 years ago

Thank you so much, it worked like a charm on Windows 10 !

My apologies for not understanding how the index page worked; now that I understand that it is on purpose, I find it very beautiful and minimalist : ).