Attachments improperly handling markdown files
aeckard87 opened this issue · comments
When putting .md files into either a page.files folder or a files folder, they do not properly list or populate .md files despite useing pattern=".*" or pattern=".md"
Some specs:
- Running on a mac high sierra OS
- git clone https://github.com/vjeantet/hugo-theme-docdock.git themes/docdock on 5-23 to insure I'm updated to most recent changes.
I'm not expecting the md attachment to be rendered - but just to be reachable for download
Hi @aeckard87,
This sounds like a some mac OS feature? I am not sure what is page.files folder, but in generla in the Hugo enviroment you put .md files inside the content
and build result is on the public
directories.
I am guessing this is not really the docdock issue unless Hugo builds with this theme is somewhat inconsistend with other Hugo themes.
For files folder, and if it is a folder with _index.html you can have a look at my proposed patch here : #162
And syntax should be : `{{%attachments title="foo" pattern=".*pdf"/%}}
Works like a charm here with patch + right syntax for pdf
I tested with some .md files (we are not using them for download). And everything is fine except you can't download them if they are .md
. Works fine if you rename them .txt
for example.
I guess hugo makes a special case of .md
files
PS : I'm on Mac OS 😄