backdev log 1
dev log — fixing external links + jekyll build pipeline
i finally got external links behaving correctly across the entire site, including the menu.
problem i had
some links (like spotify) opened in a new tab, while others (instagram, vsco) stubbornly opened in the same tab even though target="_blank" existed in the generated html. this turned out to be a mix of theme behavior, build configuration, and plugin wiring issues.
what i changed
- updated
_includes/menu_item.htmlto explicitly inject:target="_blank"rel="noopener noreferrer"for external urls using liquid logic
- added
jekyll-target-blankto thegemfileso bundler installs the plugin - added
jekyll-target-blankto thepluginssection in_config.ymlso jekyll actually loads it - fixed the github actions workflow (
jekyll.yml) to:- use ruby 3.1 (compatibility matters)
- build with
bundle exec jekyll build - rely on bundler caching for consistent dependencies
- deploy properly via github pages actions
why it works now
everything in the pipeline finally agrees:
- bundler installs the right gems
- jekyll loads the plugin
- liquid renders the correct attributes at template time
- github actions builds the site using the same rules as local
instead of relying on hacks or fragile post-processing, the behavior is now enforced at the source.
feel free to check out the repo here: code
n30