From ba13438d58f61837e7ae4e79b41bc381e97c3343 Mon Sep 17 00:00:00 2001 From: elektrischerwalfisch Date: Tue, 15 Apr 2025 11:01:32 +0200 Subject: [PATCH] edit content --- README.md | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index acbbba0..b832b45 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ - Lightweight and fast - Easy-to-edit content, just Markdown files - Just requires basic php, no database or build-steps needed -- Supports **single-language** and **multi-language** setups - Auto-parses **Markdown** to HTML using [Parsedown](https://parsedown.org/) +- Supports **single-language** and **multi-language** setups - **Meta information** for title, description, and robots meta tag for each site - Provides simple **Shortcodes** to arrange and style your content (e.g. columns, different backgrounds) - Basic, responsive **Theme** which you can customize and enhance @@ -39,7 +39,7 @@ FlatMark dynamically converts Markdown files in the folder `/pages` (or `/pages- │── README.md # Documentation ## Installation -1. **Download** the latest release of flatMark which contains a simple example-page +1. **Download** the [latest release](https://github.com/elektrischerwalfisch/flatmark/releases/latest) of flatMark which contains a simple example-page 2. **Upload** the files to your web server. 3. **Configuration** choose between single or multilanguage-setup in `index.php` (default: multi-language) 4. **Edit content** inside `/pages` (or `/pages-XX` for multilingual sites). @@ -50,18 +50,29 @@ FlatMark dynamically converts Markdown files in the folder `/pages` (or `/pages- - Apache/Nginx with mod_rewrite enabled ## Configuration -Set up **single** or **multi-language setup** in `index.php`: +The default-configuration is for the languages English(en) and German(de). +If this is already what you want, you do not have to change anything and you can delete the file `config-basic.php` as it is only needed for the single-language setup. + +**Multi language setup (default)** +The automatic language-redirection is described with the default-setup with folders for Engish and German pages: +When the website is opened in a browser with German language-settings, the request is automatically redirected to the pages in the folder `/pages-de`. All requests with brower-settings in other languages than german, are redirected to the pages in the folder `/pages-en` (default-language). + +- You can edit the languages of your website in the file `config-multilang.php` by editing the language-codes in this line: `$supportedLanguages = ['en', 'de'];` The first language-code acts as the default-language ('en' in this case). +- **Add language** (example): +If you want to add French, change $supportedLanguages to `$supportedLanguages = ['en', 'de', 'fr'];` and add the folder `/pages-fr` for the French pages. +- **Remove language** (example): +If you want to remove German, change $supportedLanguages to `$supportedLanguages = ['en', 'fr'];` and remove the folder `/pages-de` for the German pages. + -```php -// Default: multilingual setup -// If your site is a single-language setup, -// change 'config-multilang.php' to 'config-basic.php' in the next line -require 'config-multilang.php'; -``` -After that you can also delete the config-file which you are not using - only one of the two config-files is needed. +**Single language setup** +- If you only want a website with a single language, open `index.php` and change the line `require 'config-multilang.php';` to `require 'config-basic.php';` +- Delete the file `config-multilang.php` as it is only needed for the multi-language setup. +- Rename the folder `/pages-en` to `/pages` and delete the folder `/pages-de` +- Open the file `config-basic.php` and define the language of your website by editing the language-code in this line: `$lang = 'de';` ('de' stands for German this case) -## Defaults: Header, Footer, Homepage, 404-page +Find all available language-codes here: [HTML Language Code Reference](https://www.w3schools.com/tags/ref_language_codes.asp) +## Defaults Each pages-folder must contain at least these files for the website to function: - 01-header.md @@ -129,11 +140,10 @@ Even if flatMark itself does not provide that, you might already have resources Your webhoster might already provide a seperate WebFTP-Login with a build-in Text-editor. Example: [all-inkl webftp](https://webftp.all-inkl.com/) - **Nextcloud** -If your are using Nextcloud and the default-plugin "External Storage", you can use that to acces your flatMark-Installation via FTP. For Markdown-files Nextcloud even provides a WYSIWYG-Editor by default. +If your are using Nextcloud and the default-plugin "External Storage", you can use that to access your flatMark-Installation via FTP. For Markdown-files Nextcloud even provides a WYSIWYG-Editor by default. Website: [Nextcloud](https://nextcloud.com/) - **Tinyfilemanager** -If you do not have none of the options above, you still can install this simple file-manager which is actually just one single php-file. Just upload it to the root-folder of your flatMark-Installation and acces it via your browser! -(Do not forget to change the password in that file before you upload it) +If you do not have none of the options above, you still can install this simple file-manager which is actually just one single php-file. Just upload it to the root-folder of your flatMark-Installation and access it via your browser! (Do not forget to change the password in that file before you upload it) Website: [tinyfilemanager](https://tinyfilemanager.github.io/) These are only 3 options how you can access your flatMark-Installation, but there might be more. -- 2.47.3