Publish: Random/Dice Plugin

It would be nice for the visitors to go to a random page by clicking the plugin dice icon.

4 Likes

that’s a really cool idea. The random note community plugin is great. Would love to use something like it for obsidian publish!

2 Likes

Hey! I’ve actually been very curious to implement this. Perhaps there’s a way to achieve it through publish.js

The only alternative I found so far is to manually add every page to a service like this one called Nimble Links but it’s quite expensive, and still too much manual work

Would love to hear if anyone else has a better solution with javascript on the site?

1 Like

Just wondering if anyone has figured out a way to rotate between random notes in Obsidian publish?

I would love to be able to do this. In fact, having this option would be all I need to migrate one of my big online libraries onto Obsidian.

This sounds like fun, and I could really use it too. I’ll see how I can implement it and keep you posted.

A reminder for myself :wink:
2025-02-21T23:44:00Z

1 Like

I would like to have this too! I saw that there are ways, but too complicated for me to implement.
I like how wikipedia allows it, with just this link (without the \ !)

\https://en.wikipedia.org/wiki/Special:Random

1 Like

Okay, we got something—probably not what most of you all desire, but here’s what I was able to achieve:

Using a Python script, I scan multiple directories for Markdown files and extract the permalink from their YAML properties—this is essential for maintaining clean URLs when using Obsidian Publish. The script generates a JSON file that includes both the valid permalinks and those that were excluded. Then, by integrating this JSON into a Bolt.new component, you can deploy a random note feature on your site.

Limitations:

  • You’ll need to rerun the Python script every time you add new pages.
  • Update your Bolt.new component with the new data and adjust the iframe’s URL accordingly.

For a demo and a full breakdown, check out: OBSIDIAN.publish.random.note

1 Like

Beto! This looks fabulous! :grinning:

I just now had a chance to take a look at your new plugin, and I’m eager to give it a try. I don’t have any experience with Python, yet ~ but my partner does ~ so once he and I can coordinate a time to set things up, I’ll be sure to give it a test run, and then let you know if I have any additional questions.

Thanks again ~ and thanks also for providing a place to host/run the necessary script! :pray: