Code Monkey home page Code Monkey logo

learn's Introduction

learn.userfrosting.com

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.

Getting started

This application uses the Grav CMS. This repository does not contain a full Grav installation - rather, it just contains the contents of Grav's user directory, which is where all of our custom content, themes, and assets live. This was done as per the recommendation on Grav's blog, to make it easier to deploy changes to the live server.

In terms of actually getting it running, you can opt for a local installation, or utilise a containerised VPS solution like Docker.

Local installation

Step 1 - Install Grav

To install this website on your computer, first install grav core in a project folder called userfrosting-learn under your webserver's document root folder. Then, find the user folder inside of your project folder. Delete the contents of the user folder and clone this repository directly into the user folder.

git clone https://github.com/getgrav/grav.git userfrosting-learn
cd userfrosting-learn
rm -r user
git clone https://github.com/userfrosting/learn.git user

When you're done it should look like this:

htdocs/
└── userfrosting-learn/
   ├── assets/
   ├── ...
   ├── user/
       ├── .git
       ├── accounts/
       ├── assets/
       ├── config/
       └── ...
   └── ...

To finish the install off, just run:

bin/grav install

Step 2

Grav needs your webserver to be able to write to certain directories. In OSX with XAMPP installed, this won't work by default. To deal with this:

Add default webserver user daemon to OSX's staff group (which already has the necessary permissions for writing to files/directories):

sudo dseditgroup -o edit -a daemon -t user staff

Step 3

Install plugins and base theme. The base theme is learn2. The plugins each have empty directories in the plugins directory.

bin/gpm install -y error problems breadcrumbs anchors highlight simplesearch learn2

Docker

Most docker images (like the one used here) automate the installation of Grav. So for the most part, getting started with Docker is less tedious. Instead the tediousness is at the end due to a bug in Grav.

Step 1

We start off by cloning this repo.

git clone https://github.com/userfrosting/learn.git userfrosting-learn

Step 2

Then we start the image, with the appropraite configuration.

docker pull ahumaro/grav-php-nginx
docker run -d -i -p 80:80 -p 2222:22 -v "$(pwd):/usr/share/nginx/html/user/" --name ufLearn ahumaro/grav-php-nginx

Step 3

Install plugins and base theme. The base theme is learn2. The plugins each have empty directories in the plugins directory.

docker exec -it ufLearn bash
chmod +x bin/gpm # This is only needed if permissions are acting up
bin/gpm install -y error problems breadcrumbs anchors highlight simplesearch learn2

NOTE: Grav uses rename when moving plugins to their final destination, which means this is where everything falls apart. The issue is that rename doesn't work to well when crossing a drive boundary (even for emulated drives), throwing a "Invalid cross-device link" error when attempted. Until a fix is out, you'll need to install the theme and plugins manually under docker.

Credits

Favicons were generated with https://realfavicongenerator.net/

learn's People

Contributors

rhukster avatar flaviocopes avatar alexweissman avatar w00fz avatar mahagr avatar lcharette avatar sommerregen avatar silic0ns0ldier avatar hwmaier avatar rindeal avatar vivalldi avatar toovy avatar eschmar avatar nazwa avatar robwent avatar mufac avatar ryanmpierson avatar bovisp avatar hugoaf avatar gertt avatar frankfont avatar jeromegamez avatar tcsizmadia avatar ekwav avatar donliborio avatar dimayakovlev avatar leanpanda avatar nunull avatar akoebbe avatar aranaur avatar

Watchers

James Cloos avatar Carlos Rodríguez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.