Skip to content

Commit

Permalink
Merge branch 'danpros:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sb0001 authored Jan 30, 2024
2 parents f4f4f4a + 265bf2c commit 436c53d
Show file tree
Hide file tree
Showing 58 changed files with 5,101 additions and 285 deletions.
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Install HTMLy using the source code:
4. Follow the installer to install HTMLy.
5. The installer will try to delete itself. Please delete the installer manually if the `install.php` still exist.

**Note:** If you don't need to log in to the dashboard right away, just rename `config.ini.example` to `config.ini`, delete `install.php`, and your are set. It's always good practice to set the `site.url`
**Note:** If you don't need to log in to the dashboard, just rename `config.ini.example` to `config.ini`, delete `install.php`, and you are set. It's always good practice to set the `site.url`

### Online install

Expand Down Expand Up @@ -50,14 +50,14 @@ If you use the dashboard to write your posts, the folder structure and filenames
The following is an example of a folder and file structure from HTMLy:

```html
content/my-username/blog/my-category/post/2024-01-10-25-35-45_tag1,tag2_my-post-slug.md
content/my-username/blog/my-category/post/2024-01-10-15-35-45_tag1,tag2_my-post-slug.md
```
Here's the explanation:

* `my-username` is the username.
* `my-category` is the content category.
* `post` is the content type. Available content type `post`, `video`, `audio`, `link`, `quote`.
* `2024-01-10-25-35-45` is the published date. The date format is `Y-m-d-H-i-s`
* `2024-01-10-15-35-45` is the published date. The date format is `Y-m-d-H-i-s`
* `tag1,tag2` are the tags, separated by commas
* `my-post-slug` is the URL

Expand All @@ -71,7 +71,7 @@ To claim this content or log in to dashboard, simply create `my-username.ini` in
;Password
password = yourpassword
; Encryption: Set to clear, and later it will changed to password_hash automatically during login
;Encryption: Set to clear, and later it will changed to password_hash automatically during login
encryption = clear
;Role
Expand Down Expand Up @@ -102,7 +102,7 @@ This is my category info etc.

**Important:** Every time new content added (post, pages, category), or you make changes that change the folder structure or filenames, simply delete the `index` and `widget` folder inside `cache` folder so that the changes detected by HTMLy.

**Post Views Limitations:** HTMLy using the filename path as the ID for the post/page views counter. So if you edit a post/page without using the dashboard which results in changes to the folder structure or filename, then you must edit `views.json` in the `content/data/` folder manually to update to correct path.
**Post Views limitations:** HTMLy using the filename path as the ID for the post/page views counter. So if you edit a post/page without using the dashboard which results in changes to the folder structure or filename, then you must edit `views.json` in the `content/data/` folder manually to update to the correct path.

Static pages
------------
Expand Down Expand Up @@ -134,6 +134,22 @@ An example pages/subpages content looks like:
This is my page info etc.
```

**Page ordering**

To sort the pages, you just need to add integer value followed by a period.

```html
content/static/01.contact.md
content/static/02.about.md
```

For static subpages:

```html
content/static/01.contact/01.us.md
content/static/01.contact/02.me.md
```

Content Tags
-------------
If you are writing locally, you need specify the content tags below:
Expand Down
2 changes: 1 addition & 1 deletion cache/installedVersion.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"tag_name": "v2.9.0"
"tag_name": "v2.9.1"
}
2 changes: 1 addition & 1 deletion config/config.ini.example
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ cache.timestamp = "false"
multi.site = "false"

; Set the theme here
views.root = "themes/twentyfifteen"
views.root = "themes/twentysixteen"

; Framework config. No need to edit.
views.layout = "layout"
2 changes: 1 addition & 1 deletion config/users/username.ini.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;Password
password = yourpassword

; Encryption. Set to clear, and later it will changed to password_hash automatically during login
;Encryption. Set to clear, and later it will changed to password_hash automatically during login
encryption = clear

;Role
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
define('HTMLY', true);
define('HTMLY_VERSION', 'v2.9.0');
define('HTMLY_VERSION', 'v2.9.1');
$config_file = 'config/config.ini';
require 'system/vendor/autoload.php';
require 'system/htmly.php';
6 changes: 3 additions & 3 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected function saveConfigs()
$config += $this->convertRequestToConfig();
$configFile = file_get_contents("config/config.ini.example");
$configFile = $this->overwriteINI($config, $configFile);
file_put_contents("config/config.ini", $configFile);
file_put_contents("config/config.ini", $configFile, LOCK_EX);

//save users/[Username].ini
$userFile = file_get_contents("config/users/username.ini.example");
Expand All @@ -152,7 +152,7 @@ protected function saveConfigs()
'role' => 'admin',
), $userFile);
}
file_put_contents("config/users/" . $this->user . ".ini", $userFile);
file_put_contents("config/users/" . $this->user . ".ini", $userFile, LOCK_EX);
}

protected function testTheEnvironment()
Expand Down Expand Up @@ -438,4 +438,4 @@ function checkCommentSystemSelection(){
}
</script>
</body>
</html>
</html>
Loading

0 comments on commit 436c53d

Please sign in to comment.