notes on redirection posts

by JIMz

1 min read

overview

some posts are written solely for redirections. this post explained how they work, how related files are organized and the procedures to create them.

naming convention

  • all redirection post title starts with " re: " ;
  • not a must in rendering, just for visual aids ;

mechanism

  • redirections are done by client browser, by adding a <META> element in the <HEAD> section of the page ;
  • this is done by using a layout with mainly that <META> element added, with the destination URL retrieved from frontmatter of that page ;
  • that component is named component-redirection.vto, put inside the folder [project root]/_includes;

usage

1. direct access

for those that will be used often ( e.g. jimz.cc/r/b ), the trailing link is meant to be as short as possible, in the following convention :

  • a single /r, stands for redirection, right after the domain ;
  • preferably another single letter as the final suffix, or a short keyword to minimize typings ;

examples :

  • jimz.cc/r/b : redirect to pastebin ;
  • jimz.cc/r/news : redirect to news ;

2. click-based with searching

in case the exact redirection link is not sure :

  1. goes to /archive ;
  2. search with keywords or related tag(s) ;

procedures in adding new redirection pages

details kept in github README.