Commit graph

180 commits

Author SHA1 Message Date
Belle Aerni
97e6a8a4e6 Make renderWithTiwg a static function
There's zero need to create a new instance of the class before calling it, so this removes a very small amount of overhead, but more importantly removes the need to create and define a new class of it each time, which makes the code very slightly cleaner
2023-01-19 15:07:15 -08:00
Belle Aerni
ea7f3ac65b Micro-optimization to the createCacheKey function
Testing showed the in_array function made it overall slower than simply calling MD4. Using a define, I was able to get the overhead down to virtually nothing:
PHP 8.2:
Execution time for MD4: 0.064558029174805 seconds
Execution time for XXH128: 0.015785932540894 seconds
Execution time for Check: 0.0119788646698 seconds

PHP 8.1:
Execution time for MD4: 0.034939050674438 seconds
Execution time for XXH128: 0.0058550834655762 seconds
Execution time for Check: 0.0062451362609863 seconds
2023-01-19 01:41:17 -08:00
Belle Aerni
bf3b425c8d MD5 -> MD4 2023-01-18 23:11:18 -08:00
Belle Aerni
612adb5a17 Revert "Use the official twig StringLoaderExtension"
This reverts commit b2036b765f.
2023-01-18 22:05:50 -08:00
Belle Aerni
b2036b765f Use the official twig StringLoaderExtension
Not sure how I missed the fact that this exists, but let's use it instead of an unofficial extension
2023-01-18 22:02:33 -08:00
Belle Aerni
08cfdcf460 Stip 'index' off when generating the page list 2023-01-17 20:18:13 -08:00
Belle Aerni
02e4492ecd Improve the way the pagelist is generated
Now it automatically strips off the .md extension since it's unneeded, and it sorts it so that the 'index' of the site is always the first item in the array, since that dictates the order they appear in the browser
2023-01-17 19:45:59 -08:00
Belle Aerni
f388c99647 Added the ability to toggle page visibility 2023-01-17 19:23:48 -08:00
Belle Aerni
0eca5dd3e1 Admin Plugin: added the ability to delete pages 2023-01-17 18:54:44 -08:00
Belle Aerni
cbb978ccad AntConfig::saveConfig verify primary keys exist
Before saving the new config, verify that the config appears to be complete by checking for the primary keys in the array
2023-01-17 12:38:38 -08:00
Belle Aerni
cdee7c8a04 Update config.php to delete all, including dirs 2023-01-16 18:05:33 -08:00
Belle Aerni
4386451516 Added a test for AntTools::repairURL 2023-01-15 12:42:37 -08:00
Belle Aerni
588811ec7a Created a feature list doc 2023-01-14 22:45:37 -08:00
Belle Aerni
ff9583bfdf
Rector (#19)
* Rector code quality run

* Ran Rector with coding style ruleset

* Ran Rector with the naming setlist
2023-01-14 20:44:27 -08:00
Belle Aerni
81824132fe
Merge pull request #18 from AntCMS-org/tests
Run unit tests on PHP 8.0, 8.1, and 8.2
2023-01-14 15:52:31 -08:00
Belle Aerni
fcd9e31af9 Run unit tests on PHP 8.0, 8.1, and 8.2 2023-01-14 15:50:05 -08:00
Belle Aerni
c90823afbe Default to having keyword generation off 2023-01-14 15:37:57 -08:00
Belle Aerni
5669e8a429
Merge pull request #17 from AntCMS-org/mdextensions
Adding some new markdown extensions
2023-01-14 03:31:19 -08:00
Belle Aerni
8ed69831ee Check for cache before setting up the MD parser 2023-01-14 03:04:56 -08:00
Belle Aerni
b8956614b0 Add nyholm/psr7 2023-01-14 02:44:13 -08:00
Belle Aerni
c5b999294b Added embed extension for markdown 2023-01-14 02:38:20 -08:00
Belle Aerni
3353be4920 Replaced my homebrew keyword generator
It now uses the one found here: https://github.com/Donatello-za/rake-php-plus
This is much better than the one I had hacked together.

Makes AntCMS a bit bigger.. but not by too much. I may end up removing the keyword generator outright, but for now I'm going to keep it.
2023-01-14 00:49:21 -08:00
Belle Aerni
91395db9c4 Added robots.txt plugin
Automatically generates the content, including the correct link to the sitemap.
2023-01-14 00:30:29 -08:00
Belle Aerni
eaca96fd6b Added a sitemap generator 2023-01-13 23:46:17 -08:00
Belle Aerni
ca54a56eaa fix active page highlight in the Bootstrap theme 2023-01-13 01:38:07 -08:00
Belle Aerni
44de365946 Fix header regex (again) 2023-01-13 01:18:43 -08:00
Belle Aerni
4f96f5c496 Highlight the active page in the navbar
Closes #6

Also dropped PHPStan back down to level 5 because I decided level 6 was a bit much
2023-01-12 19:08:35 -08:00
Belle Aerni
325221f527 Quick run with Rector 2023-01-12 00:20:13 -08:00
Belle Aerni
36ab96bf8c Added some info to composer.json 2023-01-11 21:09:36 -08:00
Belle Aerni
a2f8c3617a Slightly cleanup auth + enable CGIPassAuth
Should hopefully fix any issues with CGI servers.
Also renamed the 'SiteInfo' config key to 'siteInfo' to follow the naming scheme for everything else
2023-01-11 19:30:34 -08:00
Belle Aerni
0979d4ee03
Merge pull request #12 from AntCMS-org/dependabot/composer/phpstan/phpstan-1.9.9
Bump phpstan/phpstan from 1.9.8 to 1.9.9
2023-01-11 17:48:16 -08:00
dependabot[bot]
ab5a46a4cd
Bump phpstan/phpstan from 1.9.8 to 1.9.9
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.9.8 to 1.9.9.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.10.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.9.8...1.9.9)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-12 01:37:41 +00:00
Belle Aerni
891012f6ff Fixed AntCMS matching the page header multiple times 2023-01-11 14:07:39 -08:00
Belle Aerni
c513b01bad Workaround for AntCMS trying to extract header
data from the body of the getting started block. Will find a fix soonish
2023-01-10 23:48:58 -08:00
Belle Aerni
584f99bac7 Created gettingstarted 2023-01-10 23:36:58 -08:00
Belle Aerni
016103f7cd Updated readme, moved minimum PHP ver to 8.0 2023-01-10 18:50:10 -08:00
Belle Aerni
506e66c0ae
Merge pull request #11 from AntCMS-org/docsandtypehints
Added missing type hints, bumped PHPStan to level 6
2023-01-10 18:22:09 -08:00
Belle Aerni
7adb5d51a6 Added missing type hints, bumped PHPStan to level 6 2023-01-10 18:20:24 -08:00
Belle Aerni
4c0a950179
Merge pull request #10 from AntCMS-org/currentconfig
Refactor AntConfig::currentConfig
2023-01-10 17:26:46 -08:00
Belle Aerni
c15bf1f449 Refactor AntConfig::currentConfig 2023-01-10 17:24:30 -08:00
Belle Aerni
aff54916e9
Merge pull request #9 from AntCMS-org/dependabot/npm_and_yarn/tailwindcss/typography-0.5.9
Bump @tailwindcss/typography from 0.5.8 to 0.5.9
2023-01-10 17:22:30 -08:00
dependabot[bot]
e7e7628d91
Bump @tailwindcss/typography from 0.5.8 to 0.5.9
Bumps [@tailwindcss/typography](https://github.com/tailwindcss/typography) from 0.5.8 to 0.5.9.
- [Release notes](https://github.com/tailwindcss/typography/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss-typography/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindcss/typography/compare/v0.5.8...v0.5.9)

---
updated-dependencies:
- dependency-name: "@tailwindcss/typography"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-11 01:13:14 +00:00
Belle Aerni
da69eb3f81 Updated file extension to .twig 2023-01-10 06:32:51 -08:00
Belle Aerni
22007f4c57 Improved tailwind theme's layout for desktop 2023-01-10 04:53:49 -08:00
Belle Aerni
cb0a1917a9 Update admin plugin to render with twig 2023-01-10 00:26:05 -08:00
Belle Aerni
2a1af73f75 Use the .twig file extension 2023-01-10 00:07:20 -08:00
Belle Aerni
3405291db1 Move the config and pages .yaml files to /Config 2023-01-09 22:55:02 -08:00
Belle Aerni
51211d87ec Allow access to a sitemap.xml file if it exists 2023-01-09 16:09:22 -08:00
Belle Aerni
52e102e63b Bootstrap: make the footer fixed to the bottom 2023-01-09 15:03:56 -08:00
Belle Aerni
89b182b3be
Merge pull request #8 from AntCMS-org/twig
Started to migrate to twig
2023-01-09 13:16:58 -08:00