From 425fcf4d42a05c6498a87b6eab741d5ba503b53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Pito=C5=84?= Date: Wed, 25 Jan 2017 22:55:18 +0100 Subject: [PATCH] gitbook config --- .gitignore | 5 +++-- book.json | 11 +++++++++++ docs/SUMMARY.md | 4 +++- docs/SetupMaintenance.md | 27 +++++++++++++++------------ docs/UpgradingFrom05.md | 4 ++-- 5 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 book.json diff --git a/.gitignore b/.gitignore index 58157b03ec..ddbca9b9a8 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ var/ *.egg-info/ .installed.cfg *.egg +node_modules/ # OS stuff .DS_Store @@ -58,8 +59,8 @@ flake8.txt /media/ /testproject/ -# Sphinx documentation -docs/_build/ +# GitBook Documentation +_book/ # Local development stuff dev/ diff --git a/book.json b/book.json new file mode 100644 index 0000000000..8b013a0af7 --- /dev/null +++ b/book.json @@ -0,0 +1,11 @@ +{ + "gitbook": "3.2.2", + "title": "Misago", + "plugins": ["github", "anchorjs"], + "pluginsConfig": { + "github": { + "url": "https://github.com/rafalp/Misago/" + } + }, + "root": "./docs" +} \ No newline at end of file diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 6a3d838fa0..074b6d994f 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -4,4 +4,6 @@ * [Setup and Maintenance](./SetupMaintenance.md) * [Upgrading from Misago 0.5](./UpgradingFrom05.md) * [References](./ref/README.md) - * [Settings](./ref/Settings.md) \ No newline at end of file + * [Settings](./ref/settings/README.md) + * [Core settings](./ref/settings/Core.md) + * [Database settings](./ref/settings/Database.md) \ No newline at end of file diff --git a/docs/SetupMaintenance.md b/docs/SetupMaintenance.md index 6031a2f822..547336158e 100644 --- a/docs/SetupMaintenance.md +++ b/docs/SetupMaintenance.md @@ -27,15 +27,15 @@ Speaking of shared servers, ability to download, compile and run software from i ### Setup -To install Misago setup and activate virtual environment for your site and then fire following command:: +To install Misago setup and activate virtual environment for your site and then fire following command: pip install misago --pre -This will install Misago in your virtual environment and make "misago-start.py" script available for you to use to create pre-configured Misago site. +This will install Misago in your virtual environment and make `misago-start.py` script available for you to use to create pre-configured Misago site. Now decide on your site's module name. This name will be used for python module that will contain your configuration files. This means it should be only latin lowercase letters and (optionally) digits or underscore sign ("_"). Good idea is to use your domain name as source for project namespace, for example turning "misago-forum.org" into "misagoforumorg". -Once you've decided on your name, create your site configuration module. In example we assume your site will be named "misagoforumorg":: +Once you've decided on your name, create your site configuration module. In example we assume your site will be named "misagoforumorg": misago-start.py misagoforumorg @@ -57,28 +57,31 @@ This will create directory "misagoforumorg" in your working directory. Inside yo We will get to ``misagoforumorg`` in a minute, but before that lets spend few more moments in our current location. -This directory has special purpose. It serves as "container" for your customizations for Misago. If you want to install extension or plugin that has no "setup.py" of its own or use custom styles or templates on your site, you will put them there, making them easily accessible for your Misago installation. +This directory has special purpose. It serves as "container" for your customizations for Misago. If you want to install extension or plugin that has no `setup.py` of its own or use custom styles or templates on your site, you will put them there, making them easily accessible for your Misago installation. -Let's go deeper. Change your current directory to "misagoforumorg". By default this directory will contain four files: "__init__.py", thats special file that tells python this directory is python package, "settings.py" that contains all low-level settings of your site, "urls.py" that tells your forum about links on your site and finally "wsgi.py", thats special file servers use to understand and talk with your application. Unless you are building entire site around your forum, you can ignore "urls.py". +Let's go deeper. Change your current directory to "misagoforumorg". By default this directory will contain four files: `__init__.py`, thats special file that tells python this directory is python package, `settings.py` that contains all low-level settings of your site, `urls.py` that tells your forum about links on your site and finally `wsgi.py`, thats special file servers use to understand and talk with your application. Unless you are building entire site around your forum, you can ignore `urls.py`. -Open "settings.py" in your code editor of choice and give a look in values listed here. Each value is accompanied by commentary explaining its purpose. See if any tuning is needed, then save your changes and leave editor. +Open `settings.py` in your code editor of choice and give a look in values listed here. Each value is accompanied by commentary explaining its purpose. See if any tuning is needed, then save your changes and leave editor. -.. note:: - To simplify setup process, by default "settings.py" file contains only most basic settings that are needed for your site to run, with everything else being set for you automatically at the beginning of file. -Move back to directory with manage.py and use it to initialize Misago database by firing migrate:: +##### Note + +To simplify setup process, by default `settings.py` file contains only most basic settings that are needed for your site to run, with everything else being set for you automatically at the beginning of file. + + +Move back to directory with manage.py and use it to initialize Misago database by firing migrate: python manage.py migrate -Next, call createsuperuser command to create super admin in database:: +Next, call createsuperuser command to create super admin in database: python manage.py createsuperuser -Finally, start development server using "runserver" command:: +Finally, start development server using "runserver" command: python manage.py runserver -If server starts, you should be able to visit 127.0.0.1:8000 in your browser and see forum index, however as work on project is underway revisions may frequently introduce changes that will break runserver. +If server starts, you should be able to visit `http://127.0.0.1:8000` in your browser and see forum index, however as work on project is underway revisions may frequently introduce changes that will break runserver. ### Deployment diff --git a/docs/UpgradingFrom05.md b/docs/UpgradingFrom05.md index b31670626d..671bc10b74 100644 --- a/docs/UpgradingFrom05.md +++ b/docs/UpgradingFrom05.md @@ -59,7 +59,7 @@ To move configuration over to new forum, run `python manage.py movesettings` com #### Note: -Some settings have been moved from admin to configuration file or removed. Those will not be migrated. Please consult the [reference](/docs/ref/Settings.md) for available settings that you will need to add yourself. +Some settings have been moved from admin to configuration file or removed. Those will not be migrated. Please consult the [reference](./ref/settings/README.md) for available settings that you will need to add yourself. ## Moving users @@ -106,7 +106,7 @@ To enable this feature you'll need to insert new url in your forum's `urls.py`, # insert below line above url with namespace='misago' url(r'^', include('misago.datamover.urls')), url(r'^', include('misago.urls', namespace='misago')), - + # ...rest of entries ] ```