jas
August 18, 2021, 3:36pm
1
Hello,
I’d like a pinned post to link straight to a separate link I have.
In short, I’d like to have a pinned ‘Journal’ page that links to my micro.blog .
Is there a way that I can create a post that has a title only, which I use as a hyperlink?
Or can I only hyperlink to text in the post?
jas
August 18, 2021, 3:40pm
2
Update: here’s what my post currently looks like: journal — the diary of an indie writer, by Jas
Ideally, I’d like the ‘journal’ button (i.e. the header text itself) to link directly to https://jasraj.micro.blog
dino
August 18, 2021, 5:38pm
3
Yes, first you need to create a placeholder post. All it needs is just a title. Then after you publish the placeholder post, you can then pin it. Then you can use JavaScript to change the url for the pinned post. Check out the thread below for the script to do it.
You can do it with Javascript. This one is for the link to get a random post on my site.
/* Javascript for Random post Glitch app */
var a = document.querySelector('a[href="https://journal.dinobansigan.com/random"]');
if (a) {
a.setAttribute('href', 'https://random-journal-post.glitch.me/get');
a.setAttribute('title', 'Get a random post');
}
var b = document.querySelector('a[href="/dino/random"]');
if (b) {
b.setAttribute('href', 'https://random-journal-post.glitch.me/get');
b.setAttrib…
1 Like
jas
August 19, 2021, 5:37pm
4
thanks again, Dino. Will give it a shot when I’ve set up my custom domain.
Also, I came across your handy blog archive generator - looks cool!
dino
August 19, 2021, 8:05pm
5
Thanks. Unfortunately, the archive generator won’t work for blogs with more than 10 posts. Still working on updating it.
1 Like
jas
August 20, 2021, 3:41pm
6
No worries. It’s a great tool, it looks just like the archive that’s auto-generated on my microblog, which I like.
dino
August 20, 2021, 5:15pm
7
That is where I took my inspiration from, the built-in micro.blog Archive page.
1 Like
jas
December 21, 2021, 9:29pm
8
So I’m finally getting around to create this pinned-post hyperlink… but when I create the post, and then click ‘i’ to change the publish time to one in the past (so it doesn’t get sent to my email subscribers), the following error message pops up:
(cc @matt )