I need to add
rel=nofollow for every link in my document but be able to change it using something like:
#+ATTR_HTML: :rel index,follow. Any ideas?
You can alter the behavior of the
org-html--anchor function so that no-follow is the default. A simple example:
(define-advice org-html--anchor (:around (orig-func id desc attributes info)) (funcall orig-func id desc (concat " rel=\"no-follow\"" attributes) info))
Note that this isn't fully complete; when you specify your own value for the rel attribute, you'll end up with both.