org-mode publish a website for a class I teach. I want to keep all my old notes on the hosting server. I want to keep using very predictable filenames (e.g. "hw1.pdf", "hw2.pdf", etc.) in my source directory, but I don't want users to be able to access certain files until I have linked to them on the website--needless to say, I don't publish a site-map. I also want old files to be removed from the public directory automatically so students cannot accidentally obtain an old version of a homework (in case I need to make a correction/adition to an assignment).
Here was my idea: I'll just make filenames in the published directory the hash of the corresponding file. Implementing this has been a bit difficult. Here is what I plan to do:
add-org-link-typefor pointing to pdfs in my source directory.
- Write a function
my/org-publish-attachmentwhich copies files to the appropriate directory with renaming and removes files not linked to on the site.
org-mode already hashes the files when running
org-publish-attachment (so it can check for updates to the file in the public directory), but I don't know where (or if) those hashes are stored.
- Am I right that
org-modehashes files when running
org-publish-attachment? If so, are these hashes stored somewhere I can access?
- How can I make the html links "dynamic"? If hashes are stored, I could just modify the publishing function for that
org-link-type. If they aren't, what are my options?
- What other variables and functions are relevant here?
PS. I'm relatively new to
org-mode, and there is a LOT out there; this has made it difficult to get started. If I've missed some obvious reference that solves my problem, please let me know. Thanks in advance for your help!