-Here is an example that shows you how to create a new page via the command line with the `curl` command. The `data.json` file has the basic data needed to create a new page.
+
CURL command example 1
+This example shows you how to create a new page via the command line with the `curl` command.
+
+The `data.json` file has the basic data needed to create a new page.
Content of file `data.json`:
@@ -91,3 +95,43 @@ Response Body
}
}
```
+
+
CURL command example 2
+This example shows you how to create a new page via the command line with the `curl` command and include custom fields.
+
+First, you need to create the custom field, follow the [Quick example](https://docs.bludit.com/en/content/custom-fields#quick-example) from the documentation to create the custom field `subtitle`.
+
+Create a file `data.json` with the page's fields.
+
+```bash
+{
+ "token": "24a8857ed78a8c89a91c99afd503afa7",
+ "authentication": "193569a9d341624e967486efb3d36d75",
+ "title": "My dog",
+ "content": "Content of the page here, support Markdown code and HTML code.",
+ "custom": {
+ "subtitle": "Mi perro dinamita"
+ }
+}
+```
+
+Execute the command and attach the `data.json` file:
+
+```bash
+$ curl -X POST \
+ -H "Content-Type: application/json" \
+ -d @data.json \
+ "https://www.example.com/api/pages"
+```
+
+Response Body
+
+```bash
+{
+ "status": "0",
+ "message": "Page created.",
+ "data": {
+ "key": "my-dog"
+ }
+}
+```
\ No newline at end of file
diff --git a/pages/developers/folder-structure/index.md b/pages/developers/folder-structure/index.md
index 3a0503f..3678ca6 100644
--- a/pages/developers/folder-structure/index.md
+++ b/pages/developers/folder-structure/index.md
@@ -1,79 +1,79 @@
-# Folder structure
+# Structure of directories and files
-Here's the basic folder structure for Bludit.
+## First layer of directories
```
-/bl-content/ <-- Databases and uploaded images
-/bl-kernel/ <-- Core of Bludit
-/bl-languages/ <-- Languages files
-/bl-plugins/ <-- Plugins
-/bl-themes/ <-- Themes
+/bl-content/ <-- Databases and images
+/bl-kernel/ <-- Bludit's core
+/bl-languages/ <-- Languages files for Bludit's core
+/bl-plugins/ <-- Plugins
+/bl-themes/ <-- Themes
```
## bl-content
-This folder is very important, as it is where Bludit stores all files, as well as databases and images. Before updating your Bludit installation, it's highly recommended to make a backup of this folder.
+This directory is very important, as it is where Bludit store all the files, databases and images.
+
+Before updating Bludit, it's highly recommended to make a backup of this directory.
```
/bl-content/
- databases/
- plugins/ <-- Database: plugins
- pages.php <-- Database: pages
- security.php <-- Database: black list, brute force protection, others
- site.php <-- Database: site variables, name, description, slogan, others
- tags.php <-- Database: tags
- users.php <-- Database: users
+ databases/
+ plugins/ <-- Database: plugins
+ pages.php <-- Database: pages
+ security.php <-- Database: black list, brute force protection, others
+ site.php <-- Database: site variables, name, description, slogan, others
+ tags.php <-- Database: tags
+ users.php <-- Database: users
- pages/ <-- Content: pages
- about/index.txt
- food/index.txt
+ pages/
+ about/index.txt <-- Page "about", the url match with the directory path, https://mydomain/about
+ food/index.txt
- tmp/ <-- Temp files
+ tmp/ <-- Temp files
- uploads/ <-- Uploaded files
- profiles/ <-- Profiles images
- thumbnails/ <-- Thumbnails images
- photo1.jpg
- photo2.png
+ uploads/ <-- Uploaded files
+ profiles/ <-- Profiles images
+ pages/about/ <-- Files and images for the page "about"
- workspaces/ <-- Workspaces for the plugins
+ workspaces/ <-- Workspaces for the plugins
```
## bl-kernel
-This folder contains the core of Bludit.
+This directory contains the core of Bludit.
## bl-languages
-This folder contains all language files. Each file is a JSON document, encoded in UTF-8.
+This directory contains all language files. Each file is a JSON document, encoded in UTF-8.
```
/bl-languages/
- bg_BG.json
- cs_CZ.json
- de_CH.json
- en.json
- es.json
- ...
+ bg_BG.json
+ cs_CZ.json
+ de_CH.json
+ en.json
+ es.json
+ ...
```
## bl-plugins
-This folder contains all plugins. New plugins you download should be uploaded here.
+This directory contains all plugins. New plugins you download should be uploaded here.
```
/bl-plugins/
- about/
- disqus/
- rss/
- sitemap/
- tinymce/
- ...
+ about/
+ disqus/
+ rss/
+ sitemap/
+ tinymce/
+ ...
```
## bl-themes
-This folder contains all themes. New themes you download should be uploaded here.
+This directory contains all themes. New themes you download should be uploaded here.
```
/bl-themes/
- alternative/
- blogx/
- ...
+ alternative/
+ blogx/
+ ...
```
diff --git a/pages/developers/pages-files-and-images/index.md b/pages/developers/pages-files-and-images/index.md
new file mode 100644
index 0000000..292172e
--- /dev/null
+++ b/pages/developers/pages-files-and-images/index.md
@@ -0,0 +1,26 @@
+# Pages' files and images
+
+
+The files and images are store in the directory `/bl-content/uploads/pages/`.
+
+## Thumbnails
+The thumbnails are generate when the user uploaded an image to the page.
+
+There are 2 thumbnails, small and medium. You can configure the size and the quality of the thumbnails from the Bludit's settings.
+
+The thumbnails are store in the same directory as the original image.
+
+Original image uploaded path for the page "about".
+```
+/bl-content/uploads/pages/about/photo1.jpg
+```
+
+Small size thumbnail for the image "photo1.jpg" for the page "about".
+```
+/bl-content/uploads/pages/about/photo1-thumbnail-s.jpg
+```
+
+Medium size thumbnail for the image "photo1.jpg" for the page "about".
+```
+/bl-content/uploads/pages/about/photo1-thumbnail-m.jpg
+```
\ No newline at end of file
diff --git a/pages/themes/example-my-second-theme/index.md b/pages/themes/example-my-second-theme/index.md
index 58277e0..06d56a5 100644
--- a/pages/themes/example-my-second-theme/index.md
+++ b/pages/themes/example-my-second-theme/index.md
@@ -66,7 +66,7 @@ Let's work on the `index.php` file; create the file inside the `/bl-themes/mars/
CSS files
Add some CSS files:
-- Using the Helper object `Theme::css()`
+- Using the Helper object `HTML::css()`
- or using the HTML tag ``
In this case, we are going to use the Helper to add the CSS file `/bl-themes/mars/css/style.css`. With the Helper, you don't need to specify the absolute path.
@@ -78,7 +78,7 @@ In this case, we are going to use the Helper to add the CSS file `/bl-themes/mar
-
+
@@ -88,7 +88,7 @@ In this case, we are going to use the Helper to add the CSS file `/bl-themes/mar
Javascript files
Add some Javascript files:
-- Using the Helper object `Theme::js()`
+- Using the Helper object `HTML::js()`
- or using the HTML tag ``
In this case, we are going to use the Helper to add the Javascript file `/bl-themes/mars/js/mars.js`. With the Helper you don't need to specify the absolute path.
@@ -100,10 +100,10 @@ In this case, we are going to use the Helper to add the Javascript file `/bl-the
-
+
-
+
@@ -126,10 +126,10 @@ The plugin hooks for the site are as follows:
-
+
-
+
@@ -156,10 +156,10 @@ You can use the Site-Object to get the logo, title and slogan.
-
+
-
+
@@ -190,10 +190,10 @@ To locate what page the user is browsing on the site, you can use the variable `
-
+
-
+
@@ -227,10 +227,10 @@ If the user is on the home page, Bludit generates a global array `$pages` with a
-
+
-
+
@@ -265,10 +265,10 @@ If the user is viewing a particular page, Bludit generates a global Page-Object
-
+
-
+
diff --git a/pages/themes/favicon/index.md b/pages/themes/favicon/index.md
index 7f16951..a5b95c7 100644
--- a/pages/themes/favicon/index.md
+++ b/pages/themes/favicon/index.md
@@ -3,39 +3,41 @@
Bludit provides helpers to help developers to write less code.
+
Usage
+
For the purpose of this tutorial we will use the following names:
-- Name of the theme `box`
+- Theme's name `box`
- Site URL `https://www.example.com`
- Theme path `/bl-themes/box/`
- Favicon file path `/bl-themes/box/favicon.png`
-The next method from the helper `Theme::` generates the head tag for the favicon; by default, the MIME type returned is `image/png`.
+The next method from the helper `HTML::` generates the head tag for the favicon; by default, the MIME type returned is `image/png`.
```
```
-HTML output
+HTML output.
```
-
+
```
Also, you can specify the MIME type if you want to use another favicon type such as `.ico`.
```
```
-HTML output
+HTML output.
```
-
+
```
Example
-Here's a complete example of how to include the favicon in a theme.
+The next HTML and PHP snippet is a complete example of how to include the favicon.
```
@@ -44,7 +46,7 @@ Here's a complete example of how to include the favicon in a theme.
Hello
diff --git a/pages/themes/include-frameworks-bootstrap-icons-jquery/index.md b/pages/themes/include-frameworks-bootstrap-icons-jquery/index.md
new file mode 100644
index 0000000..42dc272
--- /dev/null
+++ b/pages/themes/include-frameworks-bootstrap-icons-jquery/index.md
@@ -0,0 +1,69 @@
+# Include frameworks (Bootstrap, Icons and jQuery)
+
+
+Themes in Bludit are very flexible; you can use any framework (Bootstrap, Foundation, Bulma, UIkit, Semantic UI, etc), any Javascript code, whatever you want.
+
+Bludit includes Boostrap, Boostrap Icons and jQuery by default and you can use it in your themes.
+
+
Include jQuery
+
+Bludit keeps the latest version of jQuery in its package, you can include it with the HTML helper.
+```
+
+```
+
+HTML output.
+```
+
+```
+
+
Include Bootstrap
+
+Bludit keeps the latest version of Bootstrap in its package, you can include it with the HTML helper.
+
+Include Javascript file for Bootstrap.
+```
+
+```
+
+HTML output.
+```
+
+```
+
+Include CSS file for Bootstrap.
+```
+
+```
+
+HTML output.
+```
+
+```
+
+
Include Bootstrap Icons
+
+Bludit keeps the latest version of [Bootstrap Icons](https://icons.getbootstrap.com/) in its package, you can include it with the HTML helper.
+
+Include CSS file for Bootstrap Icons.
+```
+
+```
+
+HTML output.
+```
+
+```
+
+Display a icon next to Heading.
+```
+
Alarm
+```
\ No newline at end of file
diff --git a/pages/themes/include-frameworks/index.md b/pages/themes/include-frameworks/index.md
deleted file mode 100644
index 2fef64c..0000000
--- a/pages/themes/include-frameworks/index.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# Include frameworks
-
-
-Themes in Bludit are very flexible; you can use any framework (Bootstrap, Foundation, Bulma, UIkit, Semantic UI, etc), any Javascript code, whatever you want.
-
-We include a few frameworks in the documentation, but feel free to add more of them by editing this page.
-
-
Include jQuery
-
-Bludit keeps the latest version of jQuery in its package, you can include it with the helper.
-```
-
-```
-
-HTML output
-```
-
-```
-
-
Include Bootstrap
-
-Bludit keeps the latest version of Bootstrap in its package, you can include it with the helper.
-
-Include Javascript file for Bootstrap.
-```
-
-```
-
-HTML output
-```
-
-```
-
-Include CSS file for Bootstrap.
-```
-
-```
-
-HTML output
-```
-
-```
-
-
Include UIkit
-
-This frameworks is not included in the Bludit package, but you can easily include it with the helpers `Theme::css()` and `Theme::js()`, and using the UIkit CDN or downloading the files and include them to the theme.
-
-The following example includes UIkit from a CDN, notice the `false` at the end of the line, this tells to the function we are going to use an externally-hosted file.
-```
-
-```
-
-HTML output
-```
-
-
-
-
-```
\ No newline at end of file
diff --git a/pages/themes/javascript-files/index.md b/pages/themes/include-javascript-files/index.md
similarity index 61%
rename from pages/themes/javascript-files/index.md
rename to pages/themes/include-javascript-files/index.md
index 1cca5cf..f0de472 100644
--- a/pages/themes/javascript-files/index.md
+++ b/pages/themes/include-javascript-files/index.md
@@ -1,29 +1,31 @@
-# Javascript files
+# Include Javascript files
Bludit provides helpers to help developers to write less code.
-For the purpose of this tutorial we will use the following names:
-- Name of the theme `box`
+
Usage
+
+For the purpose of this tutorial, we will use the following names:
+- Theme's name `box`
- Site URL `https://www.example.com`
- Theme path `/bl-themes/box/`
- Javascript file path `/bl-themes/box/main.js`
-Let's add a Javascript file called `main.js`, which should be located in `/bl-themes/box/main.js`. You don't need to worry about the absolute path if you use the `Theme::` helper.
+Let's add a Javascript file called `main.js`, which should be located in `/bl-themes/box/main.js`. You don't need to worry about the absolute path if you use the `HTML::` helper.
```
```
-HTML output
+HTML output.
```
```
Example
-Here's a complete example of how to include two Javascript files in a theme.
+The next HTML and PHP snippet is a complete example of how to include two JavaScript files.
```
@@ -37,8 +39,8 @@ Here's a complete example of how to include two Javascript files in a theme.
This is a paragraph.
diff --git a/pages/themes/css-files/index.md b/pages/themes/includes-css-files/index.md
similarity index 76%
rename from pages/themes/css-files/index.md
rename to pages/themes/includes-css-files/index.md
index 3680d6b..aebf3ed 100644
--- a/pages/themes/css-files/index.md
+++ b/pages/themes/includes-css-files/index.md
@@ -1,29 +1,31 @@
-# CSS files
+# Includes CSS files
Bludit provides helpers for developers, to help them write less code.
+
Usage
+
For the purpose of this tutorial, we will use the following names:
-- Name of the theme `box`
+- Theme's name `box`
- Site URL `https://www.example.com`
- Theme path `/bl-themes/box/`
- CSS file path `/bl-themes/box/style.css`
-Let's add a CSS file called `style.css`. This file is located in `/bl-themes/box/style.css`; you don't need to worry about the absolute path if you use the `Theme::` helper.
+Let's add a CSS file called `style.css`. This file is located in `/bl-themes/box/style.css`; you don't need to worry about the absolute path if you use the `HTML::` helper.
```
```
-HTML output
+HTML output.
```
```
Example
-The next HTML and PHP snippet is a complete example of how to include two CSS files in a theme.
+The next HTML and PHP snippet is a complete example of how to include two CSS files.
```
@@ -32,8 +34,8 @@ The next HTML and PHP snippet is a complete example of how to include two CSS fi
Hello