https://learn.userfrosting.com
This is the repository for the documentation for UserFrosting 4. It is built with the flat-file CMS Grav, using their RTFM skeleton.
This site is built using Grav CMS, which like UserFrosting v4 has combined framework and project skeleton code. To permit easier content management, this repository only includes Grav's user/
directory, which is where all of our custom content, themes, and assets live. See Grav Development with GitHub - Part 2 for more on this approach.
This branch contains the site with documentation for every versions of UserFrosting, as available at https://learn.userfrosting.com. This particular setup is made possible using Grav Multisite Setup feature and each branch of this repo setup as git submodules in the sites/
directory.
Submodules in this branch are kept automatically to the latest version using GitHub Actions Workflow.
This unique structure does complicate local hosting somewhat complicated, but other installation methods are also available:
This guide does not cover setting up the webserver and assumes your host is already setup.
-
Install Grav and replace the
user
directory with this repositorygit clone https://github.com/getgrav/grav.git userfrosting-learn cd userfrosting-learn rm -r user git clone -b website https://github.com/userfrosting/learn.git user
-
Setup Grav multisite
cp user/setup.php setup.php cd user/ git submodule update --init cd ../
-
Install Grav
bin/grav install
-
Clone repo
git clone -b website https://github.com/userfrosting/learn.git userfrosting-learn cd userfrosting-learn
-
Prepare multisite / submodules
git submodule update --init
-
Start Lando
lando start
To stop the container:
lando stop
-
Clone repo
git clone -b website https://github.com/userfrosting/learn.git userfrosting-learn cd userfrosting-learn
-
Setup Grav multisite
git submodule update --init
-
Build Grav container
docker build -t learn:latest .
-
Start Grav container
docker run -d --rm --name=learn -p 8080:80 -v "$(pwd):/var/www/grav/user" learn:latest
It will take a couples of second for the site to be up and running while the base Grav installation is done. Once this is complete, you can access the documentation at http://localhost:8080/.
To stop the container:
docker stop learn
To access Grav command line utility or gpm, you can use :
docker exec -it learn bash
chmod +x bin/gpm # This is only needed if permissions are acting up
bin/grav install
Move to Grav's user/
directory, and add the desired branch as a new git submodule. Replace {brancheName}
with the name of the branch you want to include.
git submodule add -b {brancheName} https://github.com/userfrosting/learn.git sites/{brancheName}
Next edit config/versions.yaml
from this branch to add your new branch/version to the dropdown list.
To update pages from the legacy version to their latest version, run from Grav's user/
directory :
git submodule update --remote --merge
Favicons were generated with https://realfavicongenerator.net/