From 19917634cfa553dedec75c0fd07438b89f0ed4ee Mon Sep 17 00:00:00 2001 From: Harm Vos Date: Tue, 23 May 2017 11:12:54 +0200 Subject: [PATCH] little changes --- docs/index.rst | 175 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 136 insertions(+), 39 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 06e5fcf..d68db05 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,51 +1,148 @@ -================================================= -Webhosting -================================================= - -.. image:: screenshot.png +webhosting +=================== +[TOC] -This Docker image will create simple Documentation base on [Sphinx Read The Docs Theme](https://github.com/snide/sphinx_rtd_theme) as you've seen from [ReadTheDocs.org](https://readthedocs.org). You can mount your docs source to this image, or you can pull from your public and/or private github. +---------- + +default +------------- + +#### Info + +A standard webhosting + +ssh +------------- + +#### Server address + +The server is located at ssh.webhosting.rug.nl the default port = 22 -## Mounting Docs -Mount your volume to '/root/docs_source' and it will automatically be generated on startup. -```bash -docker run -it -v /var/mydocs:/root/docs_source -p 80:80 hunterlong/read_the_docs_nginx +#### Web based + +There is also webbased access to the ssh / home drive. +https://ssh.webhosting.rug.nl + +> **NEEDS:** Check out the [Two factor authentication](#Two-Factor-authentication) section for the needed setup. + +#### Tunnel + +You can rename the current document by clicking the document title in the navigation bar. + +#### Two Factor authentication + +You can delete the current document by clicking **Delete document** in the document panel. + +#### Tips + +You can save the current document to a file by clicking **Export to disk** from the menu panel. + +> **Tip:** Check out the [ Publish a document](#publish-a-document) section for a description of the different output formats. + + +---------- + + +MySQL +------------------- + +StackEdit can be combined with **Google Drive** and **Dropbox** to have your documents saved in the *Cloud*. The synchronization mechanism takes care of uploading your modifications or downloading the latest version of your documents. + +> **Note:** + +> - Full access to **Google Drive** or **Dropbox** is required to be able to import any document in StackEdit. Permission restrictions can be configured in the settings. +> - Imported documents are downloaded in your browser and are not transmitted to a server. +> - If you experience problems saving your documents on Google Drive, check and optionally disable browser extensions, such as Disconnect. + + + +> **Note:** The button is disabled when you have no document to synchronize. + +#### Manage document synchronization + +Since one document can be synchronized with multiple locations, you can list and manage synchronized locations by clicking **Manage synchronization** in the **Synchronize** sub-menu. This will let you remove synchronization locations that are associated to your document. + +> **Note:** If you delete the file from **Google Drive** or from **Dropbox**, the document will no longer be synchronized with that location. + +---------- + + +Php settings +------------- + +Once you are happy with your document, you can publish it on different websites directly from StackEdit. As for now, StackEdit can publish on **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **Tumblr**, **WordPress** and on any SSH server. + +#### Publish a document + +You can publish your document by opening the **Publish** sub-menu and by choosing a website. In the dialog box, you can choose the publication format: + +- Markdown, to publish the Markdown text on a website that can interpret it (**GitHub** for instance), +- HTML, to publish the document converted into HTML (on a blog for example), +- Template, to have a full control of the output. + +> **Note:** The default template is a simple webpage wrapping your document in HTML format. You can customize it in the **Advanced** tab of the **Settings** dialog. + + + +---------- + + +Docker +-------------------- + +StackEdit supports **Markdown Extra**, which extends **Markdown** syntax with some nice features. + +> **Tip:** You can disable any **Markdown Extra** feature in the **Extensions** tab of the **Settings** dialog. + +> **Note:** You can find more information about **Markdown** syntax [here][2] and **Markdown Extra** extension [here][3]. + + +### Tables + + +### Fenced code blocks + +GitHub's fenced code blocks are also supported with **Highlight.js** syntax highlighting: + +``` +// Foo +var bar = 0; ``` -## Docs From Public Github Repo -'DOCS_FOLDER' should equal the folder inside the repo that holds the documentation (*.rst). You can remove this if the repo is just the documentation. -```bash -docker run -it -p 80:80 \ - -e "GITHUB_REPO=hunterlong/read_the_docs_nginx" \ - -e "GIT_BRANCH=master" \ - -e "DOCS_FOLDER=docs" \ - hunterlong/read_the_docs_nginx +> **Tip:** To use **Prettify** instead of **Highlight.js**, just configure the **Markdown Extra** extension in the **Settings** dialog. + +> **Note:** You can find more information: + +> - about **Prettify** syntax highlighting [here][5], +> - about **Highlight.js** syntax highlighting [here][6]. + + + +### UML diagrams + +You can also render sequence diagrams like this: + +```sequence +Alice->Bob: Hello Bob, how are you? +Note right of Bob: Bob thinks +Bob-->Alice: I am good thanks! ``` -## Docs From Private Github Repo -You can generate a Personal Token from Github. [https://help.github.com/articles/creating-an-access-token-for-command-line-use/](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) -```bash -docker run -it -p 80:80 \ - -e "GITHUB_REPO=hunterlong/read_the_docs_nginx" \ - -e "GIT_BRANCH=master" \ - -e "GIT_USERNAME=mygithubuser" \ - -e "GIT_PERSONAL_TOKEN=h7d9ka82ihjd929jd38hfhaiqnc" \ - -e "GIT_BRANCH=master" \ - -e "DOCS_FOLDER=docs" \ - hunterlong/read_the_docs_nginx +And flow charts like this: + +```flow +st=>start: Start +e=>end +op=>operation: My Operation +cond=>condition: Yes or No? + +st->op->cond +cond(yes)->e +cond(no)->op ``` -## Custom Spinx Build Config -Inside the directory of the docs, you should have a file [conf.py](https://github.com/hunterlong/read_the_docs_nginx/blob/master/docs/conf.py). You must include the file included or change file to your own. In this config file, you change docs Name, Version, and more settings. +> **Note:** You can find more information: -## Custom Nginx Config -If you'd like to edit the Nginx Config file for hosting the docs, checkout [conf/nginx/webapp.conf](https://github.com/hunterlong/read_the_docs_nginx/blob/master/conf/nginx/app.conf). If your github repo has folder 'conf/nginx' it will look for app.conf. It will be automatically copied from the github repo into Nginx. -You can also mount your config like so: -```bash -docker run -it -v /var/mydocs:/root/docs_source \ - -v /etc/mynginx/vhost.conf:/etc/nginx/sites-enabled/webapp.conf \ - -p 80:80 hunterlong/read_the_docs_nginx -``` \ No newline at end of file