Update code blocks in README (#3886)

This commit is contained in:
Olivier Dolbeau 2025-01-18 13:39:11 +01:00 committed by GitHub
parent 7e723eb7f5
commit 2620e836d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,22 +39,22 @@ You can download a **ready-built** package from the [Downloads page on https://g
You can create a new project with the latest **stable** Grav release with the following command: You can create a new project with the latest **stable** Grav release with the following command:
``` ```bash
$ composer create-project getgrav/grav ~/webroot/grav composer create-project getgrav/grav ~/webroot/grav
``` ```
### From GitHub ### From GitHub
1. Clone the Grav repository from [https://github.com/getgrav/grav]() to a folder in the webroot of your server, e.g. `~/webroot/grav`. Launch a **terminal** or **console** and navigate to the webroot folder: 1. Clone the Grav repository from [https://github.com/getgrav/grav]() to a folder in the webroot of your server, e.g. `~/webroot/grav`. Launch a **terminal** or **console** and navigate to the webroot folder:
``` ```bash
$ cd ~/webroot cd ~/webroot
$ git clone https://github.com/getgrav/grav.git git clone https://github.com/getgrav/grav.git
``` ```
2. Install the **plugin** and **theme dependencies** by using the [Grav CLI application](https://learn.getgrav.org/advanced/grav-cli) `bin/grav`: 2. Install the **plugin** and **theme dependencies** by using the [Grav CLI application](https://learn.getgrav.org/advanced/grav-cli) `bin/grav`:
``` ```bash
$ cd ~/webroot/grav cd ~/webroot/grav
$ bin/grav install bin/grav install
``` ```
Check out the [install procedures](https://learn.getgrav.org/basics/installation) for more information. Check out the [install procedures](https://learn.getgrav.org/basics/installation) for more information.
@ -63,28 +63,28 @@ Check out the [install procedures](https://learn.getgrav.org/basics/installation
You can download [plugins](https://getgrav.org/downloads/plugins) or [themes](https://getgrav.org/downloads/themes) manually from the appropriate tab on the [Downloads page on https://getgrav.org](https://getgrav.org/downloads), but the preferred solution is to use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`: You can download [plugins](https://getgrav.org/downloads/plugins) or [themes](https://getgrav.org/downloads/themes) manually from the appropriate tab on the [Downloads page on https://getgrav.org](https://getgrav.org/downloads), but the preferred solution is to use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`:
``` ```bash
$ bin/gpm index bin/gpm index
``` ```
This will display all the available plugins and then you can install one or more with: This will display all the available plugins and then you can install one or more with:
``` ```bash
$ bin/gpm install <plugin/theme> bin/gpm install <plugin/theme>
``` ```
# Updating # Updating
To update Grav you should use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`: To update Grav you should use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`:
``` ```bash
$ bin/gpm selfupgrade bin/gpm selfupgrade
``` ```
To update plugins and themes: To update plugins and themes:
``` ```bash
$ bin/gpm update bin/gpm update
``` ```
## Upgrading from older version ## Upgrading from older version