Administration of the SiteFarm SiteFactory.
These installation instructions are different than those on the website, as I’ve cloned the dev environment. Under normal operations, I think you’re only expected to clone the theme, so that’s added as a submodule to be consistent with that setup as well. (I’m not completely sure about that though, since the supplied bundle includes git repo info as well.)
You need to Install Docksal, to use this tooling. Docksal is a suite of tools that allow you to run drupal (also wordpress, node) in a containerized envirionment, and also manages the network setup to give you a nice experience with DNS etc. Unfortunately for our team we have a name collision with `fin`. I’ve renamed our fin tool `ucd-fin` for these tests.
git clone --recurse-submodules https://github.com/qjhart/libtest.git
cd ~/libtest
# Next untar the bundle that came from Sitefarm. There are files here,
# eg. /vender that are explicily ignored in Sitefarms' setup.
# The files include the database.
tar -xvf libtest_*.tar.gz --exclude=sitefarm-library-theme --exclude=.gitmodules --exclude=.gitignore
fin themer/init
I’m pretty sure trying to switch to postgres would be out of scope for the custom theming.
This is an abbreviated set of instructions. For full information on creating a subtheme, please visit the SiteFarm Local Installation training page
- Install Docksal
- Navigate to the root of the unpacked folder that you downloaded from Site
Factory. Be sure you’re in the root of that directory. If you run
ls -al
you should see files with names: .docksal, acquia-pipelines.yml, composer.lock, etc. - Run one command: `fin themer/init`
Fin maintains it’s own docker-compose system, and that’s how the website is
managed. You can access that the overall system with fin system status
One installed, your site is available at libtest.local. The fin init
script
actually updates your /etc/hosts
file with this path. The local 192. IP range
is also used by fin. I’m not sure if that’s taken from the system standard
docker installation. Lot’s of the fin system
commands affect the DNS settings.
Docksal uses ssh to harden some of it’s setup, but I don’t know what.
Following the instructions, I’m installing the iet themes, in the theme-basic
branch. However their instructions are a bit off. I beleive the better
location for the themes are in docroot/themes/
. Note that IET has named their
subtheme the same for both, so you can only install the basic-redesign or the
advanced-redesign, but not both
cd docroot/themes/
for i in advanced-redesign; do
echo $i
tar=$i.tar.gz
get=https://bitbucket.org/ietwebdev/sitefarm-theme-one-subtheme-starterkits/get
wget ${get}/${tar}
tar -xzf ${tar}
mv ietwebdev-sitefarm-theme-one-subtheme-* $i
rm $tar
done
New themes are available immediately. You can enable the via the admin page, or with the drush command theme:enable
fin exec drush pm-list --type=theme
The other method of creating a theme uses fin commands, I’m going to try this in
the theme-wizard
branch.
For whatever reason trying to add the –theme and –machine parameters kill this generate theme command
fin drupal sitefarm:generate:subtheme \
--theme-path=/themes \
--description='Library sitefarm theme.' \
--advanced=yes \
--ckeditor=yes \
--realtime-editing=yes \
--local-domain=libtest.local \
--regions=no --yes
The output of this includes this info:
You will need to compile the Sass and Js using Node.js by running "npm install" from within the new theme directory. Please see the README.md file for directions on how to do this. Generated or updated files Generation path: /var/www/docroot 1 - /themes/library/library/library.info.yml 2 - /themes/library/library/config/install/library.settings.yml 3 - /themes/library/library/config/schema/library.schema.yml 4 - /themes/library/library/library.libraries.yml 5 - /themes/library/library/js/scripts.js 6 - /themes/library/library/library.theme 7 - /themes/library/library/gulp-config.local.yml
I’m actually not sure yet how fin maintains the npm installations of their themes. This probably need not be done by the dev machine?