Skip to content

Running paperbits on arbitrary subpath #211

Closed
@joshua-mng

Description

@joshua-mng

Im trying to use this wonderful library in my project. Basically my app is running on following url.

https://mydomain.com/

I want to do following 2 things

  1. Run published website on sub path, like https://mydomain.com/mysite1
  2. Run designer on sub path, like https://mydomain.com/sites/mysite1/designer

I replaced default PermalinkResolver and MediaPermalinkResolver to prepend /mysite1 in front of urls during publishing so now published site works partially on sub path /mysite1

I'm serving designer assets on https://mydomain.com/sites/mysite1/designer which works partially

I can replace, permalink resolver, blob storage, object storage to use my custom backend.

But problem is:

  • Event some components are replaced to handle the extra subpath, still designer is unable to load some data, like block-snippets.json, etc because those are hard coded in paperbits/constants.ts file, so what Im doing is replacing all occurences of those constant url path strings in paperbits.js file dynamically.
  • I configured /data/demo.json path to be relative to the subpath correctly, and designer loads, but it says page not found error on initial load. I suspect something has to do with the path, like /mysite1/wiki/getting-started is not being resolved to /wik/getting-started
  • When I click on individual pages in the pages widget, page are shown, but their url is relative to root path, like /wiki/getting-started instead of /mysite1/wiki/getting-started

So the question is what is the best way to achieve this? (Running published website and designer or arbitrary dynamic subpath)

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions