diff --git a/README.md b/README.md index 758d292..27471cd 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Build a release zip: 1. Build the project (see above). 2. Copy the contents of the `dist` directory to your webspace. 3. Create a `config.xml` (copy and adjust the example). -4. Give write permissions to the server for directories `articles` and `data`. +4. Give write permissions to the server for the directory `data` (including subdirectories and files). diff --git a/src/Gruntfile.js b/src/Gruntfile.js index 92fed84..1126077 100644 --- a/src/Gruntfile.js +++ b/src/Gruntfile.js @@ -39,10 +39,9 @@ module.exports = function (grunt) { files: [ { src: '.htaccess', dest: dist + '/' }, { expand: true, src: '*.php', dest: dist + '/' }, - { expand: true, src: 'articles/**', dest: dist + '/' }, - { src: 'data/dummy.txt', dest: dist + '/' }, { expand: true, src: 'client/img/**', dest: dist + '/' }, { expand: true, src: 'client/libs/prism/components/*.min.js', dest: dist + '/' }, + { expand: true, src: 'data/articles/**', dest: dist + '/' }, { expand: true, src: 'server/**', dest: dist + '/' } ] } @@ -86,7 +85,7 @@ module.exports = function (grunt) { { expand: true, cwd: dist, - src: [ '.htaccess', 'config-example.php', 'index.php', 'articles/**', 'client/**', 'data/dummy.txt', 'server/**' ], + src: [ '.htaccess', 'config-example.php', 'index.php', 'client/**', 'data/articles/**', 'server/**' ], dest: 'slim-wiki/' } ] diff --git a/src/articles/cheat_sheets/Markdown_cheat_sheet.md b/src/data/articles/cheat_sheets/Markdown_cheat_sheet.md similarity index 100% rename from src/articles/cheat_sheets/Markdown_cheat_sheet.md rename to src/data/articles/cheat_sheets/Markdown_cheat_sheet.md diff --git a/src/articles/cheat_sheets/index.md b/src/data/articles/cheat_sheets/index.md similarity index 100% rename from src/articles/cheat_sheets/index.md rename to src/data/articles/cheat_sheets/index.md diff --git a/src/articles/index.md b/src/data/articles/index.md similarity index 92% rename from src/articles/index.md rename to src/data/articles/index.md index 417c7f3..3e5585c 100644 --- a/src/articles/index.md +++ b/src/data/articles/index.md @@ -23,10 +23,10 @@ Requirements: Installation: -1. [Download](https://github.com/til-schneider/slim-wiki/releases/latest) the latest version. -2. Extract the archive and put the contents on your webspace. +1. [Download](https://github.com/til-schneider/slim-wiki/releases/latest) the latest `slim-wiki.zip`. +2. Extract the zip and put the contents on your webspace. 3. Create a `config.xml` (copy and adjust the example). -4. Give write permissions to the server for directories `articles` and `data`. +4. Give write permissions to the server for the directory `data` (including subdirectories and files). diff --git a/src/data/dummy.txt b/src/data/dummy.txt deleted file mode 100644 index c938cd8..0000000 --- a/src/data/dummy.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a dummy used to add the data directory to git. -You can delete this file. diff --git a/src/server/logic/Context.php b/src/server/logic/Context.php index a819fd0..439a1a8 100644 --- a/src/server/logic/Context.php +++ b/src/server/logic/Context.php @@ -15,8 +15,8 @@ class Context { public function __construct() { $appBaseDir = realpath(__DIR__ . '/../../'); - $this->articleBaseDir = $appBaseDir . '/articles/'; $this->dataBaseDir = $appBaseDir . '/data/'; + $this->articleBaseDir = $this->dataBaseDir . 'articles/'; } public function getConfig() {