diff --git a/docs/architecture.html b/docs/architecture.html index 5190a92ac..286303577 100644 --- a/docs/architecture.html +++ b/docs/architecture.html @@ -1 +1 @@ - Puswhord Code Architecture

The Code Architecture

Are you searching for :

  • organizing your own app code : see symfony good practices or look at the demo app
  • organizing the code for a pushword extension : see create an extension

Else, you are at the good place.

Here, we will speak about code organisation for Pushword core and officially maintained extensions.

The code for all officially maintained extension and the core is kept in an unique repository : it's a mono-repository. It's kind of majestic monolith.

The core contain the minimum features, then everything is done via extension.

The core code follow as much as it can the symfony good practices and have a special folder named componenent for bigger thing (in fact, components will may have their own package one day).

Each extension are facultative.

Keeping all this extensions in one repository permit to test them easily, to understand the code easily and to code much quicker. Before v1, it was very very cool to refactor quickly the code.

The skeleton isn't a real skeleton (copy and install).

It's used for testing, demo, using for generating the docs and a few class from skeleton are extracted by the default installer.

On top of Symfony

Each package (except skeleton, installer and js-helper) is built as a symfony bundle.

The core package required a symfony app instaled to be functionnal.

Want a particular details about the way the code is organized ? Feel free to ask (github or mail), I will list my answer here.

\ No newline at end of file + Puswhord Code Architecture

The Code Architecture

Are you searching for :

  • organizing your own app code : see symfony good practices or look at the demo app
  • organizing the code for a pushword extension : see create an extension

Else, you are at the good place.

Here, we will speak about code organisation for Pushword core and officially maintained extensions.

The code for all officially maintained extension and the core is kept in an unique repository : it's a mono-repository. It's kind of majestic monolith.

The core contain the minimum features, then everything is done via extension.

The core code follow as much as it can the symfony good practices and have a special folder named componenent for bigger thing (in fact, components will may have their own package one day).

Each extension are facultative.

Keeping all this extensions in one repository permit to test them easily, to understand the code easily and to code much quicker. Before v1, it was very very cool to refactor quickly the code.

The skeleton isn't a real skeleton (copy and install).

It's used for testing, demo, using for generating the docs and a few class from skeleton are extracted by the default installer.

On top of Symfony

Each package (except skeleton, installer and js-helper) is built as a symfony bundle.

The core package required a symfony app instaled to be functionnal.

Want a particular details about the way the code is organized ? Feel free to ask (github or mail), I will list my answer here.

\ No newline at end of file diff --git a/docs/command.html b/docs/command.html index db591fd82..744e5052a 100644 --- a/docs/command.html +++ b/docs/command.html @@ -1,4 +1,4 @@ - Manage your Pushword CMS with command

Command

At any moment, you can get the avalaible command from symfony by typing php bin/console list.

Now, let's see what command we have and how useful there are.

The list above may vary depending on installed extensions

To get more details on each command line, just type -h (eg php bin/console pushword:user:create -h)

 pushword
+	Manage your Pushword CMS with command  

Command

At any moment, you can get the avalaible command from symfony by typing php bin/console list.

Now, let's see what command we have and how useful there are.

The list above may vary depending on installed extensions

To get more details on each command line, just type -h (eg php bin/console pushword:user:create -h)

 pushword
   pushword:flat:import                       Syncing flat file inside database
   pushword:flat:export                       Export database toward file (yaml+json)
   pushword:image:cache                       Generate all images cache
diff --git a/docs/component/entity-filter.html b/docs/component/entity-filter.html
index 41c91dafd..26aba4ab6 100644
--- a/docs/component/entity-filter.html
+++ b/docs/component/entity-filter.html
@@ -1 +1 @@
-	Find your custom theme for a Pushword CMS  

Entity Filter

The Entity Filter may be the most powerful thing built for Pushword.

It's offer to apply what you want on properties from a class (mostly entity and often mostly Page).

It can be called from PHP (from Pushword\Core\Component\EntityFilter\Manager) or directly in Twig template file (with pw function).

It's permit, for example, to render markdown in title : {{ pw(page).title|raw }} for title being Page **title** will render Page <strong>Title</strong> if markdown filter is configured for string or for title in pushword.filters or directly in the app.filters (see configuration).

Each entity (mostly Page) can override one or multiple just setting filter_*filterName*: false in customProperties. See for this page, twig is disabled.

You can find the list of avalaible filters in core/Component/EntityFilter/Filter.

You can easily create a new filter implementing Pushword\Core\Component\EntityFilter\Filter\FilterInterface.

For now, filter are partially autowired with current App, current Manager, Twig and the current entity.

See Pushword\Core\Component\EntityFilter\Manager::getFilterClass and ...\Filter\Required***Trait.php.

You can easily create an extension wich add special action after filtering based on entity_filter.after_filtering event wich contain Manager and string property.

\ No newline at end of file + Find your custom theme for a Pushword CMS

Entity Filter

The Entity Filter may be the most powerful thing built for Pushword.

It's offer to apply what you want on properties from a class (mostly entity and often mostly Page).

It can be called from PHP (from Pushword\Core\Component\EntityFilter\Manager) or directly in Twig template file (with pw function).

It's permit, for example, to render markdown in title : {{ pw(page).title|raw }} for title being Page **title** will render Page <strong>Title</strong> if markdown filter is configured for string or for title in pushword.filters or directly in the app.filters (see configuration).

Each entity (mostly Page) can override one or multiple just setting filter_*filterName*: false in customProperties. See for this page, twig is disabled.

You can find the list of avalaible filters in core/Component/EntityFilter/Filter.

You can easily create a new filter implementing Pushword\Core\Component\EntityFilter\Filter\FilterInterface.

For now, filter are partially autowired with current App, current Manager, Twig and the current entity.

See Pushword\Core\Component\EntityFilter\Manager::getFilterClass and ...\Filter\Required***Trait.php.

You can easily create an extension wich add special action after filtering based on entity_filter.after_filtering event wich contain Manager and string property.

\ No newline at end of file diff --git a/docs/configuration.html b/docs/configuration.html index 170b3306c..54e04e233 100644 --- a/docs/configuration.html +++ b/docs/configuration.html @@ -1,4 +1,4 @@ - Configure a fresh install of Pushword

Configuration

Before to code, Pushword offers the ability to configure a lot of things from a yaml (or PHP if you preferred) configuration file.

If you used the automatic installer to create a new pushword project, just open config/packages/pushword.yaml and start configure your website.

Good to remember In the configuration a website has a more generic name, it's an app

When you create a new pushword project important property to configure now is host (eg: host: localhost.dev). Then you are ready to use your website.

Two levels : Global vs App

Before to digg in your configuration file, you need to know there is two different config properties : the global ones and the app ones.

This specificity is the same for almost all officially maintained pushword extensions.

If you want the same configure value for all app, you can configure globally and the value will be transmit to each app config.

How to difference global from app configuration without reading the docs ?

At the begining of each configuration's file (if you do a fresh dump), you will find a property named app_fallback_properties.

This one define the app configuration.

How to get all configuration property without reading the docs ?

php bin/console config:dump-reference PushwordCoreBundle
+	Configure a fresh install of Pushword  

Configuration

Before to code, Pushword offers the ability to configure a lot of things from a yaml (or PHP if you preferred) configuration file.

If you used the automatic installer to create a new pushword project, just open config/packages/pushword.yaml and start configure your website.

Good to remember In the configuration a website has a more generic name, it's an app

When you create a new pushword project important property to configure now is host (eg: host: localhost.dev). Then you are ready to use your website.

Two levels : Global vs App

Before to digg in your configuration file, you need to know there is two different config properties : the global ones and the app ones.

This specificity is the same for almost all officially maintained pushword extensions.

If you want the same configure value for all app, you can configure globally and the value will be transmit to each app config.

How to difference global from app configuration without reading the docs ?

At the begining of each configuration's file (if you do a fresh dump), you will find a property named app_fallback_properties.

This one define the app configuration.

How to get all configuration property without reading the docs ?

php bin/console config:dump-reference PushwordCoreBundle
 

Good to remember for each Pushword Projet, you have a lot of different extension, you may find the good configuration property in the concerned extension.

For example, to get the admin configuration option

php bin/console config:dump-reference PushwordAdminBundle
 # or php bin/console config:dump-reference pushword_admin
 

Can I add an custom app configuration property that I will be able to use in my custom code ?

Yes and no !

No because tanks to the Symfony Configuration Component, the configuration file is verified before to be used.

And yes, because we want to create quickly a prototype or a POC, so Pushword add a special custom_properties under wich you can set the property you want.

Configuration Settings

So remember, we are in the config/packages/pushword.yaml and this is a dump for the file with all properties.

If you don't understand what the purpose of a property property. Feel free to ask (github or mail), I will list answers on this page.

pushword:
diff --git a/docs/contribute.html b/docs/contribute.html
index 56591aceb..e64501e06 100644
--- a/docs/contribute.html
+++ b/docs/contribute.html
@@ -1,4 +1,4 @@
-	Contribute to Pushword : Documention, Core or Extension  

Contribute

Source code is host on github.

Signale an issue

Use the github issue tracker to signal an issue.

This project is open source, and as such, the maintainers give their free time to build and maintain the source code held within. They make the code freely available in the hope that it will be of use to other developers. It would be extremely unfair for them to suffer abuse or anger for their hard work.

Contribute

Contributions are welcome.

Please, send your contribution via a github pull request on Puswhord/Puswhord.

The code is mainly organised in a mono-repo, learn more about the code architecture

Contribute to the documentation

The docs is inside the main repo, you will find write in markdown in packages/docs/content.

On each PR, the docs is compiled and published pushword.piedweb.com by a github action.

Pull Requests

New Features

When requesting or submitting new features, first consider to create a dedicated extension.

If your extension reply to an important community need, you can create a pull request to merge it in this Mono Repo. It will permit to maintain easily it compatibility in next Puswhord update. Moreover, extension will be tested at each commit on one of Pushword's package.

Else, consider create it own git repo and create a Pull Request on the doc to add a link to this fresh extension. The link will be accepted if your extension is well tested and fully functionnal.

Coding standards

This project respect PSR-12 Coding standard. Before your pull-request, run php-cs-fixer.

composer format
+	Contribute to Pushword : Documention, Core or Extension  

Contribute

Source code is host on github.

Signale an issue

Use the github issue tracker to signal an issue.

This project is open source, and as such, the maintainers give their free time to build and maintain the source code held within. They make the code freely available in the hope that it will be of use to other developers. It would be extremely unfair for them to suffer abuse or anger for their hard work.

Contribute

Contributions are welcome.

Please, send your contribution via a github pull request on Puswhord/Puswhord.

The code is mainly organised in a mono-repo, learn more about the code architecture

Contribute to the documentation

The docs is inside the main repo, you will find write in markdown in packages/docs/content.

On each PR, the docs is compiled and published pushword.piedweb.com by a github action.

Pull Requests

New Features

When requesting or submitting new features, first consider to create a dedicated extension.

If your extension reply to an important community need, you can create a pull request to merge it in this Mono Repo. It will permit to maintain easily it compatibility in next Puswhord update. Moreover, extension will be tested at each commit on one of Pushword's package.

Else, consider create it own git repo and create a Pull Request on the doc to add a link to this fresh extension. The link will be accepted if your extension is well tested and fully functionnal.

Coding standards

This project respect PSR-12 Coding standard. Before your pull-request, run php-cs-fixer.

composer format
 

Tests

composer test
 
 # and to test with --prefer-lowest
diff --git a/docs/create-extension.html b/docs/create-extension.html
index 09c88f3b5..c314318aa 100644
--- a/docs/create-extension.html
+++ b/docs/create-extension.html
@@ -1 +1 @@
-	Create a Pushword Extension the easy way  

Create an extension

Each extension is built as a symfony bundle.

When you know that, you just have to learn how to create a bundle for symfony and you will know how to make an extension for Pushword.

There is some simple example like flat or more complex like conversation.

If you don't want to share your extension, you don't need to build a bundle, just go in ./src and start coding following symfony concept.

\ No newline at end of file + Create a Pushword Extension the easy way

Create an extension

Each extension is built as a symfony bundle.

When you know that, you just have to learn how to create a bundle for symfony and you will know how to make an extension for Pushword.

There is some simple example like flat or more complex like conversation.

If you don't want to share your extension, you don't need to build a bundle, just go in ./src and start coding following symfony concept.

\ No newline at end of file diff --git a/docs/editor.html b/docs/editor.html index d8bbf9788..93422df1d 100644 --- a/docs/editor.html +++ b/docs/editor.html @@ -1,4 +1,4 @@ - Editor Hidden Super Power - Cheatsheet Pushword

Editor Hidden Super Power
and Markdown Cheatsheet

After installing the admin, you will be able to read this doc directly from your Pushword installation at /admin/markdown-cheatsheet.

Title and subtitle

Title 2 (h2)

Title 3 (h3)

Title 4 (h4)

Title 5 (h5)

Title 6 (h6)

## Title 2 (h2)
+ Editor Hidden Super Power - Cheatsheet Pushword

Editor Hidden Super Power
and Markdown Cheatsheet

After installing the admin, you will be able to read this doc directly from your Pushword installation at /admin/markdown-cheatsheet.

Title and subtitle

Title 2 (h2)

Title 3 (h3)

Title 4 (h4)

Title 5 (h5)

Title 6 (h6)

## Title 2 (h2)
### Title 3 (h3)
### Title 4 (h4)
#### Title 5 (h5)
diff --git a/docs/extension.html b/docs/extension.html index 56ce1facc..5b12584e2 100644 --- a/docs/extension.html +++ b/docs/extension.html @@ -1 +1 @@ - Redirect to extensions

Redirect to extensions

Location: /extensions

\ No newline at end of file + Redirect to extensions

Redirect to extensions

Location: /extensions

\ No newline at end of file diff --git a/docs/extension/admin-block-editor.html b/docs/extension/admin-block-editor.html index aa750daf8..59daad70d 100644 --- a/docs/extension/admin-block-editor.html +++ b/docs/extension/admin-block-editor.html @@ -1,4 +1,4 @@ - Admin block editor to supercharge the default markdown admin with a rich text editor

Admin Block Editor

Supercharge default admin with a rich text editor wich managed blocks.

Install

composer require pushword/admin-block-editor
+	Admin block editor to supercharge the default markdown admin with a rich text editor  

Admin Block Editor

Supercharge default admin with a rich text editor wich managed blocks.

Install

composer require pushword/admin-block-editor
 

That's it ! If you have a custom installation (not used the default installer), you may have a look inside vendor/pushword/admin/install.php.

Block editor is now ready.

Configuration

If you want to go forward than a default install, you can override default parameters in your config :

admin_block_editor:
     new_page: true # Set false to disable block editor for new page (because new page does not have an associated `app` yet)
diff --git a/docs/extension/admin.html b/docs/extension/admin.html
index f93d1c40d..c4105b681 100644
--- a/docs/extension/admin.html
+++ b/docs/extension/admin.html
@@ -1,4 +1,4 @@
-	Standard Admin for Pushword : Admin User Interface  

Admin

Create, edit, delete Page, Media, User with an interface built on top of Sonata Admin.

Install

composer require pushword/admin
+	Standard Admin for Pushword : Admin User Interface  

Admin

Create, edit, delete Page, Media, User with an interface built on top of Sonata Admin.

Install

composer require pushword/admin
 

That's it ! If you have a custom installation (not used the default installer), you may have a look inside vendor/pushword/admin/install.php.

Admin is now accessible via https://mydomain.tld/admin/.

Don't forget to create an user with ROLE_SUPER_ADMIN to access to the just installed admin :

php bin/console pushword:user:create
 

You may be intersted by the block editor.

Customize the admin

Admin is built on top of Sonata Admin with one more feature : the ability to manage displayed form fields from the configuration (not yet for list fields and search fields).

So, in your configuration, your default configuration is :

pushword_admin:
diff --git a/docs/extension/advanced-main-image.html b/docs/extension/advanced-main-image.html
index 3a745b842..65f1a3dbc 100644
--- a/docs/extension/advanced-main-image.html
+++ b/docs/extension/advanced-main-image.html
@@ -1,3 +1,3 @@
-	Page HERO and custom field in admin to manage main image format  

Advanced Main Image

Supercharge the Pushword Admin with a new admin form field to customize the main image format from not visible to HERO + default template files.

Install

composer require pushword/advanced-main-imaged
+	Page HERO and custom field in admin to manage main image format  

Advanced Main Image

Supercharge the Pushword Admin with a new admin form field to customize the main image format from not visible to HERO + default template files.

Install

composer require pushword/advanced-main-imaged
 

Configuration

If you want to go forward than a default install (activating advanced image field for every ), you can override default parameters in your config :

advanced_main_image: true # Set false to disable block editor for new page (because new page does not have an associated `app` yet)
 

If you override the default page/page.html.twig, the extension may not work properly.

Customization

When mainImageFormat is set to default (0) or none (1), it's ever managed by the default page/_content.html.twig.

When mainImageFormat is greater than 1, it's managed by new template files added by this extension :

  • page/page_hero.html.twig.
  • page/_content_hero_.html.twig.
\ No newline at end of file diff --git a/docs/extension/conversation.html b/docs/extension/conversation.html index 09005ed57..9b610e1fe 100644 --- a/docs/extension/conversation.html +++ b/docs/extension/conversation.html @@ -1,4 +1,4 @@ - Conversation: Add Comment, Newsletter Form or Contact For

Conversation

Extend your Pushword website with comments, a contact form or just an user input.

Install

Via Packagist :

# Get the Bundle
+	Conversation: Add Comment, Newsletter Form or Contact For  

Conversation

Extend your Pushword website with comments, a contact form or just an user input.

Install

Via Packagist :

# Get the Bundle
 composer require pushword/conversation
 

That's it ! If you have a custom installation (not used the default installer), you may have a look inside vendor/pushword/admin/install.php.

Usage

You can use it as is and include it in your Page with two manners :

# Load form via fetch (javascript)
diff --git a/docs/extension/facebook.html b/docs/extension/facebook.html
index 0c589eb87..38b8791d4 100644
--- a/docs/extension/facebook.html
+++ b/docs/extension/facebook.html
@@ -1,4 +1,4 @@
-	Write from Facebook on Pushword CMS  

Facebook

Extension not maintained anymore

Write from Facebook on your page managed by Pushword.

Install

composer require pushword/facebook
+	Write from Facebook on Pushword CMS  

Facebook

Extension not maintained anymore

Write from Facebook on your page managed by Pushword.

Install

composer require pushword/facebook
 

Usage

For now, this extension just permit to show last post from a page.

{{ facebook_last_post('Google') }}
 # will return the last post from Google's Facebook Page render via /component/FacebookLastPost.html.twig
 
diff --git a/docs/extension/flat.html b/docs/extension/flat.html
index c6140a9f6..9007e6720 100644
--- a/docs/extension/flat.html
+++ b/docs/extension/flat.html
@@ -1,4 +1,4 @@
-	Puswhord Flat File CMS - Markdown and Twig Ready  

Flat

Transform Pushword in a FlatFile CMS.

Install

composer require pushword/flat-file
+	Puswhord Flat File CMS - Markdown and Twig Ready  

Flat

Transform Pushword in a FlatFile CMS.

Install

composer require pushword/flat-file
 

Configure (if needed)

Globally under pushword_static_generator (in config/packages).

Or for multi-sites in config/package/pushword.yaml.

...:
   flat_content_dir: content #default value
 

Usage

Command Line

php bin/console pushword:flat:import $host
diff --git a/docs/extension/page-scanner.html b/docs/extension/page-scanner.html
index 866d85f5a..80f3a1527 100644
--- a/docs/extension/page-scanner.html
+++ b/docs/extension/page-scanner.html
@@ -1,4 +1,4 @@
-	Pushword Page Scanner : Find dead links, 404, 301 and more.  

Page Scanner

Find dead links, 404, 301 and more (command line or admin).

Install

composer require pushword/page-scanner
+	Pushword Page Scanner : Find dead links, 404, 301 and more.  

Page Scanner

Find dead links, 404, 301 and more (command line or admin).

Install

composer require pushword/page-scanner
 

That's it ! If you have a custom installation (not used the default installer), you may have a look inside vendor/pushword/admin/install.php.

Command

php bin/console pushword:page:scan $host
 

Configuration

You can configure to avoid to check some links based on a url pattern (with wildcard).

In a config file pushword_page_scanner.yaml :

pushword_page_scanner:
diff --git a/docs/extension/page-update-notifier.html b/docs/extension/page-update-notifier.html
index fe6a85a49..fef568cc4 100644
--- a/docs/extension/page-update-notifier.html
+++ b/docs/extension/page-update-notifier.html
@@ -1,4 +1,4 @@
-	Be notify when a page is edited on your Pushword CMS  

Page Update Notifier

Get mail notification when your pushword content (page) is edited.

Install

composer require pushword/page-update-notifier
+	Be notify when a page is edited on your Pushword CMS  

Page Update Notifier

Get mail notification when your pushword content (page) is edited.

Install

composer require pushword/page-update-notifier
 

Configure

Add in your current config/package/pushword.yaml for an App or globally under pushword_page_update_notifier:

    page_update_notification_from: fromMe@example.tld
     page_update_notification_to: NotificationForMe@example.tld
     page_update_notification_interval: 'P1D' #See PHP DateInterval format https://www.php.net/manual/fr/class.dateinterval.php
diff --git a/docs/extension/static-generator.html b/docs/extension/static-generator.html
index 3734bd939..7178cfee3 100644
--- a/docs/extension/static-generator.html
+++ b/docs/extension/static-generator.html
@@ -1,4 +1,4 @@
-	Static Website Generator with Pushword CMS  

Static Generator

Generate a static website serve by github pages, apaches with one command or via the admin.

Install

composer require pushword/static-generator
+	Static Website Generator with Pushword CMS  

Static Generator

Generate a static website serve by github pages, apaches with one command or via the admin.

Install

composer require pushword/static-generator
 

That's it ! If you have a custom installation (not used the default installer), you may have a look inside vendor/pushword/admin/install.php.

Configure

Add in your current config/package/pushword.yaml for an App or globally under pushword_static_generator:

    static_generators: apache|github|[..., classNameGenerator, ...]
     static_symlink: true
diff --git a/docs/extension/svg.html b/docs/extension/svg.html
index a44542eb5..96d9b44a7 100644
--- a/docs/extension/svg.html
+++ b/docs/extension/svg.html
@@ -1,3 +1,3 @@
-	Insert SVG/Icon in your content - Pushword CMS  

SVG

Add SVG with ease in your main content or in a template file via a twig function.

Install

composer require pushword/svg
+	Insert SVG/Icon in your content - Pushword CMS  

SVG

Add SVG with ease in your main content or in a template file via a twig function.

Install

composer require pushword/svg
 

Usage

By default, this extension use FontAwesome 5.15. You just need to use twig svg function :

svg('surprise')
 

Will show

Configure

By default, this extension load FontAwesome 5.15's icons. You can choose to use your custom SVG icons by specifyng the svg_dir in your app config or under pushword_svg.

\ No newline at end of file diff --git a/docs/extension/template-editor.html b/docs/extension/template-editor.html index eec9294fe..6d1ebe4eb 100644 --- a/docs/extension/template-editor.html +++ b/docs/extension/template-editor.html @@ -1,3 +1,3 @@ - Template Editor with Pushword CMS

Template Editor

Edit view file online in the admin.

Contents

Install

composer require pushword/template-editor
+	Template Editor with Pushword CMS  

Template Editor

Edit view file online in the admin.

Contents

Install

composer require pushword/template-editor
 

That's it ! If you have a custom installation (not used the default installer), you may have a look inside vendor/pushword/admin/install.php.

\ No newline at end of file diff --git a/docs/extension/version.html b/docs/extension/version.html index 9044eb313..41ae22647 100644 --- a/docs/extension/version.html +++ b/docs/extension/version.html @@ -1,4 +1,4 @@ - Page Versioning for Pushword CMS

Version

Versioning pages with Pushword CMS.

Install

composer require pushword/version
+	Page Versioning for Pushword CMS  

Version

Versioning pages with Pushword CMS.

Install

composer require pushword/version
 

Add Routes

admin:
     resource: "@PushwordVersionBundle/VersionRoutes.yaml"
 # or do it in 1 command line
diff --git a/docs/extensions.html b/docs/extensions.html
index 170aee6c1..d714c59ae 100644
--- a/docs/extensions.html
+++ b/docs/extensions.html
@@ -1 +1 @@
-	Extensions  

Find your missing feature with a Pushword Extension

  • Admin Create, edit, delete Page, Media, User with an interface built on top of Sonata Admin.
  • Admin Block Editor Supercharge default admin with a rich text editor wich managed blocks.
  • Advanced Main Image Supercharge the Pushword Admin with a new admin form field to customize the main image format from not visible to HERO + default template files.
  • Conversation Extend your Pushword website with comments, a contact form or just an user input.
  • Flat Transform Pushword in a FlatFile CMS.
  • Page Scanner Find dead links, 404, 301 and more (command line or admin).
  • Page Update Notifier Get mail notification when your pushword content (page) is edited.
  • Static Generator Generate a static website serve by github pages, apaches with one command or via the admin.
  • Svg Add SVG with ease in your main content or in a template file via a twig function.
  • Template Editor Edit view file online in the admin.
  • Version Versioning pages with Pushword CMS.

Add your own extension editing this file on github.

\ No newline at end of file + Extensions

Find your missing feature with a Pushword Extension

  • Admin Create, edit, delete Page, Media, User with an interface built on top of Sonata Admin.
  • Admin Block Editor Supercharge default admin with a rich text editor wich managed blocks.
  • Advanced Main Image Supercharge the Pushword Admin with a new admin form field to customize the main image format from not visible to HERO + default template files.
  • Conversation Extend your Pushword website with comments, a contact form or just an user input.
  • Flat Transform Pushword in a FlatFile CMS.
  • Page Scanner Find dead links, 404, 301 and more (command line or admin).
  • Page Update Notifier Get mail notification when your pushword content (page) is edited.
  • Static Generator Generate a static website serve by github pages, apaches with one command or via the admin.
  • Svg Add SVG with ease in your main content or in a template file via a twig function.
  • Template Editor Edit view file online in the admin.
  • Version Versioning pages with Pushword CMS.

Add your own extension editing this file on github.

\ No newline at end of file diff --git a/docs/installation.html b/docs/installation.html index ef076e9f2..7ffa6b262 100644 --- a/docs/installation.html +++ b/docs/installation.html @@ -1,4 +1,4 @@ - Install Pushword in a few seconds (automatic installer)

Installation

Requirements

  • PHP >=8.1
  • PHP extensions : dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo
  • Composer (how to install composer)

Automatic installer via composer


composer create-project pushword/new pushword + Install Pushword in a few seconds (automatic installer)

Installation

Requirements

  • PHP >=8.1
  • PHP extensions : dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo
  • Composer (how to install composer)

Automatic installer via composer


composer create-project pushword/new pushword

That's it ! You can still configure an app or directly launch a PHP Server :

cd pushword;
 php bin/console pushword:new
diff --git a/docs/license.html b/docs/license.html
index 72892dc52..72caf9743 100644
--- a/docs/license.html
+++ b/docs/license.html
@@ -1 +1 @@
-	Pushword CMS License and contributors  

License and contributors

Contributors

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

\ No newline at end of file + Pushword CMS License and contributors

License and contributors

Contributors

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

\ No newline at end of file diff --git a/docs/manage-assets.html b/docs/manage-assets.html index 0fdc17130..5731d5329 100644 --- a/docs/manage-assets.html +++ b/docs/manage-assets.html @@ -1,2 +1,2 @@ - How to manage assets CSS / Javascript in Pushword CMS ?

Managing Assets (css/js)

The default installer copy/paste a skeleton for a website colored with tailwindcss.

To update it juste go in ./assets and edit app.js, app.css, directly the tailwind configuration or the webpack.config.js.

Then run wepback :

yarn && yarn encore (dev|production)
+	How to manage assets CSS / Javascript in Pushword CMS ?  

Managing Assets (css/js)

The default installer copy/paste a skeleton for a website colored with tailwindcss.

To update it juste go in ./assets and edit app.js, app.css, directly the tailwind configuration or the webpack.config.js.

Then run wepback :

yarn && yarn encore (dev|production)
 

If you want to change the default location for assets, just edit ./config/packages/pushword.yaml and configure apps.0.assets (eg)

\ No newline at end of file diff --git a/docs/override-theme.html b/docs/override-theme.html index ffb8e9693..13dac4b6e 100644 --- a/docs/override-theme.html +++ b/docs/override-theme.html @@ -1,2 +1,2 @@ - How to override default theme with Pushword CMS ?

Customize the current theme

There is at least two ways to override template file and customize the html wich is rendered by Pushword : First is App Way (app per app), second is the bundle way (global).

The Pushword App Way

Simplest way is to override it (partially or completly) by create a new file in ./templates/{$host}/page naming it like the default one

Eg: Overriding the default navbar can be done creating a file ./templates/{$host}/page/_navbar.html.twig.

You can see how it's handle for the documentation.

The Bundle Way

Every package (even core) is built like a symfony bundle, so you can override template file the bundle way.

For this, you just need to find the template file you want to override and create a copy inside your templates/bundles folder like.

Example, to override /page/page_default.html.twig :

./templates/bundles/PushwordCoreBundle/page/page_default.html.twig
+	How to override default theme with Pushword CMS ?  

Customize the current theme

There is at least two ways to override template file and customize the html wich is rendered by Pushword : First is App Way (app per app), second is the bundle way (global).

The Pushword App Way

Simplest way is to override it (partially or completly) by create a new file in ./templates/{$host}/page naming it like the default one

Eg: Overriding the default navbar can be done creating a file ./templates/{$host}/page/_navbar.html.twig.

You can see how it's handle for the documentation.

The Bundle Way

Every package (even core) is built like a symfony bundle, so you can override template file the bundle way.

For this, you just need to find the template file you want to override and create a copy inside your templates/bundles folder like.

Example, to override /page/page_default.html.twig :

./templates/bundles/PushwordCoreBundle/page/page_default.html.twig
 

  • See default core template file
\ No newline at end of file diff --git a/docs/roadmap.html b/docs/roadmap.html index 63d3a10ad..01bdea00c 100644 --- a/docs/roadmap.html +++ b/docs/roadmap.html @@ -1,3 +1,3 @@ - Where Pushword is going ? Roadmap, TODO and Ideas

Roadmap

BugFix && To finish

  • MàJ en cours sur admin-block-editor

    "@editorjs/raw": "https://github.com/editor-js/raw.git#208cbfd7ea1da507173686e1312f95788fb8f209",

    "@editorjs/nested-list": "https://github.com/editor-js/nested-list.git#8375ae17756fa2677d57e716e12096437d01e8f8",

    "@editorjs/image": "https://github.com/editor-js/image.git#e3df500fc62a88d3490fa4ba4030c07f0cd79d64",

  • Conversation form controller

    • manage multiHost
  • Scan : ajouter un check des liens vides "></a
  • Yaml editor in Autres paramêtres

  • Switch image block to use media.id moroever image.uri

    • event listener on load to update json
  • Rectorize with all List
  • AdminBlockEditor : new list item, évitez d'ajouter le lien d'avant sans ancre...
  • Implement ESlint
  • https://github.com/jolicode/JoliTypo

  • [Core] Rewrite MediaTrait/MediaSlugTrait and MediaListener (tag reference before starting refactoring 0.0.859)n

  • [AdminBlockEditor] Add Layout https://github.com/hata6502/editorjs-layout#readme

  • [StaticGenerator] Very long CopierGenerator, MediaGenerator -> set a warning in docs

  • [MultiSiteEditor] : Make admin with better isolation

    • parent page
    • menu when editing a page
    • admin page list with only 1 domain listing + default correct selected domain on click add new
    • preview : manage page link to be OK when it's not the fist domain
  • When simplify 10 will be stable, add phpstan-twig-rules

  • // TODO check a new blank installation
  • [AdminBlockEditor] Image > Add link + Alt and redesign Legend
  • [AdminBlockEditor] document block and add Help link when advanced knowledge is needed
  • [AdminBlockEditor] édition avancée (template notamment dans pages, prose/unprise)
    • rewrite the fullscreen, wide, and max width from prose - see
  • [Core] : ImageManager - make optimizer bin path configurable

  • {Core] pagination : tester & documenter

    • Bug quand une page a le même URI qu'une page de la pagination OU sur l'ID (attrapé avant la pagination) => En fait, c'est paginer la page d'accueil qui fait le max de bordel
  • [StaticGenerator] Make ErrorPageGenerator consistent with htaccess (on htaccess, filter by beginning url to return the correct one ?!)

  • [AdminBlockEditor] sanitize with https://github.com/editor-js/editorjs-php (see AdminFormEventSuscriber.php)

  • [AdminBlockEditor] prepare translating and transalte

Feature

  • Page scanner : test current page anchor link
  • Toward wiki !
    • page authors HUGE BUG: une fois la page mise à jour avec le dernier utilisateur, impossible d'afficher la page d'édition de Admin sans être déconnecté
    • Change requester
    • Public Historic (or make accessible historic from page object)
  • Youtube Importer (from a youtube hash, create a page with video and text is imported from subtitle)
  • Multi-upload (see https://packagist.org/packages/silasjoisten/sonata-multiupload-bundle)
  • Intégrer LinksImprover (+ UX)
  • Page-Scanner :
    • scanner une page en direct + scanner plus de choses
      • texte alternatif manquant
      • Check there is no translation with the same language than current page
    • add ou plutôt dans othersParameters
    • page scanner --alter :)
  • name suggester: parse content, find words or multiple words used only in this doc, suggest it as potential name, s'active au moment du clic sur l'input name
  • eCommerce bridge with sylius ?!
  • Advanced main image : associé un champ vidéo à l'image d'en-tête
  • Admin : extend parameters and events to filters and lister will permit extension)
  • Static: copy only used media in public
  • FacebookManager : post from facebook
  • Flat:
    • Transform markdown link to page link (useful for navigate in docs from editor)
    • Throw error when the content is more up to date in database

Others

  • Core : implement SonataUserBlundle (see user_block.html.twig), wait for https://github.com/sonata-project/SonataUserBundle/pull/1256
  • manage date i18n a better way than randomly (document the process)
  • Simplify request to external service with one pipe (toward Guzzle and 1 configuration for all extension)
  • API ?!
  • Complex Right System : Multi-user editor Multi-site but not everybody can edit everything (see draft.md) (extension or core ?)
  • Core : Rewrite filter componenent to use the power of symfony service

One day (maybe)

  • Auto-update npm package (js-helper and editorjs-tool) via Github Actions (or at least git hooks)
  • Best testing Fluidifier le process de test et deploiement (tester avec les vrais données)
  • Move global app_base_url, name and color to à better spot (like évent suscriber)
  • Move weird entity trait constructor to lificycle callback
  • Move notify to messenger bus ? : https://symfony.com/doc/current/the-fast-track/fr/18-async.html

  • Admin : Automatic save without flooding version

  • Version : Rewrite to load in an entity versionned version and used sonata filters
  • Admin (and admin extensions): Manage SonataAdminMenuOrder a better way than randomly
  • Wordpress to Pushword/Core (and vice versa)
  • Flat (spatie/yaml-front-matter, vérif à chaque requête pour une sync constante admin -> flat files)

Smart image optimizer (global - piedweb package)

Using all otpimizer avalaible, generating optimized image version and choosing the smallest file or keeping the default one)

Switch to commonMark

Need to add markdown=1 feature in league/commonmark

 Settings Manager Extension

Rewrite the template editor by loading existing files and bundle files (view only and override action) in an file entity. CRUD via SONATA, listener to update file.

How to manage yaml/xml/php config files ?!

Dynamic URL Extension

C'est un gros morceau pour garder la compatibilité avec le static generator et le router actuel

Le but: une page est crée avec un slug classique /blog/example-tag/

Une propriété dynamic lui est attributé qui permettra de créer une nouvelle route

Une autre proprité dynamicPage permettra d'assigner automatiquement un paramètre à ces pages enfants + Where Pushword is going ? Roadmap, TODO and Ideas

Roadmap

BugFix && To finish

  • MàJ en cours sur admin-block-editor

    "@editorjs/raw": "https://github.com/editor-js/raw.git#208cbfd7ea1da507173686e1312f95788fb8f209",

    "@editorjs/nested-list": "https://github.com/editor-js/nested-list.git#8375ae17756fa2677d57e716e12096437d01e8f8",

    "@editorjs/image": "https://github.com/editor-js/image.git#e3df500fc62a88d3490fa4ba4030c07f0cd79d64",

  • Conversation form controller

    • manage multiHost
  • Scan : ajouter un check des liens vides "></a
  • Yaml editor in Autres paramêtres

  • Switch image block to use media.id moroever image.uri

    • event listener on load to update json
  • Rectorize with all List
  • AdminBlockEditor : new list item, évitez d'ajouter le lien d'avant sans ancre...
  • Implement ESlint
  • https://github.com/jolicode/JoliTypo

  • [Core] Rewrite MediaTrait/MediaSlugTrait and MediaListener (tag reference before starting refactoring 0.0.859)n

  • [AdminBlockEditor] Add Layout https://github.com/hata6502/editorjs-layout#readme

  • [StaticGenerator] Very long CopierGenerator, MediaGenerator -> set a warning in docs

  • [MultiSiteEditor] : Make admin with better isolation

    • parent page
    • menu when editing a page
    • admin page list with only 1 domain listing + default correct selected domain on click add new
    • preview : manage page link to be OK when it's not the fist domain
  • When simplify 10 will be stable, add phpstan-twig-rules

  • // TODO check a new blank installation
  • [AdminBlockEditor] Image > Add link + Alt and redesign Legend
  • [AdminBlockEditor] document block and add Help link when advanced knowledge is needed
  • [AdminBlockEditor] édition avancée (template notamment dans pages, prose/unprise)
    • rewrite the fullscreen, wide, and max width from prose - see
  • [Core] : ImageManager - make optimizer bin path configurable

  • {Core] pagination : tester & documenter

    • Bug quand une page a le même URI qu'une page de la pagination OU sur l'ID (attrapé avant la pagination) => En fait, c'est paginer la page d'accueil qui fait le max de bordel
  • [StaticGenerator] Make ErrorPageGenerator consistent with htaccess (on htaccess, filter by beginning url to return the correct one ?!)

  • [AdminBlockEditor] sanitize with https://github.com/editor-js/editorjs-php (see AdminFormEventSuscriber.php)

  • [AdminBlockEditor] prepare translating and transalte

Feature

  • Page scanner : test current page anchor link
  • Toward wiki !
    • page authors HUGE BUG: une fois la page mise à jour avec le dernier utilisateur, impossible d'afficher la page d'édition de Admin sans être déconnecté
    • Change requester
    • Public Historic (or make accessible historic from page object)
  • Youtube Importer (from a youtube hash, create a page with video and text is imported from subtitle)
  • Multi-upload (see https://packagist.org/packages/silasjoisten/sonata-multiupload-bundle)
  • Intégrer LinksImprover (+ UX)
  • Page-Scanner :
    • scanner une page en direct + scanner plus de choses
      • texte alternatif manquant
      • Check there is no translation with the same language than current page
    • add ou plutôt dans othersParameters
    • page scanner --alter :)
  • name suggester: parse content, find words or multiple words used only in this doc, suggest it as potential name, s'active au moment du clic sur l'input name
  • eCommerce bridge with sylius ?!
  • Advanced main image : associé un champ vidéo à l'image d'en-tête
  • Admin : extend parameters and events to filters and lister will permit extension)
  • Static: copy only used media in public
  • FacebookManager : post from facebook
  • Flat:
    • Transform markdown link to page link (useful for navigate in docs from editor)
    • Throw error when the content is more up to date in database

Others

  • Core : implement SonataUserBlundle (see user_block.html.twig), wait for https://github.com/sonata-project/SonataUserBundle/pull/1256
  • manage date i18n a better way than randomly (document the process)
  • Simplify request to external service with one pipe (toward Guzzle and 1 configuration for all extension)
  • API ?!
  • Complex Right System : Multi-user editor Multi-site but not everybody can edit everything (see draft.md) (extension or core ?)
  • Core : Rewrite filter componenent to use the power of symfony service

One day (maybe)

  • Auto-update npm package (js-helper and editorjs-tool) via Github Actions (or at least git hooks)
  • Best testing Fluidifier le process de test et deploiement (tester avec les vrais données)
  • Move global app_base_url, name and color to à better spot (like évent suscriber)
  • Move weird entity trait constructor to lificycle callback
  • Move notify to messenger bus ? : https://symfony.com/doc/current/the-fast-track/fr/18-async.html

  • Admin : Automatic save without flooding version

  • Version : Rewrite to load in an entity versionned version and used sonata filters
  • Admin (and admin extensions): Manage SonataAdminMenuOrder a better way than randomly
  • Wordpress to Pushword/Core (and vice versa)
  • Flat (spatie/yaml-front-matter, vérif à chaque requête pour une sync constante admin -> flat files)

Smart image optimizer (global - piedweb package)

Using all otpimizer avalaible, generating optimized image version and choosing the smallest file or keeping the default one)

Switch to commonMark

Need to add markdown=1 feature in league/commonmark

 Settings Manager Extension

Rewrite the template editor by loading existing files and bundle files (view only and override action) in an file entity. CRUD via SONATA, listener to update file.

How to manage yaml/xml/php config files ?!

Dynamic URL Extension

C'est un gros morceau pour garder la compatibilité avec le static generator et le router actuel

Le but: une page est crée avec un slug classique /blog/example-tag/

Une propriété dynamic lui est attributé qui permettra de créer une nouvelle route

Une autre proprité dynamicPage permettra d'assigner automatiquement un paramètre à ces pages enfants (par exemple la parentPage ou encore la metaRobots)

Ex: dynamic: /blog/{tag<[a-z-]+>?1} (cf https://symfony.com/doc/current/routing.html#optional-parameters:~:text=inlined%20requirements)

Une bonne pratique serait de définir toutes les variantes possible ou une contrainte pour éviter de se retrouver avec un nombre de page infini.

callback ?! sans ça, impossible de maintenir la compatibilité avec le static generator

Quand l'utilisateur cherchera à atteindre /blog/anotherexample/

Si la page n'a pas été créée (elle peut d'ailleur l'être en utilisant extend).

Alors la page chargé sera /blog/example-tag/ (entity créée à la volée sans sauvegarde dans la BDD) avec l'argument accessible getDynamicArg et les propriétés écrasés par dynamicPage.

Drawback : le sitemap actuelle ne permettra pas de générer ces pages. Switch to a sitemap render after a crawl ?

\ No newline at end of file diff --git a/docs/themes.html b/docs/themes.html index 8da1eb411..9425694d5 100644 --- a/docs/themes.html +++ b/docs/themes.html @@ -1 +1 @@ - Find your custom theme for a Pushword CMS

Themes

To customize your website theme, you may be insterested in :

Where to find a ready-to-go Theme for my Pushword CMS ?

0 theme available for now...Thanks to Tailwind CSS and the twig template engine, it's so easy to customize the default one and has a uniq website.

If you create and package a theme, feel free to edit this file on github to list it on this page.

Developper › Tips to package a theme

It's exactly like creating an extension.

\ No newline at end of file + Find your custom theme for a Pushword CMS

Themes

To customize your website theme, you may be insterested in :

Where to find a ready-to-go Theme for my Pushword CMS ?

0 theme available for now...Thanks to Tailwind CSS and the twig template engine, it's so easy to customize the default one and has a uniq website.

If you create and package a theme, feel free to edit this file on github to list it on this page.

Developper › Tips to package a theme

It's exactly like creating an extension.

\ No newline at end of file diff --git a/docs/upgrade.html b/docs/upgrade.html index 3077142b8..8e94ccd75 100644 --- a/docs/upgrade.html +++ b/docs/upgrade.html @@ -1,4 +1,4 @@ - Upgrade a Pushword installation | Changelog

Upgrade Guide

Smooth way is to use composer, a dependency manager for PHP.

Run composer update and the job is done (almost).

If you are doing a major upgrade, find the upgrade guide down there.

To 0.0.800

  • Update doctrine
php bin/console make:migration && php bin/console doctrine:migrations:migrate
+	Upgrade a Pushword installation | Changelog  

Upgrade Guide

Smooth way is to use composer, a dependency manager for PHP.

Run composer update and the job is done (almost).

If you are doing a major upgrade, find the upgrade guide down there.

To 0.0.800

  • Update doctrine
php bin/console make:migration && php bin/console doctrine:migrations:migrate
 
  • Update main content's block
php vendor/pushword/admin-block-editor/src/Installer/Update795.php~
 
  • Update front-end to tailwind 3 by keeping only @pushword/js-helper as dependency in your assets/package.json and simplify webpack.config.js and, if needed, app.js and app.css (see the simpliest way packages/skeleton/assets)

To 0.0.728

  • Update stylesheets
cd assets && yarn && yarn encore production
 
  • Update doctrine
bin/console make:migration && bin/console doctrine:migrations:migrate