jstrieb / urlpages

Create and view web pages stored entirely in the URL
http://jstrieb.github.io/urlpages
MIT License
1.38k stars 129 forks source link

multi-page sites (tree hierarchy)?? #27

Closed VatsaDev closed 3 years ago

VatsaDev commented 3 years ago

Hi, me again @vatsadev ! I got the preprocessors working, repo, and I am Extremely interested in multipage for url pages, but what does multi-page sites (tree hierarchy) mean? a few links or an explanation would be helpful.

jstrieb commented 3 years ago

Hi, thanks for reaching out about this! I saw your message on my contact form as well, but have been very busy and haven't had a chance to respond until now. Also, part of the reason that I wanted to wait is that this question deserves a response on the order of a blog post, rather than a reply here. But I'll give it a shot since you seem eager for an answer.

When you have URL Pages links, the entire page is contained in the URL. What this means is that if you have a site home page (call it a) and you want to link to some other URL page (b), then the entire content of the page b needs to be contained in its URL, all of which is contained in the page a. This means that linking to page a from page b is impossible, because then the entire contents of page a would need to be stored in page b, but page b is also entirely already stored in page a. This is very confusing, but hopefully clarifies why pages linking back to other pages is impossible.

The result is that a URL Pages website would have one page (a "root" of the tree) linking to other pages. These other pages could link to still more pages, but each child page must be fully contained in its parent page. The result is that the webgraph must be a directed, acyclic graph. This is exactly the definition of a tree.

Hopefully this answers your question! Feel free to continue commenting with follow-ups, but in the meantime, I will close this issue.

VatsaDev commented 3 years ago

thanks for responding! the graph idea is pretty cool, but is there anyway in which a multifile mode is possible? I don't know if this sound incredulous or what, but if a person could make like multiple pages in one editor. like this -> files but like with urlpages instead of real files

jstrieb commented 3 years ago

The multifile mode would be a challenge, because the code would have to replace every instance of a file with an inlined version of the file's content. Even though it's theoretically possible, I don't think it makes sense for the majority of people who use URL Pages.

VatsaDev commented 3 years ago

ok