Closed non-descriptive closed 1 year ago
Hey @non-descriptive! Thank you for informing me about those yet-to-be-implemented pages in Wikipedia, didn't know those existed... I think your idea with the displayed message would be really good. We can even add configuration for those "special" links (meaning you can configure them to have a special color, etc.).
Wiki-tui currently kind of supports other wikis running MediaWiki (the program Wikipedia runs on) because they share the same API. In the parser, we don't differentiate between different wikis so the support for them is basic to non-existent (Because they could have different formatting). Until that is worked out I think it would be best to just stick to Wikipedia for now but I already have some ideas on how to support other sites better.
Hey, @non-descriptive!
I've finished implementing the feature and uploaded it onto the non-existent-pages
branch. Whenever a page doesn't exist yet, the following message will be displayed:
Can you check if the feature works on your end?
Works just fine.
Some pages, especially in a smaller language sections of wikipedia and others, might have non-existent page references, which are only meant to be created. I think it's a good idea to ignore such links for now or maybe display proper error message like for external links.
Describe the solution you'd like Absent page links on wikipedia goes like
'/w/index.php?title=PAGE_NAME&action=edit&redlink=1
. So we could use it to skip links of that form or show message "page PAGE NAME doesn't exist yet'. Maybe even suggest to open it in browser to write it, but this would require a separate task, since it will require some advanced stuff to do.Since wiki-tui supports not just wikipedia, but other wikis as well this thing probably should be configure in settings some way like it currently does for language support. For example
fandom.com
wikis edit link looks a bit different:/wiki/PAGE_NAME?veaction=edit&source=redlink
Steps to reproduce behaviour