Just some nitpicking on dependencies:
colored
dependency), it is a good practice to point to a particular commit or tag using the rev
or tag
parameter instead of the branch
, as the branch’s HEAD
can change but a commit or tag can only point to only one specific state of the repository.Cargo.lock
. You can find the reasoning on why you should publish this file in Cargo’s FAQ
I will try it later though! I always complained that some prompt frameworks are using scripting languages like Python or Ruby that have slow spin-up rate, so this project seems interesting and a cool way to customize my ugly and boring prompt.
You kind of cover this but the Cargo.lock would capture the commit that the git dependency was at when the lock file was generated. So if the Cargo.lock was checked in everyone would build against the same commit.
I already implemented a similar tool some months ago rusty-prompt, maybe you can get some inspiration out of it.
My bashes (both the one that comes with Mac OS and the latest 5.0.7 from brew) seem to cache PS1 somehow, making pista break quite a lot.
➜ ~ /usr/local/bin/bash
bash-5.0$ PS1=$(pista)
~
$ cd git
~
$ PS1=$(pista)
~/git
$ cd nomad
~/git
$ PS1=$(pista)
~/g/nomad master ·
$
Try PS1='$(pista)'
. What’s happening is that pista is getting called once, when you set PS1, and then never again. The single quotes force PS1 to literally contain the expansion, which then gets expanded (and thereby call pista) each time the prompt is printed
i have plans to extend pista
into a library, so you could build your own prompts with pista
’s functions. maybe ill add a hostname function :^)
Never heard of it before, but looks promising. I will give it a try!
Is it possible to have webmentions as a comment seciton on a static website?
You can, but like anything dynamic, you’d either need to implement the comments section in client-side JavaScript or else have some way of triggering your site to rebuild and redeploy whenever a new Webmention is posted.
I’m doing that. My site is SSG that is built on my desktop and uploaded via good old rsync.
I use this webmentions SaaS to collect my mentions and a client-side JS to fetch and display them. My design skills are limited, so you can have it looking much better than I did. This post has a lot of mentions at the end. The JS used is not minified and is at the end of the post, near line 152 if you want to check.
Another cool service is bridgy which will send and collect mentions from silos and forward to your web site. I have it configured with my twitter and mastodon account. This way, I can have it send automatic tweets or toots when I post and also deliver replies and comments back to the original post.
Yes, it’s possible with a dynamic webmention endpoint that somehow saves webmentions. I have such a dynamic endpoint that creates a file in a git repo, commits and pushes it. That triggers a pipeline to rebuild my blog with Hugo and then a link is displayed below the page which received the webmention.
I have done it on my static website using webmention.io. I just pull on my personal computer regularly the updates from webmention.io and then I generates the comment section using some Hugo features. Shameless plug to my blog post explaining this
There’s https://webmention.io/ or you can have a self-hosted service somewhere.
I believe so. I know a couple of people who are running Hugo and have this. However, I would assume that that the comments are updated only when the site is regenerates, rather than on-the-fly like WP.
I use https://github.com/PlaidWeb/webmention.js to render my webmentions client-side so they’re always up to date, instead of needing to rebuild the site - I’ve written a bit more about it at https://www.jvt.me/posts/2019/06/30/client-side-webmentions/