|
1 |
| -#  Grav |
| 1 | +# Drupal Commerce Documentation |
2 | 2 |
|
3 |
| -[](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad) [](https://chat.getgrav.org) [](https://travis-ci.org/getgrav/grav) [](#backers) [](#sponsors) |
| 3 | +**Contents:** |
| 4 | +- [How to contribute to this documentation](#how-to-contribute-to-this-documentation) |
| 5 | + - [Before your first contribution](#before-your-first-contribution) |
| 6 | + - [Fast online contribution](#fast-online-contribution) |
| 7 | + - [Local setup](#local-setup) |
4 | 8 |
|
5 |
| -Grav is a **Fast**, **Simple**, and **Flexible**, file-based Web-platform. There is **Zero** installation required. Just extract the ZIP archive, and you are already up and running. It follows similar principles to other flat-file CMS platforms, but has a different design philosophy than most. Grav comes with a powerful **Package Management System** to allow for simple installation and upgrading of plugins and themes, as well as simple updating of Grav itself. |
| 9 | +## How to contribute to this documentation |
6 | 10 |
|
7 |
| -The underlying architecture of Grav is designed to use well-established and _best-in-class_ technologies to ensure that Grav is simple to use and easy to extend. Some of these key technologies include: |
| 11 | +### Before your first contribution |
8 | 12 |
|
9 |
| -* [Twig Templating](http://twig.sensiolabs.org/): for powerful control of the user interface |
10 |
| -* [Markdown](http://en.wikipedia.org/wiki/Markdown): for easy content creation |
11 |
| -* [YAML](http://yaml.org): for simple configuration |
12 |
| -* [Parsedown](http://parsedown.org/): for fast Markdown and Markdown Extra support |
13 |
| -* [Doctrine Cache](http://doctrine-orm.readthedocs.io/projects/doctrine-orm/en/latest/reference/caching.html): layer for performance |
14 |
| -* [Pimple Dependency Injection Container](http://pimple.sensiolabs.org/): for extensibility and maintainability |
15 |
| -* [Symfony Event Dispatcher](http://symfony.com/doc/current/components/event_dispatcher/introduction.html): for plugin event handling |
16 |
| -* [Symfony Console](http://symfony.com/doc/current/components/console/introduction.html): for CLI interface |
17 |
| -* [Gregwar Image Library](https://github.com/Gregwar/Image): for dynamic image manipulation |
| 13 | +**Before contributing**, you should consider the following: |
| 14 | +- The documentation is written using [reStructuredText](http://docutils.sourceforge.net/rst.html) markup language. If you are not familiar with this format, read [this article](https://symfony.com/doc/current/contributing/documentation/format.html) for a quick overview of its basic features. |
| 15 | +- The documentation is hosted on [GitHub](https://github.com). You'll need a free GitHub user account to contribute to the documentation. |
| 16 | +- The documentation is published under a [Creative Commons BY-SA 4.0 License](https://github.com/drupalcommerce/commerce-docs/blob/master/LICENSE) and all your contributions will implicitly adhere to that license. |
18 | 17 |
|
19 |
| -# Requirements |
| 18 | +### Fast online contribution |
20 | 19 |
|
21 |
| -- PHP 5.5.9 or higher. Check the [required modules list](https://learn.getgrav.org/basics/requirements#php-requirements) |
22 |
| -- Check the [Apache](https://learn.getgrav.org/basics/requirements#apache-requirements) or [IIS](https://learn.getgrav.org/basics/requirements#iis-requirements) requirements |
| 20 | +If you're making a relatively small change - like fixing a typo or rewording something - the easiest way to contribute is directly on GitHub! You can do this while you're reading this documentation. |
23 | 21 |
|
24 |
| -# QuickStart |
| 22 | +1. Click on the **Edit on GitHub** button on the upper right corner and you'll be redirected to GitHub:  |
| 23 | +2. Click the **edit icon** to edit the documentation:  |
| 24 | +3. You will be asked to fork the repo, click **Fork this repository and propose changes**:  |
| 25 | +4. Edit the contents, describe your changes and click on the **Propose file change** button:  |
| 26 | +5. GitHub will now create a branch and a commit for your changes (forking the repository first if this is your first contribution) and it will also display a preview of your changes: If everything is correct, click on the **Create pull request** button. |
| 27 | +6. GitHub will display a new page where you can do some last-minute changes to your pull request before creating it. For simple contributions, you can safely ignore these options and just click on the **Create pull request** button again. |
25 | 28 |
|
26 |
| -These are the options to get Grav: |
| 29 | +**Congratulations!** You just created a pull request to the official Drupal Commerce documentation! The community will now review your pull request and (possibly) suggest tweaks. |
27 | 30 |
|
28 |
| -### Downloading a Grav Package |
| 31 | +But if you want to contribute heavily, we recommend you doing a local setup of the documentation. |
29 | 32 |
|
30 |
| -You can download a **ready-built** package from the [Downloads page on https://getgrav.org](https://getgrav.org/downloads) |
| 33 | +### Local setup |
| 34 | +1. Install [Python](https://www.python.org/downloads/). |
| 35 | +2. If `pip` is not installed by default, install it from [here](https://pip.pypa.io/en/stable/installing/). |
| 36 | +3. Fork this [documentation repository](https://github.com/drupalcommerce/commerce-docs). |
| 37 | +4. Clone the forked repository. |
| 38 | +5. `cd <forked-repository>`. |
| 39 | +6. Execute `pip install -r requirements.txt`, you might need to execute this command with `sudo`. |
| 40 | +7. In the terminal generate user for admin panel `bin/plugin login newuser` |
| 41 | +8. Add credentials  |
| 42 | +9. Login [localhost:8000/admin](localhost:8000/admin) |
31 | 43 |
|
32 |
| -### With Composer |
| 44 | +### Edit using Visual Code Studio |
| 45 | +You can download Visual Code Studio and add the [reStructured Text](https://marketplace.visualstudio.com/items?itemName=lextudio.restructuredtext) plugin to have an editor with built in previews available. |
33 | 46 |
|
34 |
| -You can create a new project with the latest **stable** Grav release with the following command: |
| 47 | +### Edit and review manually |
| 48 | +1. Execute `./build.sh`, this will generate documentation HTML inside `_build/html`. |
| 49 | +2. Now you can view the documentation locally, execute `php -S localhost:8000 -t _build/html` , and visit [http://localhost:8000/](http://localhost:8000/) from your browser. |
35 | 50 |
|
36 |
| -``` |
37 |
| -$ composer create-project getgrav/grav ~/webroot/grav |
38 |
| -``` |
39 |
| - |
40 |
| -### From GitHub |
41 |
| - |
42 |
| -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: |
43 |
| - ``` |
44 |
| - $ cd ~/webroot |
45 |
| - $ git clone https://github.com/getgrav/grav.git |
46 |
| - ``` |
47 |
| - |
48 |
| -2. Install the **plugin** and **theme dependencies** by using the [Grav CLI application](https://learn.getgrav.org/advanced/grav-cli) `bin/grav`: |
49 |
| - ``` |
50 |
| - $ cd ~/webroot/grav |
51 |
| - $ bin/grav install |
52 |
| - ``` |
53 |
| - |
54 |
| -Check out the [install procedures](https://learn.getgrav.org/basics/installation) for more information. |
55 |
| - |
56 |
| -# Adding Functionality |
57 |
| - |
58 |
| -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`: |
59 |
| - |
60 |
| -``` |
61 |
| -$ bin/gpm index |
62 |
| -``` |
63 |
| - |
64 |
| -This will display all the available plugins and then you can install one or more with: |
65 |
| - |
66 |
| -``` |
67 |
| -$ bin/gpm install <plugin/theme> |
68 |
| -``` |
69 |
| - |
70 |
| -# Updating |
71 |
| - |
72 |
| -To update Grav you should use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`: |
73 |
| - |
74 |
| -``` |
75 |
| -$ bin/gpm selfupgrade |
76 |
| -``` |
77 |
| - |
78 |
| -To update plugins and themes: |
79 |
| - |
80 |
| -``` |
81 |
| -$ bin/gpm update |
82 |
| -``` |
83 |
| - |
84 |
| - |
85 |
| -# Contributing |
86 |
| -We appreciate any contribution to Grav, whether it is related to bugs, grammar, or simply a suggestion or improvement! Please refer to the [Contributing guide](CONTRIBUTING.md) for more guidance on this topic. |
87 |
| - |
88 |
| -## Security issues |
89 |
| -If you discover a possible security issue related to Grav or one of its plugins, please email the core team at [email protected] and we'll address it as soon as possible. |
90 |
| - |
91 |
| -# Getting Started |
92 |
| - |
93 |
| -* [What is Grav?](https://learn.getgrav.org/basics/what-is-grav) |
94 |
| -* [Install](https://learn.getgrav.org/basics/installation) Grav in few seconds |
95 |
| -* Understand the [Configuration](https://learn.getgrav.org/basics/grav-configuration) |
96 |
| -* Take a peek at our available free [Skeletons](https://getgrav.org/downloads/skeletons) |
97 |
| -* If you have questions, jump on our [Slack Room](https://getgrav.org/slack)! |
98 |
| -* Have fun! |
99 |
| - |
100 |
| -# Exploring More |
101 |
| - |
102 |
| -* Have a look at our [Basic Tutorial](https://learn.getgrav.org/basics/basic-tutorial) |
103 |
| -* Dive into more [advanced](https://learn.getgrav.org/advanced) functions |
104 |
| -* Learn about the [Grav CLI](https://learn.getgrav.org/cli-console/grav-cli) |
105 |
| -* Review examples in the [Grav Cookbook](https://learn.getgrav.org/cookbook) |
106 |
| - |
107 |
| -# Backers |
108 |
| -Support Grav with a monthly donation to help us continue development. [[Become a backer](https://opencollective.com/grav#backer)] |
109 |
| - |
110 |
| -<a href="https://opencollective.com/grav/backer/0/website" target="_blank"><img src="https://opencollective.com/grav/backer/0/avatar.svg"></a> |
111 |
| -<a href="https://opencollective.com/grav/backer/1/website" target="_blank"><img src="https://opencollective.com/grav/backer/1/avatar.svg"></a> |
112 |
| -<a href="https://opencollective.com/grav/backer/2/website" target="_blank"><img src="https://opencollective.com/grav/backer/2/avatar.svg"></a> |
113 |
| -<a href="https://opencollective.com/grav/backer/3/website" target="_blank"><img src="https://opencollective.com/grav/backer/3/avatar.svg"></a> |
114 |
| -<a href="https://opencollective.com/grav/backer/4/website" target="_blank"><img src="https://opencollective.com/grav/backer/4/avatar.svg"></a> |
115 |
| -<a href="https://opencollective.com/grav/backer/5/website" target="_blank"><img src="https://opencollective.com/grav/backer/5/avatar.svg"></a> |
116 |
| -<a href="https://opencollective.com/grav/backer/6/website" target="_blank"><img src="https://opencollective.com/grav/backer/6/avatar.svg"></a> |
117 |
| -<a href="https://opencollective.com/grav/backer/7/website" target="_blank"><img src="https://opencollective.com/grav/backer/7/avatar.svg"></a> |
118 |
| -<a href="https://opencollective.com/grav/backer/8/website" target="_blank"><img src="https://opencollective.com/grav/backer/8/avatar.svg"></a> |
119 |
| -<a href="https://opencollective.com/grav/backer/9/website" target="_blank"><img src="https://opencollective.com/grav/backer/9/avatar.svg"></a> |
120 |
| -<a href="https://opencollective.com/grav/backer/10/website" target="_blank"><img src="https://opencollective.com/grav/backer/10/avatar.svg"></a> |
121 |
| -<a href="https://opencollective.com/grav/backer/11/website" target="_blank"><img src="https://opencollective.com/grav/backer/11/avatar.svg"></a> |
122 |
| -<a href="https://opencollective.com/grav/backer/12/website" target="_blank"><img src="https://opencollective.com/grav/backer/12/avatar.svg"></a> |
123 |
| -<a href="https://opencollective.com/grav/backer/13/website" target="_blank"><img src="https://opencollective.com/grav/backer/13/avatar.svg"></a> |
124 |
| -<a href="https://opencollective.com/grav/backer/14/website" target="_blank"><img src="https://opencollective.com/grav/backer/14/avatar.svg"></a> |
125 |
| -<a href="https://opencollective.com/grav/backer/15/website" target="_blank"><img src="https://opencollective.com/grav/backer/15/avatar.svg"></a> |
126 |
| -<a href="https://opencollective.com/grav/backer/16/website" target="_blank"><img src="https://opencollective.com/grav/backer/16/avatar.svg"></a> |
127 |
| -<a href="https://opencollective.com/grav/backer/17/website" target="_blank"><img src="https://opencollective.com/grav/backer/17/avatar.svg"></a> |
128 |
| -<a href="https://opencollective.com/grav/backer/18/website" target="_blank"><img src="https://opencollective.com/grav/backer/18/avatar.svg"></a> |
129 |
| -<a href="https://opencollective.com/grav/backer/19/website" target="_blank"><img src="https://opencollective.com/grav/backer/19/avatar.svg"></a> |
130 |
| -<a href="https://opencollective.com/grav/backer/20/website" target="_blank"><img src="https://opencollective.com/grav/backer/20/avatar.svg"></a> |
131 |
| -<a href="https://opencollective.com/grav/backer/21/website" target="_blank"><img src="https://opencollective.com/grav/backer/21/avatar.svg"></a> |
132 |
| -<a href="https://opencollective.com/grav/backer/22/website" target="_blank"><img src="https://opencollective.com/grav/backer/22/avatar.svg"></a> |
133 |
| -<a href="https://opencollective.com/grav/backer/23/website" target="_blank"><img src="https://opencollective.com/grav/backer/23/avatar.svg"></a> |
134 |
| -<a href="https://opencollective.com/grav/backer/24/website" target="_blank"><img src="https://opencollective.com/grav/backer/24/avatar.svg"></a> |
135 |
| -<a href="https://opencollective.com/grav/backer/25/website" target="_blank"><img src="https://opencollective.com/grav/backer/25/avatar.svg"></a> |
136 |
| -<a href="https://opencollective.com/grav/backer/26/website" target="_blank"><img src="https://opencollective.com/grav/backer/26/avatar.svg"></a> |
137 |
| -<a href="https://opencollective.com/grav/backer/27/website" target="_blank"><img src="https://opencollective.com/grav/backer/27/avatar.svg"></a> |
138 |
| -<a href="https://opencollective.com/grav/backer/28/website" target="_blank"><img src="https://opencollective.com/grav/backer/28/avatar.svg"></a> |
139 |
| -<a href="https://opencollective.com/grav/backer/29/website" target="_blank"><img src="https://opencollective.com/grav/backer/29/avatar.svg"></a> |
140 |
| - |
141 |
| - |
142 |
| -# Sponsors |
143 |
| -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/grav#sponsor)] |
144 |
| - |
145 |
| -<a href="https://opencollective.com/grav/sponsor/0/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/0/avatar.svg"></a> |
146 |
| -<a href="https://opencollective.com/grav/sponsor/1/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/1/avatar.svg"></a> |
147 |
| -<a href="https://opencollective.com/grav/sponsor/2/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/2/avatar.svg"></a> |
148 |
| -<a href="https://opencollective.com/grav/sponsor/3/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/3/avatar.svg"></a> |
149 |
| -<a href="https://opencollective.com/grav/sponsor/4/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/4/avatar.svg"></a> |
150 |
| -<a href="https://opencollective.com/grav/sponsor/5/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/5/avatar.svg"></a> |
151 |
| -<a href="https://opencollective.com/grav/sponsor/6/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/6/avatar.svg"></a> |
152 |
| -<a href="https://opencollective.com/grav/sponsor/7/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/7/avatar.svg"></a> |
153 |
| -<a href="https://opencollective.com/grav/sponsor/8/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/8/avatar.svg"></a> |
154 |
| -<a href="https://opencollective.com/grav/sponsor/9/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/9/avatar.svg"></a> |
155 |
| -<a href="https://opencollective.com/grav/sponsor/10/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/10/avatar.svg"></a> |
156 |
| -<a href="https://opencollective.com/grav/sponsor/11/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/11/avatar.svg"></a> |
157 |
| -<a href="https://opencollective.com/grav/sponsor/12/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/12/avatar.svg"></a> |
158 |
| -<a href="https://opencollective.com/grav/sponsor/13/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/13/avatar.svg"></a> |
159 |
| -<a href="https://opencollective.com/grav/sponsor/14/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/14/avatar.svg"></a> |
160 |
| -<a href="https://opencollective.com/grav/sponsor/15/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/15/avatar.svg"></a> |
161 |
| -<a href="https://opencollective.com/grav/sponsor/16/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/16/avatar.svg"></a> |
162 |
| -<a href="https://opencollective.com/grav/sponsor/17/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/17/avatar.svg"></a> |
163 |
| -<a href="https://opencollective.com/grav/sponsor/18/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/18/avatar.svg"></a> |
164 |
| -<a href="https://opencollective.com/grav/sponsor/19/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/19/avatar.svg"></a> |
165 |
| -<a href="https://opencollective.com/grav/sponsor/20/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/20/avatar.svg"></a> |
166 |
| -<a href="https://opencollective.com/grav/sponsor/21/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/21/avatar.svg"></a> |
167 |
| -<a href="https://opencollective.com/grav/sponsor/22/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/22/avatar.svg"></a> |
168 |
| -<a href="https://opencollective.com/grav/sponsor/23/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/23/avatar.svg"></a> |
169 |
| -<a href="https://opencollective.com/grav/sponsor/24/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/24/avatar.svg"></a> |
170 |
| -<a href="https://opencollective.com/grav/sponsor/25/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/25/avatar.svg"></a> |
171 |
| -<a href="https://opencollective.com/grav/sponsor/26/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/26/avatar.svg"></a> |
172 |
| -<a href="https://opencollective.com/grav/sponsor/27/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/27/avatar.svg"></a> |
173 |
| -<a href="https://opencollective.com/grav/sponsor/28/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/28/avatar.svg"></a> |
174 |
| -<a href="https://opencollective.com/grav/sponsor/29/website" target="_blank"><img src="https://opencollective.com/grav/sponsor/29/avatar.svg"></a> |
175 |
| - |
176 |
| -# License |
177 |
| - |
178 |
| -See [LICENSE](LICENSE.txt) |
179 |
| - |
180 |
| - |
181 |
| -[gitflow-model]: http://nvie.com/posts/a-successful-git-branching-model/ |
182 |
| -[gitflow-extensions]: https://github.com/nvie/gitflow |
183 |
| - |
184 |
| -# Running Tests |
185 |
| - |
186 |
| -First install the dev dependencies by running `composer update` from the Grav root. |
187 |
| -Then `composer test` will run the Unit Tests, which should be always executed successfully on any site. |
188 |
| -Windows users should use the `composer test-windows` command. |
189 |
| -You can also run a single unit test file, e.g. `composer test tests/unit/Grav/Common/AssetsTest.php` |
| 51 | +That's it! |
0 commit comments