Thursday, July 30, 2020

Text Fragments: Highlight text in a page you are linking to

Text fragments are a new feature that you can include in URLs to highlight specific text in the page you are linking to. You can read more about them here (or read the specification for them here), but essentially they let you link to a page and when the user arrives at the page they will see a text fragment highlighted. The spec gives you some flexibility for finding particular fragments of text based on some start and end searches, but the basics are that you add #:~:text=text%to%highlight at the end of your URL and everything just works (assuming your browser supports it).

Note that this is for highlighting a specific block of text, not for finding all occurrences in text. I can highlight a specific phrase. For example, this link highlights a sentence on a post about Docker and port forwarding).

Sunday, June 21, 2020

Installing Node and Angular CLI on Ubuntu

To create applications in Angular, the Angular Command Line Interface is required, which in turn requires Node to be installed. The installation is pretty straightforward, but following the stock instructions from Angular on Ubuntu gave me permission errors. So here is the process to install the required Node parts and the Angular CLI on Ubuntu to allow development of Angular apps.