Hello!
I have never built a WP site with Sage and I am contracted to build a page on a client’s site that has been built with Sage. I tried building a page template in the way I do for other WordPress sites, using a template-[name].php file in a folder I created for this project in the Sage theme’s root folder, and then selecting that template as the template for the page in the WP UI, and it did not work.
After doing some reading on Sage, I see that it requires a dev environment setup including the installation of various packages to use everything the theme/system provides and build the site to make it ready for production. I am hoping to avoid bothering with that and proceed with the project without needing to learn/use that in the interest of staying within the allotted time for this contract.
Some questions:
- I moved the template and associated styles into subfolder I created in the “resources/views” folder (based on this article) and it seems to be working without breaking the site. My understanding is that there is a “build” process for Sage. Will the existence of these files break the build process? I ask even though it’s working because I saw another post on this forum where the answer to a similar question was that they need to setup the Sage dev environment and work within that. ( Sage 9, beginner’s questions - sage - Roots Discourse )
- I am not using Laravel or Blade templates as part of this project. Is that a problem?
- If I wanted to test things myself, how would I find the version of Sage being used and the other parts of the Sage setup? For the Sage version, is the latest entry in CHANGELOG.md the version being used? For the parts of the Sage setup, is everything listed in package.json required for the testing/build? It looks like this site is using Vite instead of Bud and is also using Alpine. I couldn’t find any official documentation on using Vite with Sage; am I missing something or is this something custom?
Any guidance is appreciated.