Use GFM for code

This commit is contained in:
Damian Mooyman 2017-07-10 14:54:17 +12:00
parent a4a1e00a73
commit c247a87dfa
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -24,30 +24,27 @@ These recipes allow for the following features:
Recipes can be introduced to any existing project (even if not created on a silverstripe base project) Recipes can be introduced to any existing project (even if not created on a silverstripe base project)
```shell
:::shell $ composer init
$ composer init $ composer require silverstripe/recipe-plugin ^0.1
$ composer require silverstripe/recipe-plugin ^0.1 $ composer require-recipe silverstripe/recipe-cms ^4.0@dev
$ composer require-recipe silverstripe/recipe-cms ^4.0@dev ````
Alternatively, instead of having to install the recipe-plugin manually, you can require the recipe Alternatively, instead of having to install the recipe-plugin manually, you can require the recipe
directly and inline this as a subsequent command. This is necessary to make the new commands available directly and inline this as a subsequent command. This is necessary to make the new commands available
to the command line. to the command line.
```shell
:::shell $ composer init
$ composer init $ composer require silverstripe/recipe-cms ^4.0@dev
$ composer require silverstripe/recipe-cms ^4.0@dev $ composer upgrade-recipe silverstripe/recipe-cms
$ composer upgrade-recipe silverstripe/recipe-cms ```
Alternatively you can create a new project based on an existing recipe Alternatively you can create a new project based on an existing recipe
```shell
:::shell $ composer create-project silverstripe/recipe-cms ./myssproject ^4.0@dev
$ composer create-project silverstripe/recipe-cms ./myssproject ^4.0@dev ```
## Upgrading recipes ## Upgrading recipes
@ -57,10 +54,9 @@ via `composer upgrade-recipe`.
When upgrading a version constraint is recommended, but not necessary. If omitted, then the existing installed When upgrading a version constraint is recommended, but not necessary. If omitted, then the existing installed
version will be detected, and a safe default chosen. version will be detected, and a safe default chosen.
```shell
:::shell $ composer upgrade-recipe silverstripe/recipe-cms ^1.0@dev
$ composer upgrade-recipe silverstripe/recipe-cms ^1.0@dev ```
## Installing or upgrading recipes without inlining them ## Installing or upgrading recipes without inlining them
@ -87,22 +83,23 @@ Recipe types should follow the following rules:
An example recipe: An example recipe:
:::json ```json
{ {
"name": "silverstripe/example-recipe, "name": "silverstripe/example-recipe,
"description": "Example silverstripe recipe", "description": "Example silverstripe recipe",
"type": "silverstripe-recipe", "type": "silverstripe-recipe",
"require": { "require": {
"silverstripe/recipe-plugin": "^0.1", "silverstripe/recipe-plugin": "^0.1",
"silverstripe/recipe-cms": "^4.0", "silverstripe/recipe-cms": "^4.0",
"silverstripe/blog": "^3.0@dev", "silverstripe/blog": "^3.0@dev",
"silverstripe/lumberjack": "^2.1@dev", "silverstripe/lumberjack": "^2.1@dev",
}, },
"extra": { "extra": {
"project-files": [ "project-files": [
"mysite/_config/blogsettings.yml" "mysite/_config/blogsettings.yml"
] ]
}, },
"prefer-stable": true, "prefer-stable": true,
"minimum-stability": "dev" "minimum-stability": "dev"
} }
```