Directory
digitalinferno opened this issue · 5 comments
The content
directory is for pages and blog posts, assets
for images or other files, if I want to write a plugin that needs to store an output file (like a guestbook or message system or so on ), what is the correct directory for this task? For now I assume assets\myplugin
If the filenames are guessable, I wouldn't use an assets Subfolder. I did that mistake with Calendar files in yml format.
Like the pico-comments Plugin you better use a separate folder with the according rights.
As noted by @dkyme, this depends on what you want to store there. The assets
directory is commonly used as public directory with direct file downloads enabled. The content
directory should be used for Markdown pages only; unless you can store your data in Markdown and let Pico interpret these files as pages, I wouldn't use it. So if neither assets
nor content
fits your needs, you might want to create your own directory, like the mentioned PicoComments
plugin does. Just remember creating a .htaccess
file (or similar) to implement some access restriction, as also noted by @dkyme.
Ok, thanks. What is the best way to deal with the images contained in a blog post? I put everything in assets
What is the best way to deal with the images contained in a blog post? I put everything in
assets
Yes, correct.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! 👍