From: Dan Brown Date: Sun, 22 Jan 2017 11:42:14 +0000 (+0000) Subject: Got site ready for v0.14 X-Git-Url: http://source.bookstackapp.com/website/commitdiff_plain/3ccaaeb445a93929ca02e3c3bdf5d4fdea8ab164 Got site ready for v0.14 --- diff --git a/.gitattributes b/.gitattributes index 18a14d2..3d64110 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,3 +3,4 @@ *.gif filter=lfs diff=lfs merge=lfs -text *.woff filter=lfs diff=lfs merge=lfs -text *.woff2 filter=lfs diff=lfs merge=lfs -text +*.mp4 filter=lfs diff=lfs merge=lfs -text diff --git a/content/blog/beta-release-v0-14-0.md b/content/blog/beta-release-v0-14-0.md index ab8095a..b5dd27e 100644 --- a/content/blog/beta-release-v0-14-0.md +++ b/content/blog/beta-release-v0-14-0.md @@ -4,7 +4,7 @@ tags = ["Releases"] title = "Beta Release v0.14.0" date = 2017-01-22T17:00:00Z author = "Dan Brown" -image = "https://unsplash.com/photos/ivQeBMYXaTY" +image = "/images/blog-cover-images/logs-sean-tan.jpg" description = "BookStack v0.14 released with multi language support, Page includes and many bugfixes" slug = "beta-release-v0-14-0" draft = false @@ -17,22 +17,26 @@ The first release of 2017 is upon us with v0.14. Since the last release, back in ### Language Support -All of the text used in BookStack has been moved into language-specific text files so different languages can be easily added. Thanks to some awesome members of the community much of BookStack has been translated to Franch and Brazillian Portuguese. There is also partial support for German. A default language can be set at an instance level by setting a `APP_LANG` variable to a specific language code. For example: +All of the text used in BookStack has been moved into language-specific text files so different languages can be easily added. Thanks to some awesome members of the community much of BookStack has been translated to French and Brazillian Portuguese. There is also partial support for German. A default language can be set at an instance level by setting a `APP_LANG` variable to a specific language code. For example: ``` APP_LANG=FR +# OR +APP_LANG=PT_BR ``` In addition to the global language setting, Users can set their own language preference by changing the option found in the 'Edit Profile' screen: -**INSERT IMAGE OF CHANGING LANGUAGE** +![Changing BookStack user language](/images/2017/01/language-selection.png) Obviously this will not translate the content you write in BookStack but it goes a long way to opening up BookStack to non-english speakers. If you're interested in adding a language the [readme.md file](https://github.com/BookStackApp/BookStack#translations) has been updated with some details on how to do this. +Please note that adding language support was quite a large effort so there is likely to be a few areas missing translations. Where there are no language translations english is used as a backup so you may see a mix of english and other languages until this stabilises. + ### Page Include Tags -A commonly request feature was being able to include pages and page content within other pages. This is now possible through the use of page include tags. **INSERT LINK TO DOCS ABOUT INCLUDE TAGS** +A commonly request feature was being able to include pages and page content within other pages. This is now possible through the use of page include tags. Details of this can be [found in the docs here](/docs/user/reusing-page-content/). ### Full List of Features, Changes & Fixes @@ -40,7 +44,7 @@ A commonly request feature was being able to include pages and page content with * French & Brazillian Portuguese languages added (Thanks to [sirgix](https://github.com/BookStackApp/BookStack/pull/274) and [NakaharaL](https://github.com/BookStackApp/BookStack/pull/279)). * Added support for page/page-content includes within other pages. * Added support for using the database to store the cache and session. -* Added option to use WKHTMLtoPDF for improved PDF rendering. +* Added option to use WKHTMLtoPDF for improved PDF rendering. [Details here](/docs/admin/pdf-rendering/). * Added auto-linking in the WYSIWYG editor. * Updated page nav to scale if only smaller headers are used. * Fixed bug causing offset first lines in code blocks when using the markdown editor. @@ -51,7 +55,7 @@ A commonly request feature was being able to include pages and page content with * Increased testing coverage of social authentication methods. * Standardised breadcrumbs across BookStack views. * Refactored entity code and permissions code to be more efficient. -* Updated LDAP config to allow a protocol to be defined which allows use of ldaps connections. +* Updated LDAP config to allow a protocol to be defined which allows use of ldaps connections (Thanks to [fredericmohr](https://github.com/BookStackApp/BookStack/pull/236)). ### Next Steps @@ -59,14 +63,12 @@ For the next release I want to focus some time on making sure BookStack is effic In terms of new features some additional import/export options are much needed so I hope to tackle a few of the outstanding requests for those. -As a longer term idea I've been thinking about making BookStack JavaScript driven to be a VueJS single page application. To voice your opinion on this or to see the advantages/disadvantages you can [view the issue on GtHub here](https://github.com/BookStackApp/BookStack/issues/249). +As a longer term idea I've been thinking about making BookStack JavaScript driven to be a VueJS single page application. To voice your opinion on this or to see the advantages/disadvantages you can [view the issue on GitHub here](https://github.com/BookStackApp/BookStack/issues/249). ### Other Updates As you may have noticed, The BookStack blog, website and docs have recently been updated and are now all stored in the single [BookStackApp/website](https://github.com/BookStackApp/website) repository and it's now generated using the [Hugo](https://gohugo.io/) static site generator. Additionally search has been added to the docs courtesy of [Algolia Docsearch](https://community.algolia.com/docsearch/). -Once again, You can use the form below to sign up to recieve emails when the blog is updated with releases or news. - ---- Header Image Credits: Sean Tan diff --git a/content/docs/admin/cache-session-config.md b/content/docs/admin/cache-session-config.md index 12a0884..846d257 100644 --- a/content/docs/admin/cache-session-config.md +++ b/content/docs/admin/cache-session-config.md @@ -7,6 +7,15 @@ type = "admin-docs" By default BookStack will use a file system cache that's storage in the `storage/framework` folder. This is also used to store user session data. Below are some alternative systems that can be used for caching & sessions. +### Database + +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: + +``` +CACHE_DRIVER=database +SESSION_DRIVER=database +``` + ### 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 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: diff --git a/content/docs/admin/pdf-rendering.mdown b/content/docs/admin/pdf-rendering.mdown new file mode 100644 index 0000000..18755f4 --- /dev/null +++ b/content/docs/admin/pdf-rendering.mdown @@ -0,0 +1,21 @@ ++++ +title = "PDF Rendering" +description = "Using WKHTMLtoPDF to generate PDF's for better rendering" +date = "2017-01-22" +type = "admin-docs" ++++ + +By default BookStack uses [Dompdf](https://github.com/dompdf/dompdf) to export pages as PDF documents. The benefit of using DomPDF is that it doesn't require any additional installation or setup but the rendering capabilities are somewhat limited. + +As an alternative you can use [wkhtmltopdf](http://wkhtmltopdf.org/) to generate PDF documents instead. wkhtmltopdf uses the Qt WebKit rendering engine to provide a more accurate overall result. + +### Using wkhtmltopdf + +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: + +``` +# In .env file +WKHTMLTOPDF=/home/user/bins/wkhtmltopdf +``` + +If neither of those exist Dompdf will be used instead. \ No newline at end of file diff --git a/content/docs/user/reusing-content.md b/content/docs/user/reusing-content.md index 3c0cd2b..9f1ddb3 100644 --- a/content/docs/user/reusing-content.md +++ b/content/docs/user/reusing-content.md @@ -3,20 +3,23 @@ title = "Reusing Page Content" description = "How to use include tags to reuse pages and page content within other pages" date = "2017-01-22" type = "user-docs" +slug = "reusing-page-content" +++ -Within BookStack you may find that you want to include the same block of content in multiple places. You could copy and paste that content into multiple pages but then, if that content need to be changed, you'd have to update it multiple times across different pages. Introduced in BookStack v0.14 is the ability to include other pages and to also include single blocks of content from other pages. +Within BookStack you may find that you want to include the same block of content in multiple places. You could copy and paste that content into multiple pages but then, if that content needs to be changed, you'd have to update it multiple times across different pages. Introduced in BookStack v0.14 is the ability to include other pages and to also include single blocks of content from other pages. + +Note that the include behaviour is non-recursive so including will only work to a single level. This ensures performance and prevents users from breaking pages by creating include loops. ## Include Tags To include the content of a page within another you can used the following syntax: -`{{@}}` or `@{{#}}` +`{{@page_id}}` or `@{{page_id#content_id}}` Here are some examples of this in use: * `{{@5}}` - Include all content from the page with and id of '5'. -* `{{@10#bkmrk-copyright-year}}` - Include the content within the element with an id of `bkmrk-copyright-year` in the page with an id of '10'. +* `{{@10#bkmrk-copyright-year}}` - Include the content within the element of id `bkmrk-copyright-year` in the page with an id of '10'. You simply enter that in the page editor and then, When the page is viewed, the content will be dynamically be fetched. This means you can update the referenced content and it will show the same changes on any page the content is included within. @@ -26,9 +29,7 @@ Finding the id of a page can be difficult so a quick and easy way to find includ View a page with some content you want to re-use. Use your mouse to select some content and you will see a popup appear. By default this contains a direct link to that content. If you click the link icon on the left it will switch to show you the include tag for that content. Simply copy that and place it in another page. Remove the `#` and content id to include the whole content of the page instead of just a single block. -SHOW IMAGE OF POPUP - -TODO: CHECK WHAT HAPPENS WHEN YOU INCLUDE THE CONTENT OF THE SAME PAGE. + ## Forcing Content Id's @@ -40,7 +41,7 @@ Due to the fact ID's can change it's recommended to force ID's on you content: In the WYSIWYG editor you can force an ID by going into the source code view and adding it manually: -TODO: INSERT IMAGE +![Forcing WYSIWYG Ids](/images/docs/user/forcing-wysiwyg-ids.png) #### Markdown Editor @@ -48,9 +49,9 @@ In the markdown editor you can simply insert HTML with an ID to ensure it does n ``` # Old Content -Copyright BookStack enterprises 2017 +Copyright BookStack Enterprises 2017 # Revised with ID - + ``` diff --git a/static/images/2017/01/bookstack-includes-popover.mp4 b/static/images/2017/01/bookstack-includes-popover.mp4 new file mode 100644 index 0000000..d3cfaa9 --- /dev/null +++ b/static/images/2017/01/bookstack-includes-popover.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31eb02a7666edcca4243eadf07bdd0227a1d5a7e5184119a21196f3e9174fc6b +size 176893 diff --git a/static/images/2017/01/language-selection.png b/static/images/2017/01/language-selection.png new file mode 100644 index 0000000..5158a49 --- /dev/null +++ b/static/images/2017/01/language-selection.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbcef13746cf6b4f50ad1d9613d178f93a98c46c446b89c5857b7da58655274c +size 15319 diff --git a/static/images/blog-cover-images/logs-sean-tan.jpg b/static/images/blog-cover-images/logs-sean-tan.jpg new file mode 100644 index 0000000..e7db593 --- /dev/null +++ b/static/images/blog-cover-images/logs-sean-tan.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d70381c1a9000319b9102301ac98d7967b7ea2aa2b351b40ab398d553345d3a +size 300157 diff --git a/static/images/docs/user/forcing-wysiwyg-ids.png b/static/images/docs/user/forcing-wysiwyg-ids.png new file mode 100644 index 0000000..200f450 --- /dev/null +++ b/static/images/docs/user/forcing-wysiwyg-ids.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f34cb586affe03ef6b6edb7e23b9487aa44095ad498826d28105e39cc3c588a +size 81388 diff --git a/themes/bookstack/layouts/_default/single.html b/themes/bookstack/layouts/_default/single.html index 18f507f..fb4b963 100644 --- a/themes/bookstack/layouts/_default/single.html +++ b/themes/bookstack/layouts/_default/single.html @@ -5,7 +5,12 @@
-

User Documentation

+ {{ if eq .Type "admin-docs" }} +

Admin Documentation

+ {{end}} + {{ if eq .Type "user-docs" }} +

User Documentation

+ {{end}}
diff --git a/themes/bookstack/layouts/partials/menu_admin_docs.html b/themes/bookstack/layouts/partials/menu_admin_docs.html index 5d23781..1dd5f36 100644 --- a/themes/bookstack/layouts/partials/menu_admin_docs.html +++ b/themes/bookstack/layouts/partials/menu_admin_docs.html @@ -19,4 +19,5 @@
  • Caching & Sessions
  • Social Authentication
  • LDAP Authentication
  • +
  • PDF Rendering
  • \ No newline at end of file diff --git a/themes/bookstack/layouts/partials/menu_user_docs.html b/themes/bookstack/layouts/partials/menu_user_docs.html index c009530..c7d9cc1 100644 --- a/themes/bookstack/layouts/partials/menu_user_docs.html +++ b/themes/bookstack/layouts/partials/menu_user_docs.html @@ -4,3 +4,7 @@
  • Content Overview
  • Organising Content
  • +

    Advanced Features

    + \ No newline at end of file diff --git a/themes/bookstack/sass/_text.scss b/themes/bookstack/sass/_text.scss index 75a0539..448056a 100644 --- a/themes/bookstack/sass/_text.scss +++ b/themes/bookstack/sass/_text.scss @@ -69,8 +69,7 @@ h1, h2, h3, h4 { position: relative; display: block; color: #555; - .subheader { - display: block; + .subheader, small { font-size: 0.5em; line-height: 1em; color: lighten($text-dark, 16%); diff --git a/themes/bookstack/sass/styles.scss b/themes/bookstack/sass/styles.scss index 0b3cd72..5ee314d 100644 --- a/themes/bookstack/sass/styles.scss +++ b/themes/bookstack/sass/styles.scss @@ -91,7 +91,7 @@ header #menu-button { @include smaller-than($xl) { body header { - padding-top: $-xxl*2.2; + padding-top: $-xxl*1.7; } header .row.fix-mobile { top: 0; @@ -239,10 +239,16 @@ input[type=text] { fill: $primary; } } - img { + img, video { border: 1px solid $primary; border-radius: 3px; } + video { + cursor: pointer; + margin: $-l auto; + display: block; + max-width: 100%; + } } .sidebar, .docs-index { diff --git a/themes/bookstack/static/js/script.js b/themes/bookstack/static/js/script.js index 41f365f..e5c7d2f 100644 --- a/themes/bookstack/static/js/script.js +++ b/themes/bookstack/static/js/script.js @@ -18,4 +18,16 @@ menuButton.onclick = function(event) { document.body.onclick = function(event) { menuDropDown.className = menuDropDown.className.replace('showing', ''); event.stopPropagation(); -}; \ No newline at end of file +}; + + +// Handle video click to play +let videos = document.querySelectorAll('video'); +for (var i = 0; i < videos.length; i++) { + videos[i].addEventListener('click', videoClick) +} + +function videoClick() { + if (typeof InstallTrigger !== 'undefined') return; + this.paused ? this.play() : this.pause(); +} \ No newline at end of file