A collection of components for displaying Git information in your prompt
What I want in my prompt are the time, whether or not Iām one of my usual users, whether or not Iām on one of my usual hosts, what directory Iām in, whether Iām root, whether the previous command errored, and lots of Git info.
Thatās what my zsh theme Hometown shows.
Try it out
Screenshots donāt do justice to all the configurability, or the dynamic content. To really get a feel for Hometown, install it⦠or play with the docsā interactive demo!
Which Git data points to include is configurable. The Git data points you do include can appear, disappear, and change colors based on the Git status.
You can configure certain users and hosts as hidden ā use that to only show user and/or host if they arenāt your usual.
How much of the directoryās path to show is configurable.
I donāt want to be stuck in the same thing always, and wanted it to be flexible enough for other users to enjoy, so every color and symbol is customizable; there are one-line, two-line, and three-line layout options; and thereās a spot for you insert any arbitrary prompt code youāre missing.
A lot of information, but the presentation is compact. Hereās a screenshot of Hometown with its default configuration:

That little thing packs in a lot of information:
hometown-prompt, which is in the olets directorymain is checked out (if HEAD were detached, the checked-out commitās SHA would be shown)main has an upstream (if it didnāt, the word ālocalā would be shown)
mainās the upstream is origin/main (if the upstream branch name were different, it would be show; if the upstreamās remote were not origin, it would be shown too)main is zero commits behind its upstream (if it were the ābehindā count would be shown)main is fifteen commits ahead of its upstreammain has not be set up for a triangular workflow (if it were the push remote would be shown)%)Not the look you want? Change it!
Hereās a screenshot of the same scenario but with Hometown configured to take up three lines, to use words instead of symbols, and to hide inactive status info rather than dimming it.

Hereās a screenshot Hometown configured to put everything on one line, and to hide rather than dim inactive status info and inactive behind/ahead.

Hereās on one more screenshot showing custom colors, and custom symbols

Thatās just a few of the possibilities: you can mix and match layout customization, color customization, and symbol/word customization. And itās only one scenario: what is shown changes with the Git status.
Another project to check out
Hometown is built on Git Prompt Kit, a library of feature-rich performant components for adding Git info to your own custom zsh theme. Read about it in Git Prompt Kit: Configurable, Fast Git Status Components For Custom Zsh Themes
Learn more in the Hometown docs.
If you like it, or just feel like saying ānice workā, let me know by starring the GitHub repo.
Git Prompt Kit: Configurable, Fast Git Status Components For Custom Zsh Themes
A collection of components for displaying Git information in your prompt
Algolia Search in VuePress Without Joining DocSearch
VuePress supports Algolia-based search, but expects you to use the DocSearch service. This guide shows how to use VuePressās DocSearch UI with standard Algolia.
Comparing Heroku, Netlify, Vercel, and GitHub Pages for Node.js Projects
Running popular web-based CD tools against each other