![]() |
|
Best Website File/Folder Practises? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141) +---- Forum: Website Construction (https://hackforums.net/forumdisplay.php?fid=50) +---- Thread: Best Website File/Folder Practises? (/showthread.php?tid=5639410) |
Best Website File/Folder Practises? - VirtualFrost - Jun 4, 2017 I'm beginning to work on a project on my own and working with frameworks. Currently, I have Laravel and Bootstrap being used and the folders are obviously starting to build up. Are there any 'best' practises to file structure in websites to make it easy to navigate at all? While I'm at it, I'm only just starting with Laravel, can I put Laravel all into its own folder, or is it best being in the root directory of the website? * - Rushax - Jun 5, 2017 I build wordpress custom websites and I like their file structure. /wp-content/themes/theme-name main.css (style.css) /css /js You could always use vendor though for another if you have multiple types of frameworks being used. * - ryan⚜ - Jun 5, 2017 If it's something small, I usually only bother with a folder for images or whatever there's a lot of. If larger, typically looks like this: /index.html /contact.html /assets/css /assets/js /assets/fonts etc I put all my files aside from pages into the assets folder with a specific subfolder for the type of content. * - VirtualFrost - Jun 5, 2017 (Jun 5, 2017 12:21 PM)Rushax Wrote: I build wordpress custom websites and I like their file structure.I'm basically trying to figure out what kinds of folder names people have where they store certain things so it can be easily navigated if I ever get someone to work with. I have another project where they have a folder called 'dist' where they keep css/js files, unsure of why the name is dist though. (Jun 5, 2017 04:44 PM)ryan⚜ Wrote: If it's something small, I usually only bother with a folder for images or whatever there's a lot of. If larger, typically looks like this:Yeah for small projects I'm not too fussed, I'm trying to get into making bigger projects and basically want a good structure so if anyone was to join, they wouldn't be asking me why I don't have things grouped together properly or something. Right now I have a 'resources' folder which keeps all the css/js files that my site will have. Unsure what to do with Laravel at this time and where to put it but I might just look through some Laravel web project sources. * - Rushax - Jun 7, 2017 I think it ultimately depends on the project. For example if you were doing an asset management type of site, you wouldn't want to potentially keep all of your images under the /images directory. You'd probably want to categorize them in a particular order. Obviously for smaller sites this is absolutely fine and I agree with Ryan's structure. I've also seen 'dist' used and it means distribution and "and is the minified/concatenated version - actually used on production sites." Source: https://stackoverflow.com/questions/23730882/what-is-the-role-of-src-and-dist-folders I saw the use of things such as vendor as well if you had multiple frameworks used, which if structured correctly work really well. PHP Code |