-
Notifications
You must be signed in to change notification settings - Fork 921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - Attachments shortcode #636
base: main
Are you sure you want to change the base?
Conversation
Looks really cool. I will use it on my site as soon as it is released and provide feedback if I found something. The feature will improve my site quite a bit. Thanks |
I'd completely forgotten that this PR had WIP flag. I'll check the code once more and will release the feature as as I find some minutes. |
Hello I started to test your cool attachments' extension on my local site. I found one problem and have one improvement suggestion. Problem I have the following configuration
Meaning I have only one language "English" and do not have subdirectories for languages. The attachments.html path generation code generates the wrong path. content/content/en/ideas/learnings/trainings-files/swat-literature/01-DevDotStar_Reeves_CodeAsDesign (optional).pdf instead of content/content/ideas/learnings/trainings-files/swat-literature/01-DevDotStar_Reeves_CodeAsDesign (optional).pdf The correct path should not contain the language part. If I remove the $.Page.File.Lang it works correctly. Improvement My attachments are mainly pdf files. I would prefer to store them in the static folder of hugo instead of the content folder. This is the preferred approach if I read the Hugo documentation correctly. Would it be possible to add the option to store attachments in static? Or could the path be the composition with content and static roots? Once I made the needed changes, the code is working well. Thanks. => I use the current approach with all files in content so that the pages are correctly generated. Works fine and is already published on my site (e.g. https://tangly-team.bitbucket.io/ideas/learnings/lectures/). The extension is stable. Thanks for the work. |
Is it time to release this change request? On my site it is stable for months now. |
Added a shortcode to list attachments list based on page resources or a specific folder.
See more info in the example page:
https://60f7d1bf27ca190008cd35fb--sad-volhard-b41b3b.netlify.app/docs/dev-test-content/attachments/
Any comments or ideas for improvements?