Improved code highlighting using codemirror
This commit is contained in:
parent c4bc15c57d
commit f7f6882b29
23 changed files with 3040 additions and 311 deletions
| @ -11,7 +11,7 @@ By default BookStack will use a file system cache that's storage in the `storage | |||
| ||||
As an easy alternative to using the filesystem, you can use the database to store the cache and session. The database setup for this is done when installing/updating BookStack so you simply need to set the following in your `.env` file: | ||||
| ||||
``` | ||||
```bash | ||||
CACHE_DRIVER=database | ||||
SESSION_DRIVER=database | ||||
``` | ||||
| @ -20,7 +20,7 @@ SESSION_DRIVER=database | |||
| ||||
To use memcached for caching and/or sessions open up your `.env` file and find the `CACHE_DRIVER` & `SESSION_DRIVER` variables. By default these are both set to `file`. Change these variables to `memcached`. You will also need to add a variable to specify the memcached servers you are using. To do this add a variable named `MEMCACHED_SERVERS` to the `.env` file and set the value to be your memcached servers in the following format: `HOST:PORT:WEIGHT,HOST2:PORT:WEIGHT`. You can specify as many servers as you want. Their usage split will be determined by the weight given to them. Here are some examples of what the `.env` file should look like: | ||||
| ||||
``` | ||||
```bash | ||||
# Set both the cache and session to use memcached | ||||
CACHE_DRIVER=memcached | ||||
SESSION_DRIVER=memcached | ||||
| @ -40,7 +40,7 @@ To specify if you would like to cluster you Redis servers create a `REDIS_CLUSTE | |||
| ||||
Here's an example of setting the Redis configuration: | ||||
| ||||
``` | ||||
```bash | ||||
# Set both the cache and session to use Redis | ||||
CACHE_DRIVER=redis | ||||
SESSION_DRIVER=redis | ||||
| |
| @ -11,7 +11,7 @@ BookStack has some command line actions that can help with maintenence and commo | |||
| ||||
Here's a listing of the BookStack specific commands: | ||||
| ||||
``` | ||||
```bash | ||||
| ||||
# Delete all activity history from the system | ||||
php artisan bookstack:clear-activity | ||||
| |
| @ -32,7 +32,7 @@ This project currently uses the `release` branch of the BookStack GitHub reposit | |||
| ||||
1. Clone the release branch of the BookStack GitHub repository into a folder. | ||||
| ||||
``` | ||||
```bash | ||||
git clone https://github.com/BookStackApp/BookStack.git --branch release --single-branch | ||||
``` | ||||
| ||||
| @ -48,7 +48,7 @@ This project currently uses the `release` branch of the BookStack GitHub reposit | |||
#### URL Rewrite rules | ||||
| ||||
**Apache** | ||||
``` | ||||
```apache | ||||
Options +FollowSymLinks | ||||
RewriteEngine On | ||||
| ||||
| @ -58,7 +58,7 @@ RewriteRule ^ index.php [L] | |||
``` | ||||
| ||||
**Nginx** | ||||
``` | ||||
```nginx | ||||
location / { | ||||
try_files $uri $uri/ /index.php?$query_string; | ||||
} | ||||
| @ -83,7 +83,7 @@ A script to install BookStack on a fresh instance of Ubuntu 16.04 is available. | |||
| ||||
#### Running the Script | ||||
| ||||
``` bash | ||||
```bash | ||||
# Ensure you have read the above information about what this script does before executing these commands. | ||||
| ||||
# Download the script | ||||
| |
| @ -57,22 +57,22 @@ For Nginx you will need to define a server for each BookStack instance you want | |||
By default, server definitions are stored in the `/etc/nginx/sites-available/` directory. Create a new file here, with a sensible name, for each BookStack instance you want to set up. Use the following configuration as a guide: | ||||
| ||||
| ||||
``` | ||||
```nginx | ||||
# /etc/nginx/sites-available/user-docs.conf | ||||
| ||||
server { | ||||
listen 80; | ||||
listen [::]:80; | ||||
| ||||
| ||||
root /var/www/user-docs/public; | ||||
index index.php; | ||||
| ||||
| ||||
server_name user-docs.example.com; | ||||
| ||||
| ||||
location / { | ||||
try_files $uri $uri/ /index.php?$query_string; | ||||
} | ||||
| ||||
| ||||
location ~ \.php$ { | ||||
try_files $uri /index.php =404; | ||||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||||
| |
| @ -13,9 +13,9 @@ As an alternative you can use [wkhtmltopdf](http://wkhtmltopdf.org/) to generate | |||
| ||||
Pre-compiled binaries for wkhtmltopdf can be found on the downloads page of [their website](http://wkhtmltopdf.org/downloads.html). BookStack will check for a file named `wkhtmltopdf` at the base folder of a BookStack install. If found it will use that to render PDF's. If that does not exist it will check for a `WKHTMLTOPDF` variable in the `.env` file. You can use this variable to set an alternate location to wkhtmltopdf: | ||||
| ||||
``` | ||||
```bash | ||||
# In .env file | ||||
WKHTMLTOPDF=/home/user/bins/wkhtmltopdf | ||||
``` | ||||
| ||||
If neither of those exist Dompdf will be used instead. | ||||
If neither of those exist Dompdf will be used instead. | ||||
| |
| @ -34,16 +34,19 @@ Due to the above it's important to ensure you disable 'directory indexes' to pre | |||
users from being able to navigate their way through your images. Here's the configuration | ||||
for NGINX & Apache if your server allows directory indexes: | ||||
| ||||
**NGINX** | ||||
| ||||
``` | ||||
# NGINX | ||||
```nginx | ||||
# By default indexes are disabled on Nginx but if you have them enabled | ||||
# add this to your BookStack server block | ||||
location /uploads { | ||||
autoindex off; | ||||
} | ||||
``` | ||||
| ||||
# Apache | ||||
**Apache** | ||||
| ||||
```apache | ||||
# Add this to your Apache BookStack virtual host if Indexes are enabled. | ||||
# If .htaccess file are enabled then the below should already be active. | ||||
<Location "/uploads"> | ||||
| |
| @ -47,7 +47,7 @@ To create a Twitter application for signing in with you may require a phone numb | |||
4. If you'd like, set an icon and change any other details. | ||||
5. Click the 'Permissions' tab and in the 'Additional Permissions' section check the box 'Request email addresses from users' then save. | ||||
6. Go to the 'Keys and Access Tokens' tab to find your API key and secret. Add or set these to your `.env` file like so: | ||||
``` | ||||
```bash | ||||
# Replace the below (including '{}' braces) with your twitter API_KEY and API_SECRET | ||||
TWITTER_APP_ID={API_KEY} | ||||
TWITTER_APP_SECRET={API_SECRET} | ||||
| @ -68,7 +68,7 @@ To create a Twitter application for signing in with you may require a phone numb | |||
5. On the left sidebar again go to 'Facebook Login' -> 'Settings'. | ||||
6. Enter your base BookStack URL again into the 'Valid OAuth redirect URIs' input and save. | ||||
7. Navigate back to the app 'Dashboard' in the sidebar to find your app id and secret. Add or set these to your `.env` file like so: | ||||
``` | ||||
```bash | ||||
# Replace the below (including '{}' braces) with your facebook APP_KEY and APP_SECRET | ||||
FACEBOOK_APP_ID={APP_KEY} | ||||
FACEBOOK_APP_SECRET={APP_SECRET} | ||||
| @ -85,7 +85,7 @@ To create a Twitter application for signing in with you may require a phone numb | |||
1. Go to the [Slack apps page](https://api.slack.com/apps) and select 'Create New App'. | ||||
2. Enter an app name ('BookStack login' or something custom), select your team then continue. | ||||
3. You should see your client ID and secret. Copy these details and add them as new variables in your `.env` file like so: | ||||
``` | ||||
```bash | ||||
# Replace the below (including '{}' braces) with your slack CLIENT_ID and CLIENT_SECRET | ||||
SLACK_APP_ID={CLIENT_ID} | ||||
SLACK_APP_SECRET={CLIENT_SECRET} | ||||
| @ -94,4 +94,4 @@ To create a Twitter application for signing in with you may require a phone numb | |||
APP_URL=http://mybookstackurl.com | ||||
``` | ||||
4. In your slack app go to 'OAuth & Permissions' and enter your BookStack base url into the 'Redirect URL(s)' input then save. | ||||
5. All done! Users should now be able to link their Slack account in their account profile pages and also register/login using their Slack account. | ||||
5. All done! Users should now be able to link their Slack account in their account profile pages and also register/login using their Slack account. | ||||
| |
| @ -11,14 +11,16 @@ BookStack is updated regularly and is still in beta although we do try to keep t | |||
Backup and restore documentation can be found [here](/docs/admin/backup-restore). | ||||
| ||||
Updating is currently done via Git version control. To update BookStack you can run the following command in the root directory of the application: | ||||
``` | ||||
| ||||
```bash | ||||
git pull origin release && composer install && php artisan migrate | ||||
``` | ||||
| ||||
This command will update the repository that was created in the installation, install the PHP dependencies using `composer` then run then update the database with any required changes. | ||||
| ||||
In addition, we recommend clearing the cache after an update - | ||||
In addition, we recommend clearing the cache after an update - | ||||
| ||||
``` | ||||
```bash | ||||
php artisan cache:clear | ||||
php artisan view:clear | ||||
``` | ||||
| |
| @ -31,7 +31,7 @@ After updating these values ensure you restart your webserver and also PHP if us | |||
| ||||
By default NGINX has a limit of 1MB on file uploads. To change this you will need to set the `client_max_body_size` variable. You can do this either in the http block in your `nginx.conf` file or in the server block set up for BookStack. Here's an example of increasing the limit it 10MB in the http block: | ||||
| ||||
``` | ||||
```nginx | ||||
http { | ||||
#... | ||||
client_max_body_size 100m; | ||||
| @ -50,7 +50,7 @@ After updating you NGINX configuration don't forget to restart NGINX. You can te | |||
| ||||
Apache does not have any built-in limits which you will need to change but something to note is that if you are using apache and mod_php with `.htaccess` files enabled you may be able to set the above PHP variables in your `.htaccess` file like so: | ||||
| ||||
``` | ||||
```apache | ||||
php_value upload_max_filesize 10M | ||||
php_value post_max_size 10M | ||||
``` | ||||
``` | ||||
| |
| @ -15,7 +15,7 @@ to support emoji. | |||
| ||||
From v0.17.2, BookStack has a helper command to generate the SQL for this change. Ensure you are on BookStack v0.17.2 or above and then run this command from root BookStack folder: | ||||
| ||||
``` | ||||
```bash | ||||
php artisan bookstack:db-utf8mb4 | ||||
``` | ||||
| ||||
| |
Loading…
Add table
Add a link
Reference in a new issue