odd
odd

@sod Hej! I installed the Surprise me! Plug-in, and it works like a charm. I tried to follow the “manual” over at Github, to add it in the footer, and added “/surprise-me/“, but got “Not found”, and it looks like the last slash shouldn’t be there?

|
Embed
Progress spinner
sod
sod

@odd Hei! Thanks for checking out my plug-in. 🥰 I used my browser (and curl from the terminal) and successfully fetched both /surprise-me and /surprise-me/ on your domain. I tried my best to recreate this on my test blog without success.

Could there have been a temporary glitch?

|
Embed
Progress spinner
odd
odd

@sod I have no idea… Might be. I decided to remove it from the footer, as it is in the menu anyways, and it will suffice. I’ve discovered many posts that I have forgotten about already, thanks to your plug-in. 😊👍✨

|
Embed
Progress spinner
sod
sod

@odd Oh, I'm glad you're having fun with it. 😊 Let me know if that weird behavior comes back.

|
Embed
Progress spinner
odd
odd

@sod I haven’t checked any further, but I’m okay with it being just in the menu. 😊👍✨

|
Embed
Progress spinner
warner
warner

@sod great plugin concept! Could you please consider allowing customisation so it only considers a certain Category? For me I'd want to single out Long Articles: don't really see the point of getting a user to click-through to get a micro post!

|
Embed
Progress spinner
sod
sod

@warner Good idea, I've added that as a future enhancement. Thanks!

|
Embed
Progress spinner
warner
warner

@sod lmk when it's out!

|
Embed
Progress spinner
warner
warner

@sod ps seeing as you're taking notes: I tried installing 'reply via email' to test blog and hasn't added (example post). Bigger picture point: do you find you get more spam since adding your email there / are there any ways of optimising the plugin to avoid this? I'll be using a devoted burner address anyway but something you might wanna consider for that one

|
Embed
Progress spinner
sod
sod

@warner After installing the plug-in, you have to add the link where you want it using a custom theme. See the instructions on the plug-in page.

My email addresses have been public on the web since the mid-90s, so I really have no concept of spam volume before and after. 😊 Of course, I get spam, but it's kept away from my inbox thanks to spam filters.

That said, the web is vacuumed for email addresses all the time. If you use this plug-in, the address will get picked up sooner or later. I might add support for obfuscating the email address in the future. There's no 100 % protection against scrapers and email harvesters, though.

|
Embed
Progress spinner
JohnPhilpin
JohnPhilpin

@warner @sod

I like the idea - but maybe the filter is with / without title rather than categories?

|
Embed
Progress spinner
jemostrom
jemostrom

@sod @warner I will add a data point, I've had my email address available online since ... well, mid-90s, and today I don't see much spam. It used to be much worse about 10 years ago but since then the ISPs I'm using have started to filter out the more obvious ones and once they come to me I use SpamSieve (macOS) to filter out the rest. I perhaps see 1-2 spam messages each week.

|
Embed
Progress spinner
sod
sod

@warner @JohnPhilpin I've released version 1.1.0 with support for only long posts (or short). Let me know how it works for you.

|
Embed
Progress spinner
pratik
pratik

@sod Tried your Surprise Me plugin too. Now have three of your plugins! Works great but for a microsecond (long enough for me to click the link and take a screenshot), I see this. Expected behavior?

Also, what is considered longer posts? > 280 chars or with a title?

|
Embed
Progress spinner
pratik
pratik

@sod Scratch that. It's now stopped working.

|
Embed
Progress spinner
warner
warner

@sod ProtonMail's spam filter still has some catching up to do on Gmail, hence why I'll alias (with AnonAddy).

@jemostrom curious: when you say ISP level do you mean like a custom ISP like NextDNS, Cloudflare 1.1.1.1 and suchlike?

|
Embed
Progress spinner
sod
sod

@pratik Thanks for trying it out, and sorry for the trouble. 😅 No, that's not expected; it happens because the theme you're using lacks full support for plug-ins. I've proposed a fix for @amit to consider. Hopefully, he decides to merge that, and the problem will disappear.

The plug-in considers posts with a title to be long posts.

|
Embed
Progress spinner
sod
sod

@pratik Did it stop working after you added the page to the menu? And if so, what is the content of that newly created page? It should just be the URL like this: https://microblog.pratikmhatre.com/surprise-me/.

That will redirect your visitor to the plug-in, which, in turn, will take them to a random post. Manton has documented page redirects at the Help Center.

|
Embed
Progress spinner
sod
sod

@warner Yeah, using an alias is a great idea either way.

|
Embed
Progress spinner
amit
amit

@sod Thank you Sven. I have merged the changes. It's a fork of Arabica which lack these aspects. I hope it fixes @pratik's issues.

|
Embed
Progress spinner
sod
sod

@amit Yay, thank you! 🙏

|
Embed
Progress spinner
pratik
pratik

@sod Yes, it did. Coz it did not show up as a page in the menu by default. I just created a page called 'Surprise Me' which had the same URL as you specified above. I did change the name of the page but the URL stayed the same.

@amit, what change do I make? I've now customized your theme a little bit so don't want to start over.

|
Embed
Progress spinner
jemostrom
jemostrom

@warner No, a company like Dreamhost, etc (I don't remember any other in the US right now). I'm using a company called Webbsupport/Loopia/(Binero) ... and have been using them for 10+ years. They are probably not the best but ...

|
Embed
Progress spinner
sod
sod

@pratik Yeah, I don't want to force the page into people's menus. Not everyone likes it there; some want to rename the page, change the order in the menu, or have the Surprise me!-link in the footer instead.

Just to make sure, when you edit the page you created, does it look like this?

Screenshoot of the page editor in Micro.blog. The content field consists of the full URL to the surprise me-plugin.

|
Embed
Progress spinner
pratik
pratik

@sod Yes, now it does. And now when I click the link in the menu, it's running in a loop without showing anything.

|
Embed
Progress spinner
manton
manton

@pratik @sod The page you created needs a different URL path than "surprise-me", otherwise it conflicts with the plug-in and creates that loop. Go into Pages and edit the path to something else and it should work.

|
Embed
Progress spinner
sod
sod

@pratik Ah, @manton beat me to it. Thanks! 🙏

|
Embed
Progress spinner
amit
amit

@pratik You can refer to this, add the last block to head.html.

|
Embed
Progress spinner
pratik
pratik

@amit Thanks. Made the change. Uninstalled the plugin, deleted the page, and then started over. Seems to have worked. I also created a plugin.json page in the custom theme @sod @manton

|
Embed
Progress spinner
sod
sod

@pratik Yay, success! 🎉

|
Embed
Progress spinner
pratik
pratik

@sod Err...not quite. Check my blog. I renamed it to "Feeling Lucky?" and cut-pasted the URL in the body as you said. It works but after flickering quite a bit.

|
Embed
Progress spinner
sod
sod

@pratik The flickering you see is the redirects in action. A click on the link will take the visitor first to /feeling-lucky/ followed by a redirected to /surprise-me/ and then end up on a random post. So you get a glimpse of the first two pages, making it look like a flicker.

We could mitigate that by linking directly to /surprise-me/ but, on your blog, that caused infinite redirects. I don't know why, though, as doing it that way works fine for me on my test blog. Do you have any theories, @manton? Shouldn't the infinite redirects happen there as well?

|
Embed
Progress spinner
pratik
pratik

@sod I had hoped to retain /surprise-me/ URL but change the page name and menu name to "Feeling Lucky?"

|
Embed
Progress spinner
sod
sod

@pratik Hmm. 🤔 I edited the path on my test page just now and got infinite redirection when I removed the last slash. That is, /surprise-me results in infinite redirects, but changing back to /surprise-me/ works as expected.

Can you edit the path for your page again and confirm the same behavior on your blog?

|
Embed
Progress spinner
pratik
pratik

@sod This worked for me too. As in the flicker is less pronounced. Name of my page is "Feeling Lucky?" and the permalink is /surprise-me/ as you suggested. I still have the full URL in the page body.

|
Embed
Progress spinner
jmreekes
jmreekes

@sod @warner I used a Fastmail Masked Email when configuring the plug-in.

|
Embed
Progress spinner
sod
sod

@pratik Thanks for testing. 😊 This is what we want, but it does feel a bit hacky. I'm worried it's not intended behavior. What do you say, @manton: is it safe to set up menu items in this way for pages bundled with plug-ins?

|
Embed
Progress spinner
manton
manton

@sod @pratik I think that's the best way to do it right now. I agree it feels fragile. Open to suggestions to improve it. Some themes skip the redirect by checking whether a menu is pointing to a different URL already, e.g. this line of code.

|
Embed
Progress spinner
jsonbecker
jsonbecker

@manton oh shit-- I just realized that the pages redirect is meant for how you setup custom menu items that go to pages that are not "pages" in the sense of Micro.blog... e.g. when I want to have Now in my menu go to /categories/now (which I handle with a term template) or have /bookshelfs exist (which I handle with content/bookshelf.md and custom layout), I should use the redirect to get it to show up in menus but be handled entirely by M.b. Is that right? If so, that'll simplify the custom theme I'm working on right now where I'm trying to handle custom menu overrides by checking .Site.Params.Menuhere.

|
Embed
Progress spinner
manton
manton

@jsonbecker I think "yes" but my brain is so full of different Hugo themes right now that I might not be totally following. 🙂 Worth a post on the Help Center?

|
Embed
Progress spinner
jsonbecker
jsonbecker

@manton I'll do a Help Center post once I'm close to thinking I'm "release" ready, reviewing what I did that I think is m.b specific both for feedback from you and others and to turn into a custom.micro.blog post and basis for docs as well.

|
Embed
Progress spinner
manton
manton

@jsonbecker 👍

|
Embed
Progress spinner
pratik
pratik

@sod and this is for @amit too for his stats plugin. Can you make it so long posts are defined by > 280 characters (or some other number) rather than those with a title? I think that's a better definition of a long post since on MB, micro-posts are a) < 280 chars, and ergo, b) without a title.

This is partly inspired by @amit who convinced me that not using a title on posts is actually better 😬

|
Embed
Progress spinner
warner
warner

@sod once you wait to get Settings to decide which to tick, it works well. Am going to implement in my Custom Home Page which I'm working on.

If you wanna augment in future, you could allow for filtering for recency, e.g. in the 6 months (aka Jean's threshold for 'not weird to comment on M.b')

Anyway, great work man! Look forward to your Micro Camp talk.

|
Embed
Progress spinner