Commit a5adf85e authored by zuohuadong's avatar zuohuadong Committed by GitHub

Merge pull request #1 from laradock/master

更新到最新
parents 4c8e0952 0f7b6bab
......@@ -9,4 +9,4 @@ charset = utf-8
[{Dockerfile,docker-compose.yml}]
indent_style = space
indent_size = 4
indent_size = 2
COMPOSE_CONVERT_WINDOWS_PATHS=1
.idea
/logs
/data
.env
/.project
\ No newline at end of file
language: bash
sudo: required
services:
- docker
env:
matrix:
- PHP_VERSION=56
- PHP_VERSION=70
- PHP_VERSION=71
- HUGO_VERSION=0.19
script: ./travis-build.sh
deploy:
provider: pages
skip_cleanup: true
local_dir: docs
github_token: $GITHUB_TOKEN
on:
branch: master
condition: -n "${HUGO_VERSION}"
notifications:
email: false
baseurl = "http://laradock.io/"
languageCode = "en-us"
publishDir = "../docs"
title = "Laradock"
theme = "hugo-material-docs"
metadataformat = "yaml"
canonifyurls = true
# Enable Google Analytics by entering your tracking id
googleAnalytics = "UA-37514928-9"
[params]
# General information
author = "Mahmoud Zalt"
description = "Full PHP development environment for Docker."
copyright = ""
# Repository
provider = ""
repo_url = ""
version = ""
logo = "images/logo.png"
favicon = ""
permalink = "#"
# Custom assets
custom_css = []
custom_js = []
# Syntax highlighting theme
highlight_css = ""
[params.palette]
primary = "deep-purple"
accent = "purple"
[params.font]
text = "Doctarine"
code = "Source Code Pro"
[social]
twitter = ""
github = "laradock/laradock"
email = ""
# ------- MENU START -----------------------------------------
[[menu.main]]
name = "Introduction"
url = "introduction/"
weight = 1
[[menu.main]]
name = "Getting Started"
url = "getting-started/"
weight = 2
[[menu.main]]
name = "Documentation"
url = "documentation/"
weight = 3
[[menu.main]]
name = "Guides"
url = "guides/"
weight = 4
[[menu.main]]
name = "Help & Questions"
url = "help/"
weight = 5
[[menu.main]]
name = "Related Projects"
url = "related-projects/"
weight = 6
[[menu.main]]
name = "Contributing"
url = "contributing/"
weight = 7
[[menu.main]]
name = "License"
url = "license/"
weight = 8
# ------- MENU END -----------------------------------------
[blackfriday]
smartypants = true
fractions = true
smartDashes = true
plainIDAnchors = true
# Contributing to LaraDock
---
title: Contributing
type: index
weight: 7
---
Your contribution is more than welcome. Let's keep LaraDock amazing.
Your contribution is more than welcome.
### Got a Question or Problem?
## I have a Question/Problem
If you have questions about how to use LaraDock, please direct your questions to the discussion on [Gitter](https://gitter.im/LaraDock/laradock). If you believe your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Question).
If you have questions about how to use Laradock, please direct your questions to the discussion on [Gitter](https://gitter.im/Laradock/laradock). If you believe your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as `Question`) And you can still seek help on Gitter for it.
### Found an Issue?
If you find a bug in the source code or a mistake in the documentation, you can help us by
submitting an [Issue](https://github.com/laradock/laradock/issues). Even better you can submit a Pull Request with a fix.
## I found an Issue
If have an issue or you found a typo in the documentation, you can help us by
opnening an [Issue](https://github.com/laradock/laradock/issues).
### Want a Feature?
You can request a new feature by submitting an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request.
**Steps to do before opening an Issue:**
1. Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).
## Coding Guidelines
2. Decide if the Issue belongs to this project or to [Docker](https://github.com/docker) itself! or even the tool you are using such as Nginx or MongoDB...
### Support new Software
If your issue appears to be a bug, and hasn't been reported, then open a new issue.
*This Help us to maximize the effort we can spend fixing issues and adding new
features, by not reporting duplicate issues.*
## I want a Feature
You can request a new feature by submitting an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as `Feature Suggestion`). If you would like to implement a new feature then consider submitting a Pull Request yourself.
## I want to update the Documentation (Site)
Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Material Docs theme](http://themes.gohugo.io/theme/material-docs/). You might need to check their docs quickly.
Go the `DOCUMENTATION/content` and search for the markdown file you want to edit
Note: Every folder represents a section in the sidebar "Menu". And every page and sidebar has a `weight` number to show it's position in the site.
To update the sidebar or add a new section to it, you can edit this `DOCUMENTATION/config.toml` toml file.
> The site will be auto-generated in the `docs/` folder by [Travis CI](https://travis-ci.org/laradock/laradock/).
<br>
### To Host the website locally
1. Install [Hugo](https://gohugo.io/) on your machine.
2. Edit the `DOCUMENTATION/content`.
3. Delete the `/docs` folder from the root.
4. After you finish the editing, go to `DOCUMENTATION/` and run the `hugo` command to generate the HTML docs (inside a new `/docs` folder).
## How to support new Software (Add new Container)
* Create folder with the software name.
......@@ -29,30 +71,23 @@ You can request a new feature by submitting an [Issue](https://github.com/larado
* Make sure you follow our commenting style.
* Add the software in the `Readme`.
* Add the software in the `Documentation`.
### Edit existing Software
## Edit existing Software (Edit a Container)
* Open the software (container) folder.
* Edit the files you want to update.
* **Note:** If you want to edit the base image of the `Workspace` or the `php-fpm` Containers,
you need to edit their Dockerfiles from their Github repositories. For more info read their Dockerfiles comment on the LaraDock repository.
* Make sure to update the `Readme` incase you made any changes.
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the Laradock repository.
## Issue/PR Submission Guidelines
* Make sure to update the `Documentation` in case you made any changes.
### Submitting an Issue
Before you submit your issue search the archive, maybe your question was already answered.
If your issue appears to be a bug, and hasn't been reported, open a new issue.
Help us to maximize the effort we can spend fixing issues and adding new
features, by not reporting duplicate issues.
## Pull Request
### Before Submitting a Pull Request (PR)
### 1. Before Submitting a Pull Request (PR)
Always Test everything and make sure its working:
......@@ -62,13 +97,13 @@ Always Test everything and make sure its working:
- Test running the container with some other containers in real app and see of everything is working fine.
- Now edit the container (edit section by section and test rebuilding the container after every edited section)
- Testing building the container (docker-compose build container-name) with no errors.
- Test it in real App.
- Test it in a real App if possible.
### Submitting a PR
### 2. Submitting a PR
Consider the following guidelines:
* Search [GitHub](https://github.com/LaraDock/laradock/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
* Search [GitHub](https://github.com/laradock/laradock/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate efforts.
* Make your changes in a new git branch:
......@@ -99,14 +134,9 @@ git push origin my-fix-branch -f
*WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.*
### 3. After your PR is merged
### After your PR is merged
After your pull request is merged, you can safely delete your branch and pull the changes
from the main (upstream) repository:
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
......@@ -137,4 +167,4 @@ from the main (upstream) repository:
<br>
### Happy Coding :)
#### Happy Coding :)
This diff is collapsed.
---
title: Getting Started
type: index
weight: 2
---
## Requirements
- [Git](https://git-scm.com/downloads)
- [Docker](https://www.docker.com/products/docker/) `>= 1.12`
## Installation
Choose the setup the best suits your needs.
- [A) Setup for Single Project](#A)
- [A.1) Already have a PHP project](#A1)
- [A.2) Don't have a PHP project yet](#A2)
- [B) Setup for Multiple Projects](#B)
<a name="A"></a>
### A) Setup for Single Project
> (Follow these steps if you want a separate Docker environment for each project)
<a name="A1"></a>
### A.1) Already have a PHP project:
1 - Clone laradock on your project root directory:
```bash
git submodule add https://github.com/Laradock/laradock.git
```
**Notes:**
- If you are not using Git yet for your project, you can use `git clone` instead of `git submodule `.
- Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. [Check this](/documentation/#keep-track-of-your-laradock-changes)
Your folder structure should look like this:
```
+ project-a
+ laradock-a
+ project-b
+ laradock-b
```
(It's important to rename the folders differently in each project.)
> **Now jump to the [Usage](#Usage) section.**
<a name="A2"></a>
### A.2) Don't have a PHP project yet:
1 - Clone this repository anywhere on your machine:
```bash
git clone https://github.com/laradock/laradock.git
```
Your folder structure should look like this:
```
+ laradock
+ project-z
```
2 - Edit your web server sites configuration.
**In case of NGINX:** open `nginx/sites/default.conf` and change the `root` from `/var/www/public` to `/var/www/{my-project-folder-name}/public`.
*Or you can keep `default.conf` as it is, and create a separate config `my-site.conf` file for it.*
**In case of Apache:** :P
<br>
> **Now jump to the [Usage](#Usage) section.**
<a name="B"></a>
### B) Setup for Multiple Projects:
> (Follow these steps if you want a single Docker environment for all your project)
1 - Clone this repository anywhere on your machine (similar to [Steps A.2. from above](#A2)):
```bash
git clone https://github.com/laradock/laradock.git
```
Your folder structure should look like this:
```
+ laradock
+ project-1
+ project-2
```
2 - Go to `nginx/sites` and create config files to point to different project directory when visiting different domains.
Laradock by default includes `project-1.conf` and `project-2.conf` as working samples.
3 - change the default names `project-n`:
You can rename the config files, project folders and domains as you like, just make sure the `root` in the config files, is pointing to the correct project folder name.
4 - Add the domains to the **hosts** files.
```
127.0.0.1 project-1.dev
127.0.0.1 project-2.dev
```
> **Now jump to the [Usage](#Usage) section.**
<a name="Usage"></a>
## Usage
**Read Before starting:**
If you are using **Docker Toolbox** (VM), do one of the following:
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. *(outdated)*
<br>
>**Warning:** If you used an older version of Laradock it's highly recommended to rebuild the containers you need to use [see how you rebuild a container](#Build-Re-build-Containers) in order to prevent as much errors as possible.
<br>
1 - Enter the laradock folder and rename `env-example` to `.env`
```shell
cp env-example .env
```
You can edit the `.env` file to chose which software's you want to be installed in your environment. You can always refer to the `docker-compose.yml` file to see how those variables are been used.
2 - Build the enviroment and run it using `docker-compose`
In this example we'll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:
```bash
docker-compose up -d nginx mysql
```
**Note**: The `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. If you couldn't find them running then you need specify them as follow: `docker-compose up -d nginx php-fpm mysql workspace`.
You can select your own combination of containers form [this list](http://laradock.io/introduction/#supported-software-images).
*(Please note that sometimes we forget to update the docs, so check the `docker-compose.yml` file to see an updated list of all available containers).*
<br>
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...)
```bash
docker-compose exec workspace bash
```
*Alternatively, for Windows PowerShell users: execute the following command to enter any running container:*
```bash
docker exec -it {workspace-container-id} bash
```
**Note:** You can add `--user=laradock` to have files created as your host's user. Example:
```shell
docker-compose exec --user=laradock workspace bash
```
*You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
<br>
4 - Update your project configurations to use the database host
Open your PHP project's `.env` file or whichever configuration file you are reading from, and set the database host `DB_HOST` to `mysql`:
```env
DB_HOST=mysql
```
*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
<br>
5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.dev/` and `http://project-2.dev/`. But first don't
---
title: Help & Questions
type: index
weight: 5
---
Join the chat room on [Gitter](https://gitter.im/Laradock/laradock) and get help and support from the community.
You can as well can open an [issue](https://github.com/laradock/laradock/issues) on Github (will be labeled as Question) and discuss it with people on [Gitter](https://gitter.im/Laradock/laradock).
---
title: Welcome
type: index
weight: 0
---
---
title: Introduction
type: index
weight: 1
---
A full PHP development environment for Docker.
Includes pre-packaged Docker Images, all pre-configured to provide a wonderful PHP development environment.
Laradock is well known in the Laravel community, as the project started with single focus on running Laravel projects on Docker. Later and due to the large adoption from the PHP community, it started supporting other PHP projects like Symfony, CodeIgniter, WordPress, Drupal...
![](https://s19.postimg.org/jblfytw9f/laradock-logo.jpg)
## Quick Overview
Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL`, `Redis` and `Beanstalkd`:
1 - Clone Laradock inside your PHP project:
```shell
git clone https://github.com/Laradock/laradock.git
```
2 - Enter the laradock folder and rename `env-example` to `.env`.
```shell
cp env-example .env
```
3 - Run your containers:
```shell
docker-compose up -d nginx mysql redis beanstalkd
```
4 - Open your project's `.env` file and set the following:
```shell
DB_HOST=mysql
REDIS_HOST=redis
QUEUE_HOST=beanstalkd
```
5 - Open your browser and visit localhost: `http://localhost`.
```shell
That's it! enjoy :)
```
<a name="features"></a>
## Features
- Easy switch between PHP versions: 7.1, 7.0, 5.6...
- Choose your favorite database engine: MySQL, Postgres, MariaDB...
- Run your own combination of software: Memcached, HHVM, Beanstalkd...
- Every software runs on a separate container: PHP-FPM, NGINX, PHP-CLI...
- Easy to customize any container, with simple edit to the `Dockerfile`.
- All Images extends from an official base Image. (Trusted base Images).
- Pre-configured NGINX to host any code at your root directory.
- Can use Laradock per project, or single Laradock for all projects.
- Easy to install/remove software's in Containers using environment variables.
- Clean and well structured Dockerfiles (`Dockerfile`).
- Latest version of the Docker Compose file (`docker-compose`).
- Everything is visible and editable.
- Fast Images Builds.
- More to come every week..
<a name="Supported-Containers"></a>
## Supported Software (Images)
In adhering to the separation of concerns principle as promoted by Docker, Laradock runs each software on its own Container.
You can turn On/Off as many instances of as any container without worrying about the configurations, everything works like a charm.
- **Database Engines:**
MySQL - MariaDB - Percona - MongoDB - Neo4j - RethinkDB - MSSQL - PostgreSQL - Postgres Postgis.
- **Cache Engines:**
Redis - Memcached - Aerospike
- **PHP Servers:**
NGINX - Apache2 - Caddy
- **PHP Compilers:**
PHP FPM - HHVM
- **Message Queuing:**
Beanstalkd - Beanstalkd Console - RabbitMQ - RabbitMQ Console - PHP Worker
- **Tools:**
HAProxy - Jenkins - ElasticSearch - Selenium - Certbot - Mailhog - Minio - Varnish - PhpMyAdmin - Adminer - PgAdmin - MailHog - [Blackfire](https://blackfire.io)...
Laradock introduces the **Workspace** Image, as a development environment.
It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose.
**Workspace Image Tools**
PHP CLI - Composer - Git - Linuxbrew - Node - V8JS - Gulp - SQLite - xDebug - Envoy - Deployer - Vim - Yarn - SOAP - Drush...
You can choose, which tools to install in your workspace container and other containers, from the `.env` file.
> If you modify `docker-compose.yml`, `.env` or any `dockerfile` file, you must re-build your containers, to see those effects in the running instance.
If you can't find your Software in the list, build it yourself and sumit it. Contributions are welcomed :)
<a name="what-is-docker"></a>
## What is Docker?
[Docker](https://www.docker.com) is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of [operating-system-level virtualization](https://en.wikipedia.org/wiki/Operating-system-level_virtualization) on Linux, Mac OS and Windows.
<a name="why-docker-not-vagrant"></a>
## Why Docker not Vagrant!?
[Vagrant](https://www.vagrantup.com) creates Virtual Machines in minutes while Docker creates Virtual Containers in seconds.
Instead of providing a full Virtual Machines, like you get with Vagrant, Docker provides you **lightweight** Virtual Containers, that share the same kernel and allow to safely execute independent processes.
In addition to the speed, Docker gives tons of features that cannot be achieved with Vagrant.
Most importantly Docker can run on Development and on Production (same environment everywhere). While Vagrant is designed for Development only, (so you have to re-provision your server on Production every time).
<a name="Demo"></a>
## Demo Video
What's better than a **Demo Video**:
- Laradock v5.* (soon or never)
- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
- Laradock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
- Laradock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
- Laradock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)
<a name="Chat"></a>
## Chat with us
You are welcome to join our chat room on Gitter.
[![Gitter](https://badges.gitter.im/Laradock/laradock.svg)](https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
---
title: License
type: index
weight: 8
---
[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) (MIT)
---
title: Related Projects
type: index
weight: 6
---
Laradock related projects:
* [Laradock CLI](https://github.com/lorinlee/laradock-cli) by [LorinLee](https://github.com/lorinlee)
* [Laradock Env](https://github.com/bagart/laradock_env) by [BAGArt](https://github.com/bagart)
* [Klaradock](https://github.com/poyhsiao/Klaradock) by [Kim Hsiao](https://github.com/poyhsiao)
* [Ansible Laradock Kubernetes](https://github.com/sifat-rahim/ansible-laradock-kubernetes) by [Sifat Rahim](https://github.com/sifat-rahim)
These Docker Compose projects have piqued our interest:
* [MageDock](https://github.com/ojhaujjwal/magedock) by [Ujjwal Ojha](https://github.com/ojhaujjwal)
* [RubyDev-Dock](https://github.com/scudelletti/rubydev-dock) by [Diogo Scudelletti](https://github.com/scudelletti)
* [NoDock](https://github.com/Osedea/nodock) by [Osedea](https://github.com/Osedea)
If you want your project listed here, please open an issue.
laradock.io
\ No newline at end of file
# Changelog
### 11th May 2016
#### Add templates for section lists
Sections such as www.example.com/foo/ will now be rendered with a list of all pages that are part of this section. The list shows the pages' title and a summary of their content.
[Show me the diff](https://github.com/digitalcraftsman/hugo-material-docs/commit/1f8393a8d4ce1b8ee3fc7d87be05895c12810494)
### 22nd March 2016
#### Changing setup for Google Analytics
Formerly, the tracking id for Google Analytics was set like below:
```toml
[params]
google_analytics = ["UA-XXXXXXXX-X", "auto"]
```
Now the theme uses Hugo's own Google Analytics config option. The variable moved outside the scope of `params` and the setup requires only the tracking id as a string:
```toml
googleAnalytics = "UA-XXXXXXXX-X"
```
[Show me the diff](https://github.com/digitalcraftsman/hugo-material-docs/commit/fa10c8eef935932426d46b662a51f29a5e0d48e2)
\ No newline at end of file
Copyright (c) 2016 Digitalcraftsman <digitalcraftsman@protonmail.com><br>
Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
\ No newline at end of file
# Material Docs
A material design theme for [Hugo](https://gohugo.io).
[![Screenshot](https://raw.githubusercontent.com/digitalcraftsman/hugo-material-docs/master/static/images/screen.png)](https://digitalcraftsman.github.io/hugo-material-docs/)
## Quick start
Install with `git`:
git clone https://github.com/digitalcraftsman/hugo-material-docs.git themes/hugo-material-docs
Next, take a look in the `exampleSite` folder at. This directory contains an example config file and the content for the demo. It serves as an example setup for your documentation.
Copy at least the `config.toml` in the root directory of your website. Overwrite the existing config file if necessary.
Hugo includes a development server, so you can view your changes as you go -
very handy. Spin it up with the following command:
``` sh
hugo server
```
Now you can go to [localhost:1313](http://localhost:1313) and the Material
theme should be visible. For detailed installation instructions visit the [demo](http://themes.gohugo.io/theme/material-docs/).
Noteworthy changes of this theme are listed in the [changelog](https://github.com/digitalcraftsman/hugo-material-docs/blob/master/CHANGELOG.md).
## Acknowledgements
A big thank you to [Martin Donath](https://github.com/squidfunk). He created the original [Material theme](https://github.com/squidfunk/mkdocs-material) for Hugo's companion [MkDocs](http://www.mkdocs.org/). This port wouldn't be possible without him.
Furthermore, thanks to [Steve Francia](https://gihub.com/spf13) for creating Hugo and the [awesome community](https://github.com/spf13/hugo/graphs/contributors) around the project.
## License
The theme is released under the MIT license. Read the [license](https://github.com/digitalcraftsman/hugo-material-docs/blob/master/LICENSE.md) for more information.
{{ partial "head" . }}
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
{{ partial "header" . }}
</header>
<main class="main">
<div class="drawer">
{{ partial "drawer" . }}
</div>
<article class="article">
<div class="wrapper">
<h1>Pages in {{ .Title | singularize }}</h1>
{{ range .Data.Pages }}
<a href="{{ .Permalink }}" title="{{ .Title }}">
<h2>{{ .Title }}</h2>
</a>
<br>
{{ printf "%s" .Summary | markdownify }}
<hr>
{{ end }}
<aside class="copyright" role="note">
{{ with .Site.Params.copyright }}
&copy; {{ $.Now.Format "2006" }} {{ . }} &ndash;
{{ end }}
Documentation built with
<a href="https://www.gohugo.io" target="_blank">Hugo</a>
using the
<a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme.
</aside>
</div>
</article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
</div>
</div>
</div>
</main>
{{ partial "footer_js" . }}
{{ partial "head" . }}
{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }}
{{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}}
{{ .Scratch.Set "repo_id" $repo_id }}
{{ end }}
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
{{ partial "header" . }}
</header>
<main class="main">
<div class="drawer">
{{ partial "drawer" . }}
</div>
<article class="article">
<div class="wrapper">
<h1>{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}</h1>
{{ .Content }}
<aside class="copyright" role="note">
{{ with .Site.Params.copyright }}
&copy; {{ $.Now.Format "2006" }} {{ . }} &ndash;
{{ end }}
Documentation built with
<a href="https://www.gohugo.io" target="_blank">Hugo</a>
using the
<a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme.
</aside>
<footer class="footer">
{{ partial "footer" . }}
</footer>
</div>
</article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
</div>
</div>
</div>
</main>
{{ partial "footer_js" . }}
{{ partial "head" . }}
{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }}
{{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}}
{{ .Scratch.Set "repo_id" $repo_id }}
{{ end }}
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
{{ partial "header" . }}
</header>
<main class="main">
<div class="drawer">
{{ partial "drawer" . }}
</div>
<article class="article">
<div class="wrapper">
{{ range where .Site.Pages "Type" "index" }}
<h1>{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}</h1>
{{ .Content }}
{{ end }}
<aside class="copyright" role="note">
{{ with .Site.Params.copyright }}
&copy; {{ $.Now.Format "2006" }} {{ . }} &ndash;
{{ end }}
Documentation built with
<a href="https://www.gohugo.io" target="_blank">Hugo</a>
using the
<a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme,
by
<a href="https://zalt.me">Mahmoud Zalt</a>.
</aside>
<footer class="footer">
{{ partial "footer" . }}
</footer>
</div>
</article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
</div>
</div>
</div>
</main>
{{ partial "footer_js" . }}
<nav aria-label="Navigation">
<a href="{{ with .Site.Params.repo_url }}{{ . }}{{ else }}{{ .Site.BaseURL }}{{ end }}" class="project">
<div class="banner">
{{ with .Site.Params.logo }}
<div class="logo">
<img src="{{ $.Site.BaseURL }}{{ . }}">
</div>
{{ end }}
<!--<div class="name">-->
<!--<strong>{{ .Site.Title }} {{ with .Site.Params.version }}<span class="version">{{ . }}</span>{{ end }}</strong>-->
<!--{{ with .Scratch.Get "repo_id" }}-->
<!--<br>-->
<!--{{ . }}-->
<!--{{ end }}-->
<!--</div>-->
</div>
</a>
<div class="scrollable">
<div class="wrapper">
{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }}
<ul class="repo">
<li class="repo-download">
<a href="{{ .Site.Params.repo_url }}/archive/master.zip" target="_blank" title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
</li>
<li class="repo-stars">
<a href="{{ .Site.Params.repo_url }}/stargazers" target="_blank" title="Stargazers" data-action="star">
<i class="icon icon-star"></i> Stars
<span class="count">&ndash;</span>
</a>
</li>
</ul>
<hr>
{{ end }}
<div class="toc">
{{ if gt (len .Site.Menus.main) 0 }}
<ul>
{{ partial "nav" . }}
</ul>
{{ end }}
{{ if isset .Site.Params "author" }}
<!--<hr>-->
<!--<span class="section">The author</span>-->
<ul>
{{ with .Site.Social.twitter }}
<li>
<a href="https://twitter.com/{{ . }}" target="_blank" title="@{{ . }} on Twitter">
@{{ . }} on Twitter
</a>
</li>
{{ end }}
<!--{{ with .Site.Social.github }}-->
<!--<li>-->
<!--<a href="https://github.com/{{ . }}" target="_blank" title="@{{ . }} on GitHub">-->
<!--@{{ . }} on GitHub-->
<!--</a>-->
<!--</li>-->
<!--{{ end }}-->
{{ with .Site.Social.email }}
<li>
<a href="mailto:{{ . }}" title="Email of {{ . }}">
Contact via email
</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
</div>
</div>
</nav>
{{ if .IsPage }}
{{ if .Prev | or .Next }}
<nav class="pagination" aria-label="Footer">
<div class="previous">
{{ if .Prev }}
<a href="{{ .Prev.Permalink }}" title="{{ .Prev.Title }}">
<span class="direction">
Previous
</span>
<div class="page">
<div class="button button-previous" role="button" aria-label="Previous">
<i class="icon icon-back"></i>
</div>
<div class="stretch">
<div class="title">
{{ .Prev.Title }}
</div>
</div>
</div>
</a>
{{ end }}
</div>
<div class="next">
{{ if .Next }}
<a href="{{ .Next.Permalink }}" title="{{ .Next.Title }}">
<span class="direction">
Next
</span>
<div class="page">
<div class="stretch">
<div class="title">
{{ .Next.Title }}
</div>
</div>
<div class="button button-next" role="button" aria-label="Next">
<i class="icon icon-forward"></i>
</div>
</div>
</a>
{{ end }}
</div>
</nav>
{{ end }}
{{ end }}
{{ if .IsHome }}
{{ if gt (len .Site.Pages) 2 }}
<nav class="pagination" aria-label="Footer">
<div class="previous">
</div>
{{ $title := (index (.Site.Pages.ByDate) 1).Title }}
{{ $permalink := (index (.Site.Pages.ByDate) 1).Permalink }}
<div class="next">
<a href="{{ $permalink }}" title="{{ $title }}">
<span class="direction">
Next
</span>
<div class="page">
<div class="stretch">
<div class="title">
{{ $title }}
</div>
</div>
<div class="button button-next" role="button" aria-label="Next">
<i class="icon icon-forward"></i>
</div>
</div>
</a>
</div>
</nav>
{{ end }}
{{ end }}
<script>
{{ with .Scratch.Get "repo_id" }}
var base_url = '{{ (printf "%s" $.Site.BaseURL) | safeJS }}';
var repo_id = '{{ . | safeJS }}';
{{ else }}
var base_url = '';
var repo_id = '';
{{ end }}
</script>
<script src="{{ "javascripts/application.js" | absURL }}"></script>
{{ range .Site.Params.custom_js }}
<script src="{{ . | absURL }}"></script>
{{ end }}
<script>
{{ "/* Add headers to scrollspy */" | safeJS }}
var headers = document.getElementsByTagName("h2");
var scrollspy = document.getElementById('scrollspy');
if(scrollspy) {
if(headers.length > 0) {
for(var i = 0; i < headers.length; i++) {
var li = document.createElement("li");
li.setAttribute("class", "anchor");
var a = document.createElement("a");
a.setAttribute("href", "#" + headers[i].id);
a.setAttribute("title", headers[i].innerHTML);
a.innerHTML = headers[i].innerHTML;
li.appendChild(a)
scrollspy.appendChild(li);
}
} else {
scrollspy.parentElement.removeChild(scrollspy)
}
{{ "/* Add permanent link next to the headers */" | safeJS }}
var headers = document.querySelectorAll("h1, h2, h3, h4, h5, h6");
for(var i = 0; i < headers.length; i++) {
var a = document.createElement("a");
a.setAttribute("class", "headerlink");
a.setAttribute("href", "#" + headers[i].id);
a.setAttribute("title", "Permanent link")
a.innerHTML = {{ or .Site.Params.permalink "¶" }};
headers[i].appendChild(a);
}
}
</script>
{{ with .Site.GoogleAnalytics }}
<script>
(function(i,s,o,g,r,a,m){
i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||
[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;
m.parentNode.insertBefore(a,m)
})(window, document,
'script', '//www.google-analytics.com/analytics.js', 'ga');
/* General initialization */
ga('create', '{{ . }}', 'auto');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
/* Track outbound links */
var buttons = document.querySelectorAll('a');
Array.prototype.map.call(buttons, function(item) {
if (item.host != document.location.host) {
item.addEventListener('click', function() {
var action = item.getAttribute('data-action') || 'follow';
ga('send', 'event', 'outbound', action, item.href);
});
}
});
/* Register handler to log search on blur */
var query = document.querySelector('.query');
query.addEventListener('blur', function() {
if (this.value) {
var path = document.location.pathname;
ga('send', 'pageview', path + '?q=' + this.value);
}
});
</script>
{{ end }}
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
<!--[if IE 7 ]><html class="no-js ie7"><![endif]-->
<!--[if IE 8 ]><html class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html class="no-js ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head {{ with .Site.LanguageCode }}lang="{{ . }}"{{ end }}>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=10" />
<title>{{ .Title }}{{ if not .IsHome }} - {{ .Site.Title }}{{ end }}</title>
{{ .Hugo.Generator }}
{{ with .Site.Params.description }}
<meta name="description" content="{{ . }}">
{{ end }}
<link rel="canonical" href="{{ .Permalink }}">
{{ with .Site.Params.author }}
<meta name="author" content="{{ . }}">
{{ end }}
<meta property="og:url" content="{{ .Permalink }}">
{{ with .Site.Title }}<meta property="og:title" content="{{ . }}">{{ end }}
{{ with .Site.Params.logo }}<meta property="og:image" content="{{ . | absURL }}">{{ end }}
{{ with .Site.Title }}<meta name="apple-mobile-web-app-title" content="{{ . }}">{{ end }}
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="shortcut icon" type="image/x-icon" href="{{ with .Site.Params.favicon }}{{ . | absURL }}{{ else }}{{ "images/favicon.ico" | absURL }}{{ end }}">
<link rel="icon" type="image/x-icon" href="{{ with .Site.Params.favicon }}{{ . | absURL }}{{ else }}{{ "images/favicon.ico" | absURL }}{{ end }}">
<style>
@font-face {
font-family: 'Icon';
src: url('{{ "fonts/icon.eot?52m981" | absURL }}');
src: url('{{ "fonts/icon.eot?#iefix52m981" | absURL }}')
format('embedded-opentype'),
url('{{ "fonts/icon.woff?52m981" | absURL }}')
format('woff'),
url('{{ "fonts/icon.ttf?52m981" | absURL }}')
format('truetype'),
url('{{ "fonts/icon.svg?52m981#icon" | absURL }}')
format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<link rel="stylesheet" href="{{ "stylesheets/application.css" | absURL }}">
<link rel="stylesheet" href="{{ "stylesheets/temporary.css" | absURL }}">
<link rel="stylesheet" href="{{ "stylesheets/palettes.css" | absURL }}">
<link rel="stylesheet" href="{{ with .Site.Params.highlight_css }}{{ . | absURL }}{{ else }}{{ "stylesheets/highlight/highlight.css" | absURL }}{{ end }}">
{{/* set default values if no custom ones are defined */}}
{{ $text := or .Site.Params.font.text "Roboto" }}
{{ $code := or .Site.Params.font.code "Roboto Mono" }}
<link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ $text }}:400,700|{{ replace $code " " "+" | safeURL }}">
<style>
body, input {
font-family: '{{ $text }}', Helvetica, Arial, sans-serif;
}
pre, code {
font-family: '{{ $code }}', 'Courier New', 'Courier', monospace;
}
</style>
{{ range .Site.Params.custom_css }}
<link rel="stylesheet" href="{{ . | absURL }}">
{{ end }}
<script src="{{ "javascripts/modernizr.js" | absURL }}"></script>
{{ with .RSSLink }}
<link href="{{ . }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ . }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
</head>
<body class="{{ with .Site.Params.palette.primary }}palette-primary-{{ . }}{{end }} {{ with .Site.Params.palette.accent }}palette-accent-{{ . }}{{ end }}">
<nav aria-label="Header">
<div class="bar default">
<div class="button button-menu" role="button" aria-label="Menu">
<label class="toggle-button icon icon-menu" for="toggle-drawer">
<span></span>
</label>
</div>
<div class="stretch">
<div class="title">
<b>{{ .Site.Title }}</b> <span style="color: rgba(249, 245, 255, 0.63);"> / {{ .Title }}</span>
</div>
</div>
{{ with .Site.Social.twitter }}
<div class="button button-twitter" role="button" aria-label="Twitter">
<a href="https://twitter.com/{{ . }}" title="@{{ . }} on Twitter" target="_blank" class="toggle-button icon icon-twitter"></a>
</div>
{{ end }}
{{ with .Site.Social.github }}
<div class="button button-github" role="button" aria-label="GitHub">
<a style="padding: 0px; font-size:40px" href="https://github.com/{{ . }}" title="@{{ . }} on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
</div>
<p style="font-size: 18px; padding: 8px">Github</p>
{{ end }}
<!-- TODO: disabled until Hugo supports the generation of a content index natively
<div class="button button-search" role="button" aria-label="Search">
<label class="toggle-button icon icon-search" title="Search" for="toggle-search"></label>
</div>
-->
</div>
<div class="bar search">
<div class="button button-close" role="button" aria-label="Close">
<label class="toggle-button icon icon-back" for="toggle-search"></label>
</div>
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
</div>
</div>
<div class="button button-reset" role="button" aria-label="Search">
<button class="toggle-button icon icon-close" id="reset-search"></button>
</div>
</div>
</nav>
{{ $currentNode := . }}
{{ range .Site.Menus.main.ByWeight }}
{{ $.Scratch.Set "currentMenuEntry" . }}
<li>
{{ if .HasChildren }}
<span class="section">{{ .Name | title }}</span>
<ul>
{{ range .Children }}
{{ $.Scratch.Set "currentMenuEntry" . }}
{{ partial "nav_link" $currentNode }}
{{ end }}
</ul>
{{ else }}
{{ partial "nav_link" $currentNode }}
{{ end }}
</li>
{{ end }}
{{ $currentMenuEntry := .Scratch.Get "currentMenuEntry" }}
{{ $isCurrent := eq .Permalink ($currentMenuEntry.URL | absURL | printf "%s") }}
<a {{ if $isCurrent }}class="current"{{ end }} title="{{ $currentMenuEntry.Name }}" href="{{ $currentMenuEntry.URL | relURL}}">
{{ $currentMenuEntry.Pre }}
{{ $currentMenuEntry.Name }}
</a>
{{ if $isCurrent }}
<ul id="scrollspy">
</ul>
{{ end }}
<div class="admonition note">
<p class="admonition-title">{{ .Get "title" }}</p>
<p>{{ printf "%s" .Inner | markdownify }}</p>
</div>
\ No newline at end of file
<div class="admonition warning">
<p class="admonition-title">{{ .Get "title" }}</p>
<p>{{ printf "%s" .Inner | markdownify }}</p>
</div>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe600;" glyph-name="search" d="M661.333 341.334h-33.92l-11.733 11.733c41.813 48.427 66.987 111.36 66.987 180.267 0 153.173-124.16 277.333-277.333 277.333s-277.333-124.16-277.333-277.333 124.16-277.333 277.333-277.333c68.907 0 131.84 25.173 180.267 66.773l11.733-11.733v-33.707l213.333-212.907 63.573 63.573-212.907 213.333zM405.333 341.334c-106.027 0-192 85.973-192 192s85.973 192 192 192 192-85.973 192-192-85.973-192-192-192z" />
<glyph unicode="&#xe601;" glyph-name="arrow-back" d="M853.333 469.334h-519.253l238.293 238.293-60.373 60.373-341.333-341.333 341.333-341.333 60.373 60.373-238.293 238.293h519.253v85.333z" />
<glyph unicode="&#xe602;" glyph-name="chevron-right" d="M426.667 682.667l-60.373-60.373 195.627-195.627-195.627-195.627 60.373-60.373 256 256z" />
<glyph unicode="&#xe603;" glyph-name="close" d="M810.667 664.96l-60.373 60.373-238.293-238.293-238.293 238.293-60.373-60.373 238.293-238.293-238.293-238.293 60.373-60.373 238.293 238.293 238.293-238.293 60.373 60.373-238.293 238.293z" />
<glyph unicode="&#xe604;" glyph-name="menu" d="M128 170.667h768v85.333h-768v-85.333zM128 384h768v85.333h-768v-85.333zM128 682.667v-85.333h768v85.333h-768z" />
<glyph unicode="&#xe605;" glyph-name="arrow-forward" d="M512 768l-60.373-60.373 238.293-238.293h-519.253v-85.333h519.253l-238.293-238.293 60.373-60.373 341.333 341.333z" />
<glyph unicode="&#xe606;" glyph-name="twitter" d="M1024 744.249c-37.676-16.708-78.164-28.002-120.66-33.080 43.372 26 76.686 67.17 92.372 116.23-40.596-24.078-85.556-41.56-133.41-50.98-38.32 40.83-92.922 66.34-153.346 66.34-116.022 0-210.088-94.058-210.088-210.078 0-16.466 1.858-32.5 5.44-47.878-174.6 8.764-329.402 92.4-433.018 219.506-18.084-31.028-28.446-67.116-28.446-105.618 0-72.888 37.088-137.192 93.46-174.866-34.438 1.092-66.832 10.542-95.154 26.278-0.020-0.876-0.020-1.756-0.020-2.642 0-101.788 72.418-186.696 168.522-206-17.626-4.8-36.188-7.372-55.348-7.372-13.538 0-26.698 1.32-39.528 3.772 26.736-83.46 104.32-144.206 196.252-145.896-71.9-56.35-162.486-89.934-260.916-89.934-16.958 0-33.68 0.994-50.116 2.94 92.972-59.61 203.402-94.394 322.042-94.394 386.422 0 597.736 320.124 597.736 597.744 0 9.108-0.206 18.168-0.61 27.18 41.056 29.62 76.672 66.62 104.836 108.748z" />
<glyph unicode="&#xe607;" glyph-name="github" d="M512.008 926.025c-282.738 0-512.008-229.218-512.008-511.998 0-226.214 146.704-418.132 350.136-485.836 25.586-4.738 34.992 11.11 34.992 24.632 0 12.204-0.48 52.542-0.696 95.324-142.448-30.976-172.504 60.41-172.504 60.41-23.282 59.176-56.848 74.916-56.848 74.916-46.452 31.778 3.51 31.124 3.51 31.124 51.4-3.61 78.476-52.766 78.476-52.766 45.672-78.27 119.776-55.64 149.004-42.558 4.588 33.086 17.852 55.68 32.506 68.464-113.73 12.942-233.276 56.85-233.276 253.032 0 55.898 20.004 101.574 52.76 137.428-5.316 12.9-22.854 64.972 4.952 135.5 0 0 43.006 13.752 140.84-52.49 40.836 11.348 84.636 17.036 128.154 17.234 43.502-0.198 87.336-5.886 128.256-17.234 97.734 66.244 140.656 52.49 140.656 52.49 27.872-70.528 10.35-122.6 5.036-135.5 32.82-35.856 52.694-81.532 52.694-137.428 0-196.654-119.778-239.95-233.79-252.624 18.364-15.89 34.724-47.046 34.724-94.812 0-68.508-0.596-123.644-0.596-140.508 0-13.628 9.222-29.594 35.172-24.566 203.322 67.776 349.842 259.626 349.842 485.768 0 282.78-229.234 511.998-511.992 511.998z" />
<glyph unicode="&#xe608;" glyph-name="download" d="M810.667 554.667h-170.667v256h-256v-256h-170.667l298.667-298.667 298.667 298.667zM213.333 170.667v-85.333h597.333v85.333h-597.333z" />
<glyph unicode="&#xe609;" glyph-name="star" d="M512 201.814l263.68-159.147-69.973 299.947 232.96 201.813-306.773 26.027-119.893 282.88-119.893-282.88-306.773-26.027 232.96-201.813-69.973-299.947z" />
<glyph unicode="&#xe610;" glyph-name="warning" d="M554 340.667v172h-84v-172h84zM554 170.667v86h-84v-86h84zM42 42.667l470 810 470-810h-940z" />
<glyph unicode="&#xe611;" glyph-name="hint" d="M614 682.667h240v-426h-300l-16 84h-240v-298h-84v726h384z" />
</font></defs></svg>
\ No newline at end of file
/*
* overwrite the current primary color of the
* theme that is used as fallback in codeblocks
*/
.article pre code {
color: rgba(0, 0, 0, 0.78) !important;
}
/*
HIGHLIGHT.JS THEME
tweaked version of the Github theme
*/
.hljs {
display:block;
overflow-x:auto;
}
.hljs-comment,
.hljs-quote {
color:#998;
font-style:italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color:#333;
font-weight:700;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color:teal;
}
.hljs-string,
.hljs-doctag {
color:#d14;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color:#900;
font-weight:700;
}
.hljs-subst {
font-weight:400;
}
.hljs-type,
.hljs-class .hljs-title {
color:#458;
font-weight:700;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color:navy;
font-weight:400;
}
.hljs-regexp,
.hljs-link {
color:#009926;
}
.hljs-symbol,
.hljs-bullet {
color:#990073;
}
.hljs-built_in,
.hljs-builtin-name {
color:#0086b3;
}
.hljs-meta {
color:#999;
font-weight:700;
}
.hljs-deletion {
background:#fdd;
}
.hljs-addition {
background:#dfd;
}
.hljs-emphasis {
font-style:italic;
}
.hljs-strong {
font-weight:700;
}
/*
OVERRIDING THE DEFAULT STYLES - By Mahmoud Zalt (mahmoud@zalt.me) for Laradock.io
*/
.project .logo img{
width: 140px;
height: 140px;
background: transparent;
border-radius: 0%;
}
/* This file only exists (temporarily) until the
custom styling can be replaced with the
implementation of the upstream project.
*/
blockquote {
padding: 0 20px;
margin: 0 0 20px;
font-size: inherit;
border-left: 5px solid #eee;
}
name = "Material Docs"
license = "MIT"
licenselink = "https://github.com/digitalcraftsman/hugo-material-docs/blob/master/LICENSE.md"
description = "A material design theme for documentations."
homepage = "https://github.com/digitalcraftsman/hugo-material-docs"
tags = ["material", "documentation", "docs", "google analytics", "responsive"]
features = ["", ""]
min_version = 0.15
[author]
name = "Digitalcraftsman"
homepage = "https://github.com/digitalcraftsman"
# If porting an existing theme
[original]
name = "Martin Donath"
homepage = "http://struct.cc/"
repo = "https://github.com/squidfunk/mkdocs-material"
This diff is collapsed.
This diff is collapsed.
#### Install Docker
```
Login Digital Ocean
Add Droplet
1 Click Install docker
Choose Droplet
reset ROOT password
check email
```
#### SSH to your Server
```
ssh root@ipaddress
```
you will be prompt of that password.
type the password you receive in your email
then it will ask to you to change a new password
just change it to the custom root password you want
After SSH
you can check that docker command is working by typing
```
$root@midascode:~# docker
```
#### Set Up Your Laravel Project
```
$root@midascode:~# apt-get install git
$root@midascode:~# git clone https://github.com/laravel/laravel
$root@midascode:~# cd laravel
$root@midascode:~/laravel/ git submodule add https://github.com/LaraDock/laradock.git
$root@midascode:~/laravel/ cd laradock
```
#### Install docker-compose command
```
$root@midascode:~/laravel/laradock# curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose
$root@midascode:~/chmod +x /usr/local/bin/docker-compose
```
#### Create Your LaraDock Containers
```
$root@midascode:~/laravel/laradock# docker-compose up -d nginx mysql
```
#### Go to Your Workspace
```
docker-compose exec workspace bash
```
#### Install laravel Dependencies, Add .env , generate Key and give proper permission certain folder
```
$ root@0e77851d27d3:/var/www# composer install
$ root@0e77851d27d3:/var/www# cp .env.example .env
$ root@0e77851d27d3:/var/www# php artisan key:generate
$ root@0e77851d27d3:/var/www# exit
$root@midascode:~/laravel/laradock# cd ..
$root@midascode:~/laravel# sudo chmod -R 777 storage bootstrap/cache
```
you can then view your laravel site at your ipaddress
for example
```
192.168.1.1
```
You will see there Laravel Default Welcome Page
but if you need to view on your custom domain name
which you would.
#### Using Your Own Domain Name
login to your DNS provider
Godaddy, Namecheap what ever...
And Point the Custom Domain Name Server to
```
ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com
```
In Your Digital Ocean Account go to
```
https://cloud.digitalocean.com/networking/domains
```
add your domain name and choose the server ip you provision earlier
#### Serve Site With NGINX (HTTP ONLY)
Go back to command line
```
$root@midascode:~/laravel/laradock# cd nginx
$root@midascode:~/laravel/laradock/nginx# vim laravel.conf
```
remove default_server
```
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
```
and add server_name (your custom domain)
```
listen 80;
listen [::]:80 ipv6only=on;
server_name yourdomain.com;
```
#### Rebuild Your Nginx
```
$root@midascode:~/laravel/laradock/nginx# docker-compose down
$root@midascode:~/laravel/laradock/nginx# docker-compose build nginx
```
#### Re Run Your Containers MYSQL and NGINX
```
$root@midascode:~/laravel/laradock/nginx# docker-compose up -d nginx mysql
```
###### View Your Site with HTTP ONLY (http://yourdomain.com)
#### Run Site on SSL with Let's Encrypt Certificate
###### Note: You need to Use Caddy here Instead of Nginx
###### To go Caddy Folders and Edit CaddyFile
```
$root@midascode:~/laravel/laradock# cd caddy
$root@midascode:~/laravel/laradock/caddy# vim Caddyfile
```
Remove 0.0.0.0:80
```
0.0.0.0:80
root /var/www/public
```
and replace with your https://yourdomain.com
```
https://yourdomain.com
root /var/www/public
```
uncomment tls
```
#tls self-signed
```
and replace self-signed with your email address
```
tls midascodebreaker@gmai.com
```
This is needed Prior to Creating Let's Encypt
#### Run Your Caddy Container without the -d flag and Generate SSL with Let's Encrypt
```
$root@midascode:~/laravel/laradock/caddy# docker-compose up caddy
```
you will be prompt here to enter your email... you may enter it or not
```
Attaching to laradock_mysql_1, laradock_caddy_1
caddy_1 | Activating privacy features...
caddy_1 | Your sites will be served over HTTPS automatically using Let's Encrypt.
caddy_1 | By continuing, you agree to the Let's Encrypt Subscriber Agreement at:
caddy_1 | https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf
caddy_1 | Activating privacy features... done.
caddy_1 | https://yourdomain.com
caddy_1 | http://yourdomain.com
```
After it finish Press Ctrl + C to exit ...
#### Stop All Containers and ReRun Caddy and Other Containers on Background
```
$root@midascode:~/laravel/laradock/caddy# docker-compose down
$root@midascode:~/laravel/laradock/caddy# docker-compose up -d mysql caddy
```
View your Site in the Browser Securely Using HTTPS (https://yourdomain.com)
##### Note that Certificate will be Automatically Renew By Caddy
>References:
>
- [https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04)
- [https://www.digitalocean.com/products/one-click-apps/docker/](https://www.digitalocean.com/products/one-click-apps/docker/)
- [https://docs.docker.com/engine/installation/linux/ubuntulinux/](https://docs.docker.com/engine/installation/linux/ubuntulinux/)
- [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/)
- [https://caddyserver.com/docs/automatic-https](https://caddyserver.com/docs/automatic-https)
- [https://caddyserver.com/docs/tls](https://caddyserver.com/docs/tls)
- [https://caddyserver.com/docs/caddyfile](https://caddyserver.com/docs/caddyfile)
FROM adminer:latest
MAINTAINER Patrick Artounian <partounian@gmail.com>
# Add volume for sessions to allow session persistence
VOLUME /sessions
# We expose Adminer on port 8080 (Adminer's default)
EXPOSE 8080
......@@ -6,11 +6,13 @@ ARG PHP_SOCKET=php-fpm:9000
ENV WEB_PHP_SOCKET=$PHP_SOCKET
ENV WEB_DOCUMENT_ROOT=/var/www/public
ENV WEB_DOCUMENT_ROOT=/var/www/
EXPOSE 80 443
WORKDIR /var/www/public
WORKDIR /var/www/
ADD vhost.conf /etc/apache2/sites-enabled/vhost.conf
ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"]
......
*.conf
!default.conf
!default.apache.conf
<VirtualHost *:80>
ServerName laradock.dev
DocumentRoot /var/www/html/
Options Indexes FollowSymLinks
<Directory "/var/www/html/">
AllowOverride All
<IfVersion < 2.4>
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName sample.dev
DocumentRoot /var/www/sample/public/
Options Indexes FollowSymLinks
<Directory "/var/www/sample/public/">
AllowOverride All
<IfVersion < 2.4>
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
</VirtualHost>
Include /etc/apache2/sites-available/*.conf
......@@ -4,6 +4,10 @@ root /var/www/public
fastcgi / php-fpm:9000 php {
index index.php
}
# To handle .html extensions with laravel change ext to
# ext / .html
rewrite {
r .*
ext /
......@@ -16,3 +20,9 @@ errors /var/log/caddy/error.log
# Uncomment to enable TLS (HTTPS)
# Change the first list to listen on port 443 when enabling TLS
#tls self_signed
# To use Lets encrpt tls with a DNS provider uncomment these
# lines and change the provider as required
#tls {
# dns cloudflare
#}
......@@ -2,7 +2,7 @@ FROM alpine:3.4
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
ENV caddy_version=0.9.3
ENV caddy_version=0.9.5
LABEL caddy_version="$caddy_version" architecture="amd64"
......@@ -12,13 +12,13 @@ RUN apk update \
RUN curl --silent --show-error --fail --location \
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
"https://github.com/mholt/caddy/releases/download/v$caddy_version/caddy_linux_amd64.tar.gz" \
| tar --no-same-owner -C /usr/bin/ -xz caddy_linux_amd64 \
&& mv /usr/bin/caddy_linux_amd64 /usr/bin/caddy \
"https://caddyserver.com/download/build?os=linux&arch=amd64&features=cloudflare%2Cdigitalocean%2Cdnsimple%2Cdyn%2Cgooglecloud%2Clinode%2Croute53" \
| tar --no-same-owner -C /usr/bin/ -xz caddy \
&& mv /usr/bin/caddy /usr/bin/caddy \
&& chmod 0755 /usr/bin/caddy
EXPOSE 80 443 2015
WORKDIR /var/www/public
CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile"]
CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile"]
\ No newline at end of file
FROM phusion/baseimage:latest
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
COPY run-certbot.sh /root/certbot/run-certbot.sh
RUN apt-get update
RUN apt-get install -y letsencrypt
ENTRYPOINT bash -c "bash /root/certbot/run-certbot.sh && sleep infinity"
#!/bin/bash
letsencrypt certonly --webroot -w /var/www/letsencrypt -d "$CN" --agree-tos --email "$EMAIL" --non-interactive --text
cp /etc/letsencrypt/archive/"$CN"/cert1.pem /var/certs/cert1.pem
cp /etc/letsencrypt/archive/"$CN"/privkey1.pem /var/certs/privkey1.pem
This diff is collapsed.
laradock.io
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe600;" glyph-name="search" d="M661.333 341.334h-33.92l-11.733 11.733c41.813 48.427 66.987 111.36 66.987 180.267 0 153.173-124.16 277.333-277.333 277.333s-277.333-124.16-277.333-277.333 124.16-277.333 277.333-277.333c68.907 0 131.84 25.173 180.267 66.773l11.733-11.733v-33.707l213.333-212.907 63.573 63.573-212.907 213.333zM405.333 341.334c-106.027 0-192 85.973-192 192s85.973 192 192 192 192-85.973 192-192-85.973-192-192-192z" />
<glyph unicode="&#xe601;" glyph-name="arrow-back" d="M853.333 469.334h-519.253l238.293 238.293-60.373 60.373-341.333-341.333 341.333-341.333 60.373 60.373-238.293 238.293h519.253v85.333z" />
<glyph unicode="&#xe602;" glyph-name="chevron-right" d="M426.667 682.667l-60.373-60.373 195.627-195.627-195.627-195.627 60.373-60.373 256 256z" />
<glyph unicode="&#xe603;" glyph-name="close" d="M810.667 664.96l-60.373 60.373-238.293-238.293-238.293 238.293-60.373-60.373 238.293-238.293-238.293-238.293 60.373-60.373 238.293 238.293 238.293-238.293 60.373 60.373-238.293 238.293z" />
<glyph unicode="&#xe604;" glyph-name="menu" d="M128 170.667h768v85.333h-768v-85.333zM128 384h768v85.333h-768v-85.333zM128 682.667v-85.333h768v85.333h-768z" />
<glyph unicode="&#xe605;" glyph-name="arrow-forward" d="M512 768l-60.373-60.373 238.293-238.293h-519.253v-85.333h519.253l-238.293-238.293 60.373-60.373 341.333 341.333z" />
<glyph unicode="&#xe606;" glyph-name="twitter" d="M1024 744.249c-37.676-16.708-78.164-28.002-120.66-33.080 43.372 26 76.686 67.17 92.372 116.23-40.596-24.078-85.556-41.56-133.41-50.98-38.32 40.83-92.922 66.34-153.346 66.34-116.022 0-210.088-94.058-210.088-210.078 0-16.466 1.858-32.5 5.44-47.878-174.6 8.764-329.402 92.4-433.018 219.506-18.084-31.028-28.446-67.116-28.446-105.618 0-72.888 37.088-137.192 93.46-174.866-34.438 1.092-66.832 10.542-95.154 26.278-0.020-0.876-0.020-1.756-0.020-2.642 0-101.788 72.418-186.696 168.522-206-17.626-4.8-36.188-7.372-55.348-7.372-13.538 0-26.698 1.32-39.528 3.772 26.736-83.46 104.32-144.206 196.252-145.896-71.9-56.35-162.486-89.934-260.916-89.934-16.958 0-33.68 0.994-50.116 2.94 92.972-59.61 203.402-94.394 322.042-94.394 386.422 0 597.736 320.124 597.736 597.744 0 9.108-0.206 18.168-0.61 27.18 41.056 29.62 76.672 66.62 104.836 108.748z" />
<glyph unicode="&#xe607;" glyph-name="github" d="M512.008 926.025c-282.738 0-512.008-229.218-512.008-511.998 0-226.214 146.704-418.132 350.136-485.836 25.586-4.738 34.992 11.11 34.992 24.632 0 12.204-0.48 52.542-0.696 95.324-142.448-30.976-172.504 60.41-172.504 60.41-23.282 59.176-56.848 74.916-56.848 74.916-46.452 31.778 3.51 31.124 3.51 31.124 51.4-3.61 78.476-52.766 78.476-52.766 45.672-78.27 119.776-55.64 149.004-42.558 4.588 33.086 17.852 55.68 32.506 68.464-113.73 12.942-233.276 56.85-233.276 253.032 0 55.898 20.004 101.574 52.76 137.428-5.316 12.9-22.854 64.972 4.952 135.5 0 0 43.006 13.752 140.84-52.49 40.836 11.348 84.636 17.036 128.154 17.234 43.502-0.198 87.336-5.886 128.256-17.234 97.734 66.244 140.656 52.49 140.656 52.49 27.872-70.528 10.35-122.6 5.036-135.5 32.82-35.856 52.694-81.532 52.694-137.428 0-196.654-119.778-239.95-233.79-252.624 18.364-15.89 34.724-47.046 34.724-94.812 0-68.508-0.596-123.644-0.596-140.508 0-13.628 9.222-29.594 35.172-24.566 203.322 67.776 349.842 259.626 349.842 485.768 0 282.78-229.234 511.998-511.992 511.998z" />
<glyph unicode="&#xe608;" glyph-name="download" d="M810.667 554.667h-170.667v256h-256v-256h-170.667l298.667-298.667 298.667 298.667zM213.333 170.667v-85.333h597.333v85.333h-597.333z" />
<glyph unicode="&#xe609;" glyph-name="star" d="M512 201.814l263.68-159.147-69.973 299.947 232.96 201.813-306.773 26.027-119.893 282.88-119.893-282.88-306.773-26.027 232.96-201.813-69.973-299.947z" />
<glyph unicode="&#xe610;" glyph-name="warning" d="M554 340.667v172h-84v-172h84zM554 170.667v86h-84v-86h84zM42 42.667l470 810 470-810h-940z" />
<glyph unicode="&#xe611;" glyph-name="hint" d="M614 682.667h240v-426h-300l-16 84h-240v-298h-84v726h384z" />
</font></defs></svg>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment