Hello! I have a kind of an unusual use case, perhaps. I already have a bunch of HTML/JS “apps” that I have developed, which currently I just serve using React Router to navigate between different apps.
I wanted to use Grav on the front end of this, basically my goal is to continue to serve up these apps as HTML but to put some front matter (navigational pages and other auxilliary pages) around it and to do some user management so that different client users are only allowed access to these pages as needed.
So, although Grav is built around markdown I would like to side step that. I would perhaps use Markdown for the front page, but all of the sub-pages would just be the index.html for apps that I have already created.
I tried just creating new directories under /user/pages with the HTML content but just creating a new subdirectory under “pages” doesn’t magically make the page appear, it seems that you need to have a default.md for the magic to happen?
For example, imagine I have:
and the index.html contains
If I run my own server using “pages” as the root, (e.g. with python -m http.server) then navigating to localhost:8001/05.test/default.html will display the picture of the cat, with “Art/Cat.jpg” being resolved to the absolute URL “localhost:8001/05.test/Art/cat.jpg”
If I try to view the same content within Grav, firstly the .html does not appear, so I create a default.md containing the same tag, then the page appears at localhost:8000/test (serving my grav directory this time with “php -S localhost:8000 system/router.php”)
But it appears with a broken image link, with the img pointing to the absolute path localhost:8000/Art/Cat.jpg.
There are two problems there, firstly is that the relative link Art/Cat should probably be relative to the “test” folder, and it’s not. I’m not really sure why it behaves that way. The second is that even if it was relative to /test, i.e. localhost:8000/test/Art/Cat.jpg, that’s also an error 404, because Grav does not seem to serve up the files from underneath the page directory in that way.
Is there a way that I can make grav work the way I want, and just serve up the contents of a page directory “as is”? Again, I could just serve the directory plain, e.g. from Apache, which is what I’m doing now, but I want Grav for the extra organizational structure such as user accounts and permissions.