When you use Obsidian Publish, everything you publish is visible. I would like to share a specifc set of information with different audiences.
For example, Philosophy 101 only sees notes they have access to see. Philosophy 201 only sees notes they have been given access to, etc.
In addition, sometimes I’m working on a small project and I want to share just a few notes with a friend, but I don’t want to share everything in my vault.
Proposed solution
I would like to give access to notes on a per folder basis. For example, everything in the Philosophy 101 folder has a password that is different from the Phil201 folder.
Current workaround (optional)
My current workaround is to copy and paste from Obsidian into Craft.
Of course, the other solution is to buy additional licenses and use Obsidian Publish as it is designed! I want to use Obsidian in a school context and I see something that is being worked on that might solve my problem.
I don’t have Publish so I can’t test it, but I assume it’s because it’s a single page app. You can have Cloudflare inject some JavaScript to redirect the user when it detects that they travel from an open page to a protected one. It shouldn’t be that hard.
That being said, as the protection is happening clientside a clever person could remove it and browse the whole site, so it wouldn’t be for any critical applications. The only way to do that would be for Obsidian to add the functionality.
How might one configure Cloudflare to ‘inject some JavaScript to redirect the user when it detects that they travel from an open page to a protected one’? You raise an important point about this level of protection occurring client-side, nonetheless, this would be helpful.
I have deployed the same Auth Challenge protection to a route as per the walkthrough from 403.ie, and, as yomaru indicated, such Cloudflare ‘routes’ evidently remain unprotected when navigating via links or in-page search results on open pages:
Enter the path to the subdirectory you want to protect, including an (asterisk) at the end to ensure all recursive content is protected (ie. 403page.com/private_directory/*). Click Save.
Then head back to the main Workers page where you set the route before. You’ll notice the route you added earlier (403page.com/private_directory/* in my case) shows the following message:
Use the Cloudflare worker to add a <script> section into the DOM which watches for any click event, and check if the location they’re clicking to should be protected. If so, redirect them to a signup page, etc.