External link marker: new tab + icon on links leaving the blog
External links in post bodies now open in a new tab and show a box-with-arrow marker icon, so readers can tell at a glance which links leave the site. - blogex: new Blogex.ExternalLinks.rewrite/1 marks up anchors with http(s) hrefs at compile time with target="_blank", rel="noopener" and class="blogex-external" (idempotent, merges into existing class/rel values, leaves relative, mailto: and #anchor links alone) - blogex: Post.build/3 applies the rewrite, so every blog gets it - app: CSS in .blogex-post-body draws the marker via a mask so it inherits the link colour; empty ::after content stays invisible to screen readers - make test now also runs the blogex suite; it is currently red with 3 pre-existing blog_integration_test failures caused by the vacuous link validator (parked yak link-validator-never-sees-compiled-html-...)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Makefile for Blogex library
|
||||
|
||||
MISE_BIN ?= $(HOME)/.local/bin/mise
|
||||
MISE_EXEC = $(MISE_BIN) exec --
|
||||
|
||||
.PHONY: test format
|
||||
|
||||
test:
|
||||
$(MISE_EXEC) mix test
|
||||
|
||||
format:
|
||||
$(MISE_EXEC) mix format
|
||||
Reference in New Issue
Block a user