joomlatools / joomlatools-pages Goto Github PK
View Code? Open in Web Editor NEWJoomlatools Pages is an easy to use page generator (for Joomla)
License: GNU General Public License v3.0
Joomlatools Pages is an easy to use page generator (for Joomla)
License: GNU General Public License v3.0
Some sanity checks are missing to avoid notices.
Related PR's for documentation purposes
Implement http caching support through cacheable dispatcher behavior.
Data improvements:
Added The ComPagesRouter::getPage() method to return the active page after routing
Ability to configure by adding a config.php to /joomlatools-pages root for the moment only cache configuration supported. (see)
Added slug()
template method to easily generate a ASCII slug from a UTF-8 string.
Write a documentation for the Pages component aimed at developers. Description of features are detailed in the release logs:
Allow to decorate an existing Joomla page.
Improve the content plugin implementation. Implement it as a page filter to give more flexibility and disable it by default.
Add theme:// asset scheme to resolve to the path of the of the active Joomla template.
Implement a page object adding support for following page properties
Add support for triggering the content plugins, handle following events:
If the limit is set in a page collection prevent it from being reset by the limitable behavior in the dispatcher.
Related PR's for documentation purposes
Implements automatic support for opengraph and additionally twitter cards. For twitter we making use of the opengraph properties supported by twitter. For info see: https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup
Add several improvements to the data objects. It's now possible to cast a data object to a string and it's now possible to create a new data object from an associative array of data.
Implement changes in joomlatools/joomlatools-framework#266
Implement a regex based bi-directional routing system.
References:
Implement page ordering support
Related PR's for documentation purposes
Page collections allow you to render a list of pages, supporting pagination, ordering, sorting and recursing through the folder structure.
Data improvements:
It's now possible to define additional page formats. Default templates to render RSS feeds and XML sitemaps have been included.
Page data caching has been improved.
Make the template filters configurable on a per page
Related PR's for documentation purposes
Content wrapped in <ktml:plugins>
will now run through content plugins.
Anchor elements for <ktml:toc>
will only be created from the <article>
tag on the page
We no longer automatically add model states to the query string when building URLs
Implement support for database collections.
Allow to load alternative layouts from a /layouts folder and add support for layout inheritance as is explained here: https://jekyllrb.com/tutorials/convert-site-to-jekyll/#how-layouts-work
Implement support for dynamic pages to allow rendering a collection of items.
Allow to specify a controller identifier and fetch entities through the controller.
Using a none root menu item doesn't work when the file is not in a folder. Eg /test => /joomlatools-pages/pages/test.html
Add support for dynamic collections and page types. Allow to define the collection source through the collection frontmatter, and provide for the ability to define default collections through the configuration.
Recognised pages types:
Note in a later step a third 'form' type will be added.
Implement support for filesystem collections
Allow loading data from YAML, JSON, and XML, PHP and INI files in page template.
Add an image:// scheme to point to make the images folder configurable, by default point to /images.
Related PR's for documentation purposes
The page and data registries are now cached in an optimised way. The actual content of the file is no longer being cached
Function to build a string with xml style attributes from an array of key/value pairs
Method to flatten an multi-dimensional array ComPagesDataObject::flatten() method, if defined the key of the array will be added to each object being flattened using the property name defined.
This release also refactors the http cache to use a custom file cache and no longer make use of the Joomla JCache API. This offers additional performance benefits as http cache objects are now also automatically stored in opcode cache.
This release also includes a change in the way data works. If a data file has the same name as the folder it's part of, the file will not result in an additional level in the data collection. If the file has a different name the key of the level will be the name of the file
page_cache: JDEBUG ? false : true
page_cache_time: 606024 //1d
page_cache_path: /joomlatools-pages/cache
data_cache: JDEBUG ? false : true
data_cache_time: 606024, //1d
data_cache_path: /joomlatools-pages/cache
template_cache: JDEBUG ? false : true
template_cache_path: JPATH_ADMINISTRATOR.'/cache/koowa.templates'
http_cache: false
http_cache_time: 7200
http_cache_path: /joomlatools-pages/cache
References:
The way the dynamic page and data registry cache is working right now doesn't allow to build the cache programmatically, and the per file approach is also not the most performant.
Investigate a better way of storing the page and data cache that also allows for manually building the cache.
In some blog posts, there are anchor elements between the author and the date resulting to weird additional spaces. You could test the issue in this blog post.
Implement support for forms to allow data to be submitted to the site. This would allow to easily create all sorts of forms like a contact form, but also other submission type forms.
The current CSRF protection approach doesn't allow for HTTP caching. A new CSRF technique will need to be implemented to be able to provide cachability and security. For more info on this issue:
Investigate csv libraries:
When using the <ktml:partial format="md"></ktml:partial>
and if the element is not placed at column 0 in the code the output is rendered inside <pre><code></code></pre>
tags due to the additional whitespace added when the markdown code is retrieved by the filter.
The Joomla router is exposing the view in routes it creates for the canonical.
Implement support for opengraph (and twitter cards)
Note: this release requires joomlatools/joomlatools-framework#152
Refactor the page() methods to return the active entity if no path parameter is passed.
Calling route('index') results in warning
Implement support for loading templates files relative to the pages root folder.
Implement http response caching for pages with etag validation.
For more info see: joomlatools/joomlatools-framework#36
Pages that use a timestamp are not being sorted correctly.
Related PR's for documentation purposes
Allows to use a controller a collection source by specifying the controller identifier.
Implements support for filesystem collections. A collection can now easily be retrieved from any filesystem path. The implementation offers support for URI templates to make creating dynamic path easy, and allows to easily turn data into a collection by using the data:// path prefix.
Implements support for database collections. A collection can now easily be retrieved from any database table. A database collection is almost fully automatic. All the table columns are available in the state and can be filtered on.
Implements support for webservice collections. A collection can now easily be retrieved from any URL. The implementation offers support for URI templates to make creating dynamic URL's easy.
Added new http_cache_time_proxy
setting to allows defining the s-maxage
cache directive. The default cache time is set to 15min and the shared proxy cache time is set to 2h.
All collections can easily be customised by extending the ComPagesModel[Collection] class, by default each collection is sortable, paginatable and searchable.
A remote data cache has been added and stores a file per remote url prefixed with 'remote_'. The file contains the data as a php array.
The http_cache_time
default has been changed to 15min.
remote_cache: JDEBUG ? false : true
remote_cache_time: 606024, //1d
remote_cache_path: /joomlatools-pages/cache
http_cache_time_proxy: 606102 //2h
Function to build a string with xml style attributes from an array of key/value pairs
Implement collection support for Dropbox HTTP API.
See: https://www.sitepoint.com/build-your-own-dropbox-client-with-the-dropbox-api/
Export a dropbox paper document to html or markdown to include it in the site
See: https://www.dropbox.com/developers/documentation/http/documentation#paper-docs-download
Related PR's for documentation purposes
Ensures the Joomla pathway reflects the page hierarchy.
Ability to decorate an existing Joomla menu item or page. The Joomla rendering cycle is intercepted after the active component has been dispatched and the returned by the component is then injected in a page to be decorated.
Allows to use theme:// in pages and templates. Will be rewritten to the base url of the active template.
Pages can be ordered per folder by adding a .order.[format] file to the folder that specifies the specific ordering of all the data files, both files and directories can be ordered.Typecan be any data format: YAML, JSON, INI, PHP, and XML.
Added a process:filters page property which can contain an array of additional page filters.
Added additional filters to improve markdown rendering. New filters are: markdown, partial, toc and highlight.
Ensure access to the active page object at all times using the page() template method.
Implement framework changes in: joomlatools/joomlatools-framework#242 to ensure http page is working as expected.
The $page variable is now only injected if the page is a single page. In case of a collection the $page variable is not longer available.
The active page object can be accessed everywhere by using the page() template function. If you don't define a page path it will return the active page. Eg page()->title
The page object has an additional 'text' parameter that gives you access to the text of the page, if the page includes a <--more -!>it will return the text below the tag, the part above is accessible using $page->excerpt
You can now access page properties in your layouts. Eg, $page->content or ktml:contentdoes the same thing
Allow to load files from the active theme.
Add a attribute() template method that makes is easier to generate html element attributes. The method should accept both string and array values and turn them into an attribute of notation name=[value]
If the value is empty no attribute should be generated, if the value is an array the values should be separated by a space.
Related PR's for documentation purposes
A complete new routing system using a route resolvers approach, implementing a prioritised queue and bi-directional regex based routing.
A dynamic approach for collections. A collection is no longer only retrieved from the filesystem, instead a collection can fetch data from any model and custom collections can easily be created.
The router supplies a redirect resolver to handle permanent redirects. Redirects can be configured using the new 'redirects' config option and use the format: array('/path' => '/target')
Support for canonical url's is added. A canonical url is always set in the response headers (even if the canonical route is used). This ensure clean self-referential url's. See also: http://www.thesempost.com/using-rel-canonical-on-all-pages-for-duplicate-content-protection/
The users_groups and users_roles tables do not exist in Joomla CMS, only in Joomlatools Platform. Provide compatibility between the two
When flattening data, the folders names (keys) containing the flattened data are completely lost.
The idea is to allow keeping this data on demand when flattening. An example:
$testimonials = data('testimonials')->flatten('extension');
this would grab testimonials, then flatten them while keeping the dirname on an extension property inside each data object allowing access to it through $testimonial->extension. This prevents us from having to include a redundant extension property inside each testimonial md file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.