As Google and other search engines are to eager to index links to files, as well users like to share links to PDF on your site I am thinking, is there any way to mask download in Hugo? maybe Shortcode?
There is clever option to add aliases to posts in markdown, and wonder if something like that can be achiever for pdf files.
/downloads/file1/ > /download/files/file1.pdf
What I want to achieve is that I can trace downloads. On a page that will be fired to download file will be minimal analytics included so I can see that this was downloaded.
Just an idea, not sure if currently is possible etc.
Also, users who want to share link, they will share to masked instead pure link to PDF file. That will give greater control whats on other side of the masked URL as well prevent from (show from where) draining transfer on your account.
I am pretty sure that is not what this is for. You should use rel=“noopener nofollow” for that. the noopener relation is to indicate to the browser, that it should start a new system process for the new page and should forget all data from the page where it came from (for instance history related info). You should use that for all external links to make sure those websites can’t use things like history anything lingering in the browser session being available to them.
So in general for local download links use nofollow, for external links use noopener. These things can be set also via headers. I am thinking about noindex nofollow for everything with the ending PDF for instance.
You can add multiple rel-items via space separated list.