From 2ee6683d1900f2d0ee312561858a196ddc64f17e Mon Sep 17 00:00:00 2001 From: Lorenzo Ruozzi Date: Mon, 28 Aug 2023 11:59:01 +0200 Subject: [PATCH] Refactor documentation by using github pages with jekyll --- .github/workflows/jekyll-gh-pages.yml | 21 +- README.md | 4 +- docs/.gitignore | 2 + docs/Gemfile | 7 + docs/Gemfile.lock | 84 ++++++++ docs/README.md | 185 ++++++++++++++++-- docs/_config.yml | 30 +++ .../index.md} | 12 +- .../opening_sylius.md} | 11 +- docs/{04_A-Tests.md => contributing/tests.md} | 11 +- docs/index.md | 49 +++++ docs/{02-Installation.md => installation.md} | 8 +- docs/{01-Requirements.md => requirements.md} | 8 +- .../automation_examples.md} | 23 ++- docs/{03_B-Events.md => usage/events.md} | 11 +- .../first_setup.md} | 11 +- docs/{03-Usage.md => usage/index.md} | 13 +- src/Model/ActiveCampaign/Connection.php | 2 +- 18 files changed, 433 insertions(+), 59 deletions(-) create mode 100644 docs/.gitignore create mode 100644 docs/Gemfile create mode 100644 docs/Gemfile.lock create mode 100644 docs/_config.yml rename docs/{04-Contributing.md => contributing/index.md} (83%) rename docs/{04_B-Opening_Sylius.md => contributing/opening_sylius.md} (82%) rename docs/{04_A-Tests.md => contributing/tests.md} (93%) create mode 100644 docs/index.md rename docs/{02-Installation.md => installation.md} (99%) rename docs/{01-Requirements.md => requirements.md} (60%) rename docs/{03_C-Automation_example.md => usage/automation_examples.md} (83%) rename docs/{03_B-Events.md => usage/events.md} (95%) rename docs/{03_A-First_setup.md => usage/first_setup.md} (99%) rename docs/{03-Usage.md => usage/index.md} (98%) diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml index c743339..fa2cdb7 100644 --- a/.github/workflows/jekyll-gh-pages.yml +++ b/.github/workflows/jekyll-gh-pages.yml @@ -5,6 +5,7 @@ on: # Runs on pushes targeting the default branch push: branches: ["master"] + paths: ["docs/**"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -25,18 +26,30 @@ jobs: # Build job build: runs-on: ubuntu-latest + defaults: + run: + working-directory: docs steps: - name: Checkout uses: actions/checkout@v3 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 0 # Increment this number if you need to re-download cached gems + working-directory: '${{ github.workspace }}/docs' - name: Setup Pages uses: actions/configure-pages@v3 - name: Build with Jekyll - uses: actions/jekyll-build-pages@v1 - with: - source: ./docs/ - destination: ./_site + # Outputs to the './_site' directory by default + run: bundle exec jekyll build --baseurl "SyliusActiveCampaignPlugin" + env: + JEKYLL_ENV: production - name: Upload artifact uses: actions/upload-pages-artifact@v2 + with: + path: "docs/_site/" # Deployment job deploy: diff --git a/README.md b/README.md index a1599ef..64c2dad 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ _ActiveCampaign_ and want to integrate it with _Sylius_. ## How can I install the plugin on my Sylius store? -Please, check the documentation at the [Installation](docs/02-Installation.md) step. +Please, check the documentation at the [Installation](https://webgriffe.github.io/SyliusActiveCampaignPlugin/installation.html) step. ## Is this plugin conformed to privacy? @@ -35,6 +35,6 @@ designed with these issues in mind and is therefore easily customizable. ## Where do I start? -First, we recommend that you read the entire documentation available at this [link](docs/README.md). Then you could start to +First, we recommend that you read the entire documentation available at this [link](https://webgriffe.github.io/SyliusActiveCampaignPlugin/). Then you could start to install the plugin and use the basic features it gives such as the abandoned cart. You could also think to suggest some new features that this integration could add. So, let's start! 🚀 diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..073ea76 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +.jekyll-cache +_site/* diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 0000000..1c8f6a5 --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' + +gem "jekyll", "~> 4.3.2" # installed by `gem jekyll` +# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2 + +# gem "just-the-docs", "0.6.0" # pinned to the current release +gem "just-the-docs" # always download the latest release diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 0000000..b66a578 --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,84 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) + colorator (1.1.0) + concurrent-ruby (1.2.2) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + eventmachine (1.2.7) + ffi (1.15.5) + forwardable-extended (2.6.0) + google-protobuf (3.23.4-x86_64-darwin) + google-protobuf (3.23.4-x86_64-linux) + http_parser.rb (0.8.0) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + jekyll (4.3.2) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (>= 0.3.6, < 0.5) + pathutil (~> 0.9) + rouge (>= 3.0, < 5.0) + safe_yaml (~> 1.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-include-cache (0.2.1) + jekyll (>= 3.7, < 5.0) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + just-the-docs (0.6.1) + jekyll (>= 3.8.5) + jekyll-include-cache + jekyll-seo-tag (>= 2.0) + rake (>= 12.3.1) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (5.0.3) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.6) + rouge (3.30.0) + safe_yaml (1.0.5) + sass-embedded (1.58.3) + google-protobuf (~> 3.21) + rake (>= 10.0.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + unicode-display_width (2.4.2) + webrick (1.8.1) + +PLATFORMS + x86_64-darwin-22 + x86_64-linux + +DEPENDENCIES + jekyll (~> 4.3.2) + just-the-docs + +BUNDLED WITH + 2.4.19 diff --git a/docs/README.md b/docs/README.md index a1e69d7..bd61ffc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,11 +1,174 @@ -# Docs Summary - -- [Requirements](01-Requirements.md) -- [Installation](02-Installation.md) -- [Usage](03-Usage.md) - - [First setup](03_A-First_setup.md) - - [Events](03_B-Events.md) - - [Automation example](03_C-Automation_example.md) -- [Contributing](04-Contributing.md) - - [Running plugin tests](04_A-Tests.md) - - [Opening Sylius with plugin](04_B-Opening_Sylius.md) +# just-the-docs-template + +This is a *bare-minimum* template to create a [Jekyll] site that: + +- uses the [Just the Docs] theme; +- can be built and published on [GitHub Pages]; +- can be built and previewed locally, and published on other platforms. + +More specifically, the created site: + +- uses a gem-based approach, i.e. uses a `Gemfile` and loads the `just-the-docs` gem; +- uses the [GitHub Pages / Actions workflow] to build and publish the site on GitHub Pages. + +To get started with creating a site, simply: + +1. click "[use this template]" to create a GitHub repository +2. go to Settings > Pages > Build and deployment > Source, and select GitHub Actions + +If you want to maintain your docs in the `docs` directory of an existing project repo, see [Hosting your docs from an existing project repo](#hosting-your-docs-from-an-existing-project-repo). + +After completing the creation of your new site on GitHub, update it as needed: + +## Replace the content of the template pages + +Update the following files to your own content: + +- `index.md` (your new home page) +- `README.md` (information for those who access your site repo on GitHub) + +## Changing the version of the theme and/or Jekyll + +Simply edit the relevant line(s) in the `Gemfile`. + +## Adding a plugin + +The Just the Docs theme automatically includes the [`jekyll-seo-tag`] plugin. + +To add an extra plugin, you need to add it in the `Gemfile` *and* in `_config.yml`. For example, to add [`jekyll-default-layout`]: + +- Add the following to your site's `Gemfile`: + + ```ruby + gem "jekyll-default-layout" + ``` + +- And add the following to your site's `_config.yml`: + + ```yaml + plugins: + - jekyll-default-layout + ``` + +Note: If you are using a Jekyll version less than 3.5.0, use the `gems` key instead of `plugins`. + +## Publishing your site on GitHub Pages + +1. If your created site is `YOUR-USERNAME/YOUR-SITE-NAME`, update `_config.yml` to: + + ```yaml + title: YOUR TITLE + description: YOUR DESCRIPTION + theme: just-the-docs + + url: https://YOUR-USERNAME.github.io/YOUR-SITE-NAME + + aux_links: # remove if you don't want this link to appear on your pages + Template Repository: https://github.com/YOUR-USERNAME/YOUR-SITE-NAME + ``` + +2. Push your updated `_config.yml` to your site on GitHub. + +3. In your newly created repo on GitHub: + - go to the `Settings` tab -> `Pages` -> `Build and deployment`, then select `Source`: `GitHub Actions`. + - if there were any failed Actions, go to the `Actions` tab and click on `Re-run jobs`. + +## Building and previewing your site locally + +Assuming [Jekyll] and [Bundler] are installed on your computer: + +1. Change your working directory to the root directory of your site. + +2. Run `bundle install`. + +3. Run `bundle exec jekyll serve` to build your site and preview it at `localhost:4000`. + + The built site is stored in the directory `_site`. + +## Publishing your built site on a different platform + +Just upload all the files in the directory `_site`. + +## Customization + +You're free to customize sites that you create with this template, however you like! + +[Browse our documentation][Just the Docs] to learn more about how to use this theme. + +## Hosting your docs from an existing project repo + +You might want to maintain your docs in an existing project repo. Instead of creating a new repo using the [just-the-docs template](https://github.com/just-the-docs/just-the-docs-template), you can copy the template files into your existing repo and configure the template's Github Actions workflow to build from a `docs` directory. You can clone the template to your local machine or download the `.zip` file to access the files. + +### Copy the template files + +1. Create a `.github/workflows` directory at your project root if your repo doesn't already have one. Copy the `pages.yml` file into this directory. GitHub Actions searches this directory for workflow files. + +2. Create a `docs` directory at your project root and copy all remaining template files into this directory. + +### Modify the GitHub Actions workflow + +The GitHub Actions workflow that builds and deploys your site to Github Pages is defined by the `pages.yml` file. You'll need to edit this file to that so that your build and deploy steps look to your `docs` directory, rather than the project root. + +1. Set the default `working-directory` param for the build job. + + ```yaml + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: docs + ``` + +2. Set the `working-directory` param for the Setup Ruby step. + + ```yaml + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' + bundler-cache: true + cache-version: 0 + working-directory: '${{ github.workspace }}/docs' + ``` + +3. Set the path param for the Upload artifact step: + + ```yaml + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: "docs/_site/" + ``` + +4. Modify the trigger so that only changes within the `docs` directory start the workflow. Otherwise, every change to your project (even those that don't affect the docs) would trigger a new site build and deploy. + + ```yaml + on: + push: + branches: + - "main" + paths: + - "docs/**" + ``` + +## Licensing and Attribution + +This repository is licensed under the [MIT License]. You are generally free to reuse or extend upon this code as you see fit; just include the original copy of the license (which is preserved when you "make a template"). While it's not necessary, we'd love to hear from you if you do use this template, and how we can improve it for future use! + +The deployment GitHub Actions workflow is heavily based on GitHub's mixed-party [starter workflows]. A copy of their MIT License is available in [actions/starter-workflows]. + +---- + +[^1]: [It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll#creating-your-site). + +[Jekyll]: https://jekyllrb.com +[Just the Docs]: https://just-the-docs.github.io/just-the-docs/ +[GitHub Pages]: https://docs.github.com/en/pages +[GitHub Pages / Actions workflow]: https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/ +[Bundler]: https://bundler.io +[use this template]: https://github.com/just-the-docs/just-the-docs-template/generate +[`jekyll-default-layout`]: https://github.com/benbalter/jekyll-default-layout +[`jekyll-seo-tag`]: https://jekyll.github.io/jekyll-seo-tag +[MIT License]: https://en.wikipedia.org/wiki/MIT_License +[starter workflows]: https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml +[actions/starter-workflows]: https://github.com/actions/starter-workflows/blob/main/LICENSE diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..7965439 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,30 @@ +title: Webgriffe Sylius ActiveCampaign plugin documentation +description: A complete guide to install and use the Sylius ActiveCampaign plugin +theme: just-the-docs +logo: "/images/sylius-logo.png" +favicon_ico: "/images/sylius-logo.png" +enable_copy_code_button: true + +url: https://webgriffe.github.io + +aux_links: + Template Repository: https://github.com/webgriffe/SyliusActiveCampaignPlugin + +footer_content: "Copyright © 2023 Webgriffe." + +# Footer last edited timestamp +last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter +last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html + +# Footer "Edit this page on GitHub" link text +gh_edit_link: true # show or hide edit this page link +gh_edit_link_text: "Edit this page on GitHub." +gh_edit_repository: "https://github.com/webgriffe/SyliusActiveCampaignPlugin" # the github URL for your repo +gh_edit_branch: "master" # the branch that your docs is served from +gh_edit_source: docs # the source that your files originate from +gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately + +# Google Analytics Tracking (optional) +# Supports a CSV of tracking ID strings (eg. "UA-1234567-89,G-1AB234CDE5") +ga_tracking: +ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true/nil by default) diff --git a/docs/04-Contributing.md b/docs/contributing/index.md similarity index 83% rename from docs/04-Contributing.md rename to docs/contributing/index.md index 2c06611..fabec1c 100644 --- a/docs/04-Contributing.md +++ b/docs/contributing/index.md @@ -1,6 +1,11 @@ -# Contributing +--- +title: Contributing +layout: page +nav_order: 4 +has_children: true +--- -[Return to Summary main page](README.md) +# Contributing In order to contribute to this plugin you have to clone this repository, create a branch for your feature or bugfix, do your changes and then make sure al tests are passing. @@ -16,6 +21,3 @@ your changes and then make sure al tests are passing. To be able to set up a plugin's database, remember to configure you database credentials in `tests/Application/.env` and `tests/Application/.env.test`. - -- [Run tests](04_A-Tests.md) -- [Opening Sylius in the plugin](04_B-Opening_Sylius.md) diff --git a/docs/04_B-Opening_Sylius.md b/docs/contributing/opening_sylius.md similarity index 82% rename from docs/04_B-Opening_Sylius.md rename to docs/contributing/opening_sylius.md index 2e0c908..07ec0c3 100644 --- a/docs/04_B-Opening_Sylius.md +++ b/docs/contributing/opening_sylius.md @@ -1,6 +1,11 @@ -# Opening Sylius in the plugin +--- +title: Opening Sylius in the plugin +layout: page +nav_order: 1 +parent: Contributing +--- -[Return to Contributing](04-Contributing.md) +# Opening Sylius in the plugin - Using `test` environment: @@ -15,5 +20,3 @@ (cd tests/Application && APP_ENV=dev bin/console sylius:fixtures:load) (cd tests/Application && APP_ENV=dev bin/console server:run -d public) ``` - -[Return to Contributing](04-Contributing.md) diff --git a/docs/04_A-Tests.md b/docs/contributing/tests.md similarity index 93% rename from docs/04_A-Tests.md rename to docs/contributing/tests.md index 5344a29..fabab68 100644 --- a/docs/04_A-Tests.md +++ b/docs/contributing/tests.md @@ -1,6 +1,11 @@ -# Running tests +--- +title: Running tests +layout: page +nav_order: 2 +parent: Contributing +--- -[Return to Contributing](04-Contributing.md) +# Running tests - PHPUnit @@ -62,5 +67,3 @@ ```bash vendor/bin/ecs check ``` - -[Return to Contributing](04-Contributing.md) diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..fbe5d31 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,49 @@ +--- +title: Home +layout: home +nav_order: 0 +--- + +# Webgriffe Sylius ActiveCampaign plugin + +## What does this plugin do? + +The _SyliusActiveCampaignPlugin_ takes care of creating and updating contacts, connections, orders, and abandoned carts on +_ActiveCampaign_. + +## Who is this plugin for? + +**Everyone**! This plugin works for those who have never used _ActiveCampaign_ before and also for those who already use +_ActiveCampaign_ and want to integrate it with _Sylius_. + +## How can I install the plugin on my Sylius store? + +Please, check the documentation at the [Installation](installation.html) step. + +## Is this plugin conformed to privacy? + +_This plugin does not check if the customers have given their consent for marketing purposes_. Why? Simply because Sylius +does not do it :). The framework (and the plugins so) should be very flexible to be used all over the world. It couldn't +be possible to provide a solution for everyone, so, _the responsibility to choose which customers, orders, and +connections to export to ActiveCampaign is yours_. **Webgriffe does not take any responsibility for incorrect use of this +integration and for not respecting the wishes of users on their eCommerce / website**. At the same time, this plugin was +designed with these issues in mind and is therefore easily customizable. + +## Where do I start? + +First, we recommend that you read the entire documentation. Then you could start to +install the plugin and use the basic features it gives such as the abandoned cart. You could also think to suggest some +new features that this integration could add. So, let's start! 🚀 + + +## Docs Summary + +- [Requirements](requirements.html) +- [Installation](installation.html) +- [Usage](usage/index.html) + - [First setup](usage/first_setup.html) + - [Events](usage/events.html) + - [Automation example](usage/automation_examples.html) +- [Contributing](contributing/index.html) + - [Opening Sylius with plugin](contributing/opening_sylius.html) + - [Running plugin tests](contributing/tests.html) diff --git a/docs/02-Installation.md b/docs/installation.md similarity index 99% rename from docs/02-Installation.md rename to docs/installation.md index ffd0acd..5366e16 100644 --- a/docs/02-Installation.md +++ b/docs/installation.md @@ -1,6 +1,10 @@ -# Installation +--- +title: Installation +layout: page +nav_order: 2 +--- -[Return to Summary main page](README.md) +# Installation 1. Run ```shell diff --git a/docs/01-Requirements.md b/docs/requirements.md similarity index 60% rename from docs/01-Requirements.md rename to docs/requirements.md index 0786233..787576d 100644 --- a/docs/01-Requirements.md +++ b/docs/requirements.md @@ -1,6 +1,10 @@ -# Requirements +--- +title: Requirements +layout: page +nav_order: 1 +--- -[Return to Summary main page](README.md) +# Requirements * PHP `^8.0` or higher * Sylius `^1.12` diff --git a/docs/03_C-Automation_example.md b/docs/usage/automation_examples.md similarity index 83% rename from docs/03_C-Automation_example.md rename to docs/usage/automation_examples.md index 2551814..a372a76 100644 --- a/docs/03_C-Automation_example.md +++ b/docs/usage/automation_examples.md @@ -1,13 +1,18 @@ -# Automation examples +--- +title: Automation examples +layout: page +nav_order: 3 +parent: Usage +--- -[Return to Usage](03-Usage.md) +# Automation examples ### Subscribe automatically to a list This guide shows you how to associate a new contact to an ActiveCampaign's list automatically. First enter on your ActiveCampaign app and create a new `Automation`. Select `Start from Scratch` from the automation templates. -![Create a blank automation](images/create_an_automation.png "Create an automation") +![Create a blank automation](/images/create_an_automation.png "Create an automation") Select `Tag is added` as trigger. Enter the `sylius-customer` tag (this is automatically added by ActiveCampaign on each Ecommerce Customer created). Select how many times the automation should run and then check @@ -15,12 +20,12 @@ the `Segment the contacts entering this automations`. In the first select choose can search it) and select for which connections the contact should have opted in. You can add any other conditions as you need. Then `Save Start`. -![Tag is added trigger](images/tag_is_added.png "Tag is added") +![Tag is added trigger](/images/tag_is_added.png "Tag is added") Then `Add a New Action`. Choose the `Contacts` tab on the left and then the `Subscribe action`. Select the list to which associate the contact and then `Save`. -![Select list to subscribe](images/list_to_subscribe.png "Select list to subscribe") +![Select list to subscribe](/images/list_to_subscribe.png "Select list to subscribe") Save the automation and active it. @@ -31,19 +36,19 @@ _Congratulations!_ You have completed subscribe to a list automation. This guide shows you how to email the customer for his new abandoned cart. Create new `automation` and select `Start from Scratch` as a template. -![Create a blank automation](images/create_an_automation.png "Create an automation") +![Create a blank automation](/images/create_an_automation.png "Create an automation") Select `Contact abandons an ecommerce cart` as starting trigger. Choose which connection to start the automation. You can add any filter on the product, category, or cart you want. Select how many times the action should run. Then check the `Segment the contacts entering this automation`. Select `Has opted in to marketing` in the first select and then choose for which connections the marketing should be accepted in the second. Obviously, you can add any other conditions. The `Save Start`. -![Contact abandon cart trigger](images/contact_abandon_cart.png "Contact abandon cart") +![Contact abandon cart trigger](/images/contact_abandon_cart.png "Contact abandon cart") Add a new Action by selecting `Send an email` inside the `Sending Options` tab on the left. Select the email template or create a new one then click on `Save`. -![Select email template](images/select_email.png "Select email") +![Select email template](/images/select_email.png "Select email") Remember to activate your automation. @@ -67,5 +72,3 @@ the `webgriffe_sylius_active_campaign.cart_becomes_abandoned_period` parameter. _Congratulations!_ You have created an Abandoned cart automation! - -[Return to Usage](03-Usage.md) diff --git a/docs/03_B-Events.md b/docs/usage/events.md similarity index 95% rename from docs/03_B-Events.md rename to docs/usage/events.md index 9099ebd..e0fb431 100644 --- a/docs/03_B-Events.md +++ b/docs/usage/events.md @@ -1,6 +1,11 @@ -# Events +--- +title: Events +layout: page +nav_order: 2 +parent: Usage +--- -[Return to Usage](03-Usage.md) +# Events After the initial setup, the plugin will automatically maintain in sync ActiveCampaign and Sylius resources thanks to Sylius's resources events. @@ -41,5 +46,3 @@ Order/Abandoned Cart Remove. The EcommerceOrderEnqueuer will automatically check cart or a order in state new or fulfilled it will create an EcommerceOrder Create or Update message. Otherwise, if the order state is canceled, it will create a EcommerceOrderRemove message and then remove the ActiveCampaign Ecommerce Order's id on the Sylius order if it is present. - -[Return to Usage](03-Usage.md) diff --git a/docs/03_A-First_setup.md b/docs/usage/first_setup.md similarity index 99% rename from docs/03_A-First_setup.md rename to docs/usage/first_setup.md index ab10170..d0eba22 100644 --- a/docs/03_A-First_setup.md +++ b/docs/usage/first_setup.md @@ -1,6 +1,11 @@ -# First setup +--- +title: First setup +layout: page +nav_order: 1 +parent: Usage +--- -[Return to Usage](03-Usage.md) +# First setup Right after installing the plugin, you need to export all the resources to ActiveCampaign if you start from scratch, persist the ActiveCampaign resource's id on Sylius resource if you already have ActiveCampaign populated, and/or of @@ -160,5 +165,3 @@ You can also launch the command without any arguments, it will ask you automatic ```shell php bin/console webgriffe:active-campaign:enqueue-ecommerce-order ``` - -[Return to Usage](03-Usage.md) diff --git a/docs/03-Usage.md b/docs/usage/index.md similarity index 98% rename from docs/03-Usage.md rename to docs/usage/index.md index 1bee1af..5a0ebfd 100644 --- a/docs/03-Usage.md +++ b/docs/usage/index.md @@ -1,6 +1,11 @@ -# Usage +--- +title: Usage +layout: page +nav_order: 3 +has_children: true +--- -[Return to Summary main page](README.md) +# Usage > This plugin makes use of the two components of _Symfony_ [Messenger][symfony_messenger] > and [Serializer][symfony_serializer]. @@ -220,10 +225,6 @@ example. Here are some points/actions to do or to take inspiration from to start using the plugin: -- [First setup](03_A-First_setup.md) -- [Events](03_B-Events.md) -- [Automation examples](03_C-Automation_example.md) - [symfony_messenger]: https://symfony.com/doc/current/messenger.html [symfony_serializer]: https://symfony.com/doc/current/serializer.html diff --git a/src/Model/ActiveCampaign/Connection.php b/src/Model/ActiveCampaign/Connection.php index b89e5dc..2ef2bec 100644 --- a/src/Model/ActiveCampaign/Connection.php +++ b/src/Model/ActiveCampaign/Connection.php @@ -8,7 +8,7 @@ final class Connection implements ConnectionInterface { private const SYLIUS_LOGO_URL = 'https://raw.githubusercontent.com/webgriffe/SyliusActiveCampaignPlugin/master/docs/images/sylius-logo.png'; - private const WEBGRIFFE_SYLIUS_ACTIVE_CAMPAIGN_PLUGIN_GITHUB_URL = 'https://github.com/webgriffe/SyliusActiveCampaignPlugin'; + private const WEBGRIFFE_SYLIUS_ACTIVE_CAMPAIGN_PLUGIN_GITHUB_URL = 'https://webgriffe.github.io/SyliusActiveCampaignPlugin'; public function __construct( private string $service,