]> skyeroc.xyz Git - flatmark/commitdiff
edit readme
authorelektrischerwalfisch <mail@elektrischerwalfisch.de>
Fri, 11 Apr 2025 09:10:07 +0000 (11:10 +0200)
committerelektrischerwalfisch <mail@elektrischerwalfisch.de>
Fri, 11 Apr 2025 09:10:07 +0000 (11:10 +0200)
README.md
TODO.md
index.php
pages-en/README.md [new file with mode: 0644]

index 27335b9793fcc3a44e5a7cdd124011f9328eb903..59ef699cef0339ce0485f08fe04af8d29f84082f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,45 +3,77 @@
 *A lightweight, flat-file Markdown-based site generator with optional multilingual support.*
 
 ## Features  
-✅ Simple, no database required – just Markdown files  
-✅ Supports **single** and **multi-language** setups  
-✅ Auto-parses **Markdown** to HTML using [Parsedown](https://parsedown.org/)  
-✅ Easy-to-edit content, just upload `.md` files  
-✅ **Custom meta fields** for title, description, and robots meta tag  
-✅ Customizable with your own **themes and styles**  
-✅ Lightweight and fast  
+- Lightweight and fast
+- Easy-to-edit content, just Markdown files  
+- Just requires basic php, no database needed
+- Supports **single-language** and **multi-language** setups  
+- Auto-parses **Markdown** to HTML using [Parsedown](https://parsedown.org/)  
+- **Custom meta fields** 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 **Theme** which you can customize and enhance  
 
 ## How It Works  
-FlatMark dynamically converts Markdown files in the `/pages` folder into HTML pages.  
-- In **single-language mode**, pages are stored in `/pages/`.  
-- In **multi-language mode**, each language has its own folder, e.g., `/pages-en/`, `/pages-de/`.  
+FlatMark dynamically converts Markdown files in the folder `/pages` (or `/pages-XX` for multilingual sites) into HTML pages.  
 
 ### URL Structure  
 
-| Mode            | Example URL  | Maps to File          |
-|----------------|-------------|-----------------------|
-| Single Language | `/about`    | `/pages/about.md`    |
-| Multi-Language | `/en/about` | `/pages-en/about.md` |
+| Setup           | Example URL | Maps to File          |
+|-----------------|-------------|-----------------------|
+| Single Language | `/about`    | `/pages/about.md`     |
+| Multi-Language  | `/en/about` | `/pages-en/about.md`  |
 
-## Installation  
-1. **Upload** the files to your web server.  
-2. **Edit content** inside `/pages` (or `/pages-XX` for multilingual sites).  
-3. Done! Your site is ready.  
+### Folder Structure
 
-### Requirements  
+    /flatmark/
+    │── /files/                 # Files (images, pdfs etc.)
+    │── /pages-en/              # English pages
+    │── /pages-de/              # German pages
+    │── /theme/                 # Styles, assets and templates of the theme
+    │── config-basic.php        # Single-language setup
+    │── config-multilang.php    # Multi-language setup
+    │── index.php               # Main file
+    │── .htaccess               # URL rewriting
+    │── README.md               # Documentation
+
+
+## Requirements  
 - PHP 7.4+  
-- Apache/Nginx with mod_rewrite enabled  
+- Apache/Nginx with mod_rewrite enabled 
+
+## Installation  
+1. **Download** the latest release 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).  
+5. Done! Your site is ready.  
 
 ## Configuration  
-Set up **single** or **multi-language mode** in `index.php`:  
+Set up **single** or **multi-language setup** in `index.php`:  
 
 ```php
-$multilingual = true; // Set to false for single-language mode
-require $multilingual ? 'config-multilang.php' : 'config-basic.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.
 
+## Defaults: Header, Footer, Homepage, 404-page
 
-## Meta Information (Title, Description & Robots)
+Each pages-folder must contain at least these files for the website to function:  
+
+- 01-header.md  
+Edit this file to change logo, title, subtitle of the website and the main menu. The main-menu must be a list of links to function correctly. You also have the option to add further elements like contact-details or a language-menu by wrapping them in the shortcode `{extras}` `{/extra}`. 
+
+- 02-footer.md  
+Edit this file to change the text in the footer and the footer-menu. The footer-menu must also be a list of links to function correctly. The shortcode `{year}` will display the current year. 
+
+- home.md  
+This file is the default startpoint of your website.   
+
+- 404.md  
+Edit this file to change the error-message which is shown if a page is not found. 
 
+
+## Meta Information (Title, Description & Robots)
 Each Markdown page can include optional meta information using HTML comments at the top of the file.
 These values will be automatically extracted and used in the <head> section of the generated HTML page.
 
@@ -55,25 +87,33 @@ Example Markdown file (about.md) with meta information:
 
     We are committed to providing the best services...
 
-- title → Sets the <title> of the page. Defaults to the filename if not provided.
-- description → Used for the <meta name="description"> tag. Defaults to an empty string if not set.
+- title → Sets the `<title>` of the page. Defaults to the filename if not provided.
+- description → Used for the `<meta name="description">` tag (important for SEO). Defaults to an empty string if not set.
 - robots → Controls search engine indexing (index, follow / noindex, nofollow). Defaults to index, follow.
 
-### Folder Structure
+## Shortcodes
+flatMark supports simple shortcodes for structured content. Some examples:
 
-    /flatmark/
-    │── /pages-en/         # English pages
-    │── /pages-de/         # German pages
-    │── /theme/            # Styles and templates
-    │── /config-multilang.php  # Multi-language setup
-    │── /config-basic.php      # Single-language setup
-    │── index.php          # Main file
-    │── .htaccess          # URL rewriting
-    │── README.md          # Documentation
-
-### Customization
+    {columns 50-50}
+    Left column
+    {columns-seperator}
+    Right column
+    {/columns}
+
+    {background color-01}
+    This content has a colored background.
+    {/background}
+
+These shortcodes are part of the theme and are all located in the file `/theme/shortcodes.php`.
+You can edit this file to change existing shortcodes or add even more.
+
+
+## Customization
 - Themes: Modify /theme/css/style.css for styling.
 - Header/Footer: Edit 01-header.md and 02-footer.md in each language folder.
 
+## flatmark as CMS
+...
+
 ## License
 FlatMark is released under the MIT License.
\ No newline at end of file
diff --git a/TODO.md b/TODO.md
index 56bd2922cd3325e9d95af04e48bc7b5648ccc32f..a5a24c0288f207592a1a02f81668eb5bf3195e14 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -1,13 +1,19 @@
+---
+- styling of readme-page (codeblocks, numbered list, table)
+- rename/divide examples-page to shortcodes and markdown
 - other red in logo
 - optimize text on examples page
 - links and buttons (shortcode) styling
-- readme: add from allmanritter-page
-- readme: add info about shortcodes
-- readme: add paragraph about basic and multilang-configuration
+- readme: add paragraph "customisation" to readme
 - readme: add paragraph "flatmark as cms" to readme
 - more text, contact page, slick-slider-page as reference?
 - github: license MIT
+- githup: best settings for publication?
 
+---
+x readme: add from allmanritter-page
+x readme: add info about shortcodes
+x readme: add paragraph about basic and multilang-configuration
 x simplify toggle-button js
 x rename shortcode langmenu to extras (to use it for other header-extras (phonenumber etc.))
 x fix codeblock for img-rounded on example page
index fec019f73974b615af9edee1069fa63ab461435c..be614eafa1f5c5dd2fc2b15ef36dba821751900f 100644 (file)
--- a/index.php
+++ b/index.php
@@ -25,7 +25,7 @@
         $requestUri = trim($_SERVER['REQUEST_URI'], '/');
         $uriParts = explode('/', $requestUri);
 
-    // Multilingual setup. If your site is a single-language setup, change to 'config-basic.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';
 
     // Read the content of the requested Markdown file into a string
diff --git a/pages-en/README.md b/pages-en/README.md
new file mode 100644 (file)
index 0000000..59ef699
--- /dev/null
@@ -0,0 +1,119 @@
+# FlatMark
+
+*A lightweight, flat-file Markdown-based site generator with optional multilingual support.*
+
+## Features  
+- Lightweight and fast
+- Easy-to-edit content, just Markdown files  
+- Just requires basic php, no database needed
+- Supports **single-language** and **multi-language** setups  
+- Auto-parses **Markdown** to HTML using [Parsedown](https://parsedown.org/)  
+- **Custom meta fields** 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 **Theme** which you can customize and enhance  
+
+## How It Works  
+FlatMark dynamically converts Markdown files in the folder `/pages` (or `/pages-XX` for multilingual sites) into HTML pages.  
+
+### URL Structure  
+
+| Setup           | Example URL | Maps to File          |
+|-----------------|-------------|-----------------------|
+| Single Language | `/about`    | `/pages/about.md`     |
+| Multi-Language  | `/en/about` | `/pages-en/about.md`  |
+
+### Folder Structure
+
+    /flatmark/
+    │── /files/                 # Files (images, pdfs etc.)
+    │── /pages-en/              # English pages
+    │── /pages-de/              # German pages
+    │── /theme/                 # Styles, assets and templates of the theme
+    │── config-basic.php        # Single-language setup
+    │── config-multilang.php    # Multi-language setup
+    │── index.php               # Main file
+    │── .htaccess               # URL rewriting
+    │── README.md               # Documentation
+
+
+## Requirements  
+- PHP 7.4+  
+- Apache/Nginx with mod_rewrite enabled 
+
+## Installation  
+1. **Download** the latest release 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).  
+5. Done! Your site is ready.  
+
+## Configuration  
+Set up **single** or **multi-language setup** in `index.php`:  
+
+```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.
+
+## Defaults: Header, Footer, Homepage, 404-page
+
+Each pages-folder must contain at least these files for the website to function:  
+
+- 01-header.md  
+Edit this file to change logo, title, subtitle of the website and the main menu. The main-menu must be a list of links to function correctly. You also have the option to add further elements like contact-details or a language-menu by wrapping them in the shortcode `{extras}` `{/extra}`. 
+
+- 02-footer.md  
+Edit this file to change the text in the footer and the footer-menu. The footer-menu must also be a list of links to function correctly. The shortcode `{year}` will display the current year. 
+
+- home.md  
+This file is the default startpoint of your website.   
+
+- 404.md  
+Edit this file to change the error-message which is shown if a page is not found. 
+
+
+## Meta Information (Title, Description & Robots)
+Each Markdown page can include optional meta information using HTML comments at the top of the file.
+These values will be automatically extracted and used in the <head> section of the generated HTML page.
+
+Example Markdown file (about.md) with meta information:
+
+    <!-- title: About Us -->
+    <!-- description: Learn more about our mission and team. -->
+    <!-- robots: index, follow -->
+
+    # Welcome to Our Company
+
+    We are committed to providing the best services...
+
+- title → Sets the `<title>` of the page. Defaults to the filename if not provided.
+- description → Used for the `<meta name="description">` tag (important for SEO). Defaults to an empty string if not set.
+- robots → Controls search engine indexing (index, follow / noindex, nofollow). Defaults to index, follow.
+
+## Shortcodes
+flatMark supports simple shortcodes for structured content. Some examples:
+
+    {columns 50-50}
+    Left column
+    {columns-seperator}
+    Right column
+    {/columns}
+
+    {background color-01}
+    This content has a colored background.
+    {/background}
+
+These shortcodes are part of the theme and are all located in the file `/theme/shortcodes.php`.
+You can edit this file to change existing shortcodes or add even more.
+
+
+## Customization
+- Themes: Modify /theme/css/style.css for styling.
+- Header/Footer: Edit 01-header.md and 02-footer.md in each language folder.
+
+## flatmark as CMS
+...
+
+## License
+FlatMark is released under the MIT License.
\ No newline at end of file