Giter Club home page Giter Club logo

joomlatools-pages's People

Contributors

amazeika avatar ercanozkaya avatar johanjanssens avatar kbrookes avatar manojlondhe avatar raeldc avatar waseemsadiq avatar yiendos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

joomlatools-pages's Issues

Release 0.3.0

Related PR's for documentation purposes

1. Http Caching: #22

Implement http caching support through cacheable dispatcher behavior.

2. Data support: #4

Data improvements:

  • Filter method
  • Combining data files from different locations
  • Dynamic frontmatter properties

Additional 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.

Documentation

Write a documentation for the Pages component aimed at developers. Description of features are detailed in the release logs:

Content plugins page filter

Improve the content plugin implementation. Implement it as a page filter to give more flexibility and disable it by default.

Implement page object

Implement a page object adding support for following page properties

  • title
  • description
  • content
  • date
  • published
  • category
  • tags
  • redirect
  • metadata
  • access
    -- groups
    -- roles
  • process
    -- plugins

Add support for triggering the content plugins, handle following events:

  • onContentBeforeDisplay
  • onContentAfterDisplay
  • onContentPrepare

Fix limit issue

If the limit is set in a page collection prevent it from being reset by the limitable behavior in the dispatcher.

Release 0.9.0

Related PR's for documentation purposes

1. Opengraph support #86

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

2. Data JSON support #82

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.

3. Fix markdown partials are not rendered correctly #88

4. Fix Joomla router is exposing 'view' in canonical #84

Data JSON support

  • Implement JsonSerializable
  • Implement __toString() and encode to JSON
  • Allow to create a data object by passing an associative array to the data() template function

Release 0.2.0

Related PR's for documentation purposes

1. Page collections: #14

Page collections allow you to render a list of pages, supporting pagination, ordering, sorting and recursing through the folder structure.

2. Data support: #4

Data improvements:

  • Ordering of data
  • Support for markdown data files
  • Ability to shuffle and slice a data object

Additional 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.

Release 0.7.0

Related PR's for documentation purposes

1. Plugin filter #60

Content wrapped in <ktml:plugins> will now run through content plugins.

2. Table of contents #58

Anchor elements for <ktml:toc> will only be created from the <article> tag on the page

Additional improvements

We no longer automatically add model states to the query string when building URLs

Page collections

Implement support for dynamic pages to allow rendering a collection of items.

None root menu item not working

Using a none root menu item doesn't work when the file is not in a folder. Eg /test => /joomlatools-pages/pages/test.html

Dynamic collections

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:

  • page (default)
  • collection

Note in a later step a third 'form' type will be added.

Data support

Allow loading data from YAML, JSON, and XML, PHP and INI files in page template.

Add image:// scheme

Add an image:// scheme to point to make the images folder configurable, by default point to /images.

Release 0.5.0

Related PR's for documentation purposes

1. Improve page and data registry cache #43

The page and data registries are now cached in an optimised way. The actual content of the file is no longer being cached

2. Add attributes() template function #45

Function to build a string with xml style attributes from an array of key/value pairs

3. Add flatten() data object method #52

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.

4. Pages not being properly sorted by date #48

5. Fix warnings and notices #46

Additional improvements

  • 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

Additional configuration options

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

Improve page and data registry cache

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.

Form support

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.

Notes

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:

Markdown partials are not rendered correctly

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.

Remote collections

  • Implement support for remote collections.
  • Implement a data client that can retrieve data from a url
  • Improve collections to allow to pass configuration information to the collection. This will allow to create simple collections on the fly without needing to create a specialised model.

Release 0.8.0

Related PR's for documentation purposes

1. Controller collections #76

Allows to use a controller a collection source by specifying the controller identifier.

2. Filesystem collections #74

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.

3. Database collections #72

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.

4. Webservice collections #64

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.

5. http_cache_time_proxy setting #70

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.

6. Fix route('index') #68

7. Fix limit issue #66

Additional improvements

  • 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_timedefault has been changed to 15min.

Additional configuration options

remote_cache: JDEBUG ? false : true
remote_cache_time: 606024, //1d
remote_cache_path: /joomlatools-pages/cache

http_cache_time_proxy: 606102 //2h

Release 0.4.0

Related PR's for documentation purposes

1. Joomla Pathway support: #26

Ensures the Joomla pathway reflects the page hierarchy.

2. Page decoration: #27

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.

3. Add theme:// asset path: #29

Allows to use theme:// in pages and templates. Will be rewritten to the base url of the active template.

4. Page ordering support: #33

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.

5. Allow to define template filters per page #35

Added a process:filters page property which can contain an array of additional page filters.

6. Improve Markdown support: #37

Added additional filters to improve markdown rendering. New filters are: markdown, partial, toc and highlight.

7. Allow page() method to return active page: #38

Ensure access to the active page object at all times using the page() template method.

8. Improve http caching: #40

Implement framework changes in: joomlatools/joomlatools-framework#242 to ensure http page is working as expected.

Additional improvements

  • 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

Add attribute() template method

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.

Release 0.6.0

Related PR's for documentation purposes

1. Routing #54

A complete new routing system using a route resolvers approach, implementing a prioritised queue and bi-directional regex based routing.

2. Dynamic collections #56

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.

Additional improvements

  • 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/

Additional configuration options

  • redirects: [array]
  • collections: [array]

Allow keeping track of data folder when flattening

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.