]> BookStack Code Mirror - website/commitdiff
Added redis docs & moved edit page button
authorDan Brown <redacted>
Sun, 18 Sep 2016 19:23:33 +0000 (20:23 +0100)
committerDan Brown <redacted>
Sun, 18 Sep 2016 19:23:33 +0000 (20:23 +0100)
Closes #3

resources/docs/admin/cache-session-config.md
resources/sass/_header.scss
resources/sass/styles.scss
resources/views/docs/admin.blade.php
resources/views/docs/user.blade.php

index 576a9541afcb08b30997fee80d88ca0cf316cb1e..79cd69e0ff0f73f54a1a15a2d1007eecd83b39e7 100644 (file)
@@ -4,7 +4,7 @@ By default BookStack will use a file system cache that's storage in the `storage
 
 ### Memcached
 
 
 ### Memcached
 
-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 you 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:
+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:
 
 ```
 # Set both the cache and session to use memcached
 
 ```
 # Set both the cache and session to use memcached
@@ -17,3 +17,24 @@ MEMCACHED_SERVERS=127.0.0.1:11211:100
 # Example of using two non-local memcached servers with an equal split
 MEMCACHED_SERVERS=8.8.8.8:11211:50,8.8.4.4:11211:50
 ```
 # Example of using two non-local memcached servers with an equal split
 MEMCACHED_SERVERS=8.8.8.8:11211:50,8.8.4.4:11211:50
 ```
+
+### Redis
+
+To use Redis 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 `redis`. You will need to add a variable to specify your Redis servers. To do this add a variable named `REDIS_SERVERS` to the `.env` file and set the value to point at your Redis servers in the following format: `HOST:PORT:DATABASE,HOST2:PORT:DATABASE`. The default values for each host are `127.0.0.1:6379:0`. You can list as many servers as you like.  
+
+To specify if you would like to cluster you Redis servers create a `REDIS_CLUSTER` key in the `.env` file and set it to `true`. This option, if set to true, will instruct the built-in Redis client to perform client-side sharding across your Redis nodes, allowing them to pool together for a large amount of RAM. This disadvantage of this it that it does not allow for fail-over.
+
+Here's an example of setting the Redis configuration:
+
+```
+# Set both the cache and session to use Redis
+CACHE_DRIVER=redis
+SESSION_DRIVER=redis
+
+# Example of using a single local Redis server
+REDIS_SERVERS=127.0.0.1:6379:0
+
+# Example of using two non-local Redis servers clustered together
+REDIS_SERVERS=8.8.8.8:6379:0,8.8.4.4:6379:0
+REDIS_CLUSTER=true
+```
index 968f20f77efd26563aada726ec6712f7d4c9419a..0284aa27c1591e6a56a587abc7ec0878f30ff24f 100644 (file)
@@ -33,9 +33,7 @@ header {
     font-weight: 300;
   }
   .icon svg {
     font-weight: 300;
   }
   .icon svg {
-    fill: #FFF;
-    height: 18px;
-    margin-top: 3px;
+    fill: #FFF
   }
 }
 
   }
 }
 
index 57e86c932dc80456a353e14c55a5014b7bad3497..0be6d5efd44405fe0c948b34cd2efe210776326f 100644 (file)
@@ -53,15 +53,19 @@ header .menu, footer .menu {
   a {
     display: inline-block;
     padding: $-m;
   a {
     display: inline-block;
     padding: $-m;
-    line-height: 1.9;
+    line-height: 1.9
   }
   span.icon {
   }
   span.icon {
-    font-size: 18px;
+    font-size: 16px;
     vertical-align: top;
     padding-right: 4px;
     display: inline-block;
     position: relative;
     top: 2px;
     vertical-align: top;
     padding-right: 4px;
     display: inline-block;
     position: relative;
     top: 2px;
+    svg {
+      height: 18px;
+      margin-top: 3px;
+    }
   }
 }
 
   }
 }
 
@@ -199,18 +203,34 @@ input[type=text] {
 .docs-content {
   padding-bottom: $-xxl;
   .edit-link {
 .docs-content {
   padding-bottom: $-xxl;
   .edit-link {
-    padding: $-xl 0;
+    margin-top: $-xxl;
+    display: inline-block;
+    padding: $-s $-xl;
+    border-radius: 24px;
     z-index: 1;
     position: relative;
     z-index: 1;
     position: relative;
+    border: 2px solid #DDD;
+    color: #888;
+    transition: all ease-in-out 120ms;
     .icon {
       width: 24px;
       vertical-align: 4px;
     }
     svg {
     .icon {
       width: 24px;
       vertical-align: 4px;
     }
     svg {
+      transition: all ease-in-out 120ms;
+      fill: #888;
       height: 18px;
       width: 20px;
     }
   }
       height: 18px;
       width: 20px;
     }
   }
+  .edit-link:hover {
+    border-color: $primary;
+    color: $primary;
+    text-decoration: none;
+    svg {
+      fill: $primary;
+    }
+  }
 }
 
 .sidebar, .docs-index {
 }
 
 .sidebar, .docs-index {
@@ -236,4 +256,3 @@ h2.thin-margin {
 #content {
   min-height: 70vh;
 }
 #content {
   min-height: 70vh;
 }
-
index 51e1e0baa64eee73e6b7b2991ac0be402481074e..c9436de5aa31f6826d2ddeb51b62b488bf049c58 100644 (file)
 
 <div class="container">
 
 
 <div class="container">
 
-       <div class="col-sm-2 sidebar">
-               @include('docs/admin-sidebar')
-       </div>
+       <div class="row">
+               <div class="col-sm-2 sidebar">
+                       @include('docs/admin-sidebar')
+               </div>
 
 
-       <div class="col-sm-8 col-sm-offset-1 docs-content">
-               <a class="float right edit-link" target="_blank"
-                  href="https://github.com/BookStackApp/website/blob/master/resources/docs/{{ $type }}/{{ $page }}.md">
-                       <span class="icon small">{!! icon('edit') !!}</span>
-                       Edit page
-               </a>
-               {!! $html !!}
+               <div class="col-sm-8 col-sm-offset-1 docs-content">
+                       {!! $html !!}
+
+                       <div class="text-center">
+                               <a class="edit-link" target="_blank"
+                                        href="https://github.com/BookStackApp/website/blob/master/resources/docs/{{ $type }}/{{ $page }}.md">
+                                       <span class="icon small">{!! icon('edit') !!}</span>
+                                       Edit this Page
+                               </a>
+                       </div>
+
+               </div>
        </div>
 
 </div>
        </div>
 
 </div>
index 709b3533a16873b66ea51df2bd0cda72874aa424..8d1d050585c0104b73fc3084f186e2dca2159bde 100644 (file)
 
 <div class="container">
 
 
 <div class="container">
 
-       <div class="col-sm-2 sidebar">
-               @include('docs/user-sidebar')
-       </div>
+       <div class="row">
+               <div class="col-sm-2 sidebar">
+                       @include('docs/user-sidebar')
+               </div>
 
 
-       <div class="col-sm-8 col-sm-offset-1 docs-content">
-               <a class="float right edit-link" target="_blank"
-                  href="https://github.com/BookStackApp/website/blob/master/resources/docs/{{ $type }}/{{ $page }}.md">
-                       <span class="icon small">{!! icon('edit') !!}</span>
-                       Edit this page
-               </a>
-               {!! $html !!}
+               <div class="col-sm-8 col-sm-offset-1 docs-content">
+                       {!! $html !!}
+
+                       <div class="text-center">
+                               <a class="edit-link" target="_blank"
+                                        href="https://github.com/BookStackApp/website/blob/master/resources/docs/{{ $type }}/{{ $page }}.md">
+                                       <span class="icon small">{!! icon('edit') !!}</span>
+                                       Edit this Page
+                               </a>
+                       </div>
+
+               </div>
        </div>
 
 </div>
        </div>
 
 </div>