IBM / magkit-vanity-url

Allows to comfortably configure vanity URLs in the Magnolia CMS, without requiring the user to have write-access to the config workspace. Ideal for page/content editors who are not supposed to write to the config workspace. Also creates QR codes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Magnolia Vanity-URL App

build-module Magnolia compatibility Magnolia compatibility Magnolia compatibility Magnolia compatibility Magnolia compatibility Magnolia compatibility

Scope

A module containing an app for the Magnolia CMS

Allows to configure vanity URLs in the Magnolia CMS without requiring access to the config workspace. Ideal for page/content editors who are not supposed to write to the config workspace. Also creates QR codes for quick testing with your mobile phone.

Usage

This repository contains some example best practices for open source repositories:

Issue tracking

Issues are tracked at GitHub.

Any bug reports, improvement or feature pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Maven artifacts in Magnolia's Nexus

The code is built by GitHub actions. You can browse available artifacts through Magnolia's Nexus

Maven dependency

    <dependency>
        <artifactId>magkit-vanity-url</artifactId>
        <groupId>de.ibmix.magkit</groupId>
        <version>1.6.0</version>
    </dependency>

Versions

  • Version 1.2.x is compatible with Magnolia 5.2.x
  • Version 1.3.x is compatible with Magnolia 5.3.x
  • Version 1.4.x is compatible with Magnolia 5.4.x and 5.5.x
  • Version 1.5.x is compatible with Magnolia 5.6.x, 5.7.x, 6.1.x and 6.2.x
  • Version 1.6.x is compatible with Magnolia 6.2.x (new UI support)

Magnolia Module Configuration

You can configure the following settings in the module configuration by JCR or yaml:

  • excludes : Pattern of urls, which are no candidates for vanity urls.
    • by default an exclude for all urls containing a dot is configured, that prevents the virtual uri mapping checks every ordinary request like script.js or page.html
  • publicUrlService : Implementation of de.ibmix.magkit.vanityurl.PublicUrlService. Two implementations are already available.
    • de.ibmix.magkit.vanityurl.DefaultPublicUrlService (default) : Use of default base url and site configuration with context path replacement.
    • de.ibmix.magkit.vanityurl.SimplePublicUrlService : Uses configured public prefix and removes the author context path.
  • headlessEndpoint : is used for headless support and defines the pages rest endpoint which should be checked for vanity urls
  • previewImage : image type of preview image. SVG and PNG is possible (default is SVG).

Headless support (with version 1.6.1)

For using the headless support you have to decorate the default vanity url virtual uri mapping. It is also possible to define an additional virtual uri mapping if you want to support both renderings. All you need is the following yaml which you can place in your module as decoration of the vanity url module (your-module/decorations/magkit-vanity-url/virtualUriMappings) or as own virtual uri mapping (your-module/virtualUriMappings).

class: de.ibmix.magkit.vanityurl.HeadlessVirtualVanityUriMapping

License

All source files must include a Copyright and License header. The SPDX license header is preferred because it can be easily scanned.

If you would like to see the detailed LICENSE click here.

#
# Copyright 2020- IBM Inc. All rights reserved
# SPDX-License-Identifier: Apache2.0
#

About

Allows to comfortably configure vanity URLs in the Magnolia CMS, without requiring the user to have write-access to the config workspace. Ideal for page/content editors who are not supposed to write to the config workspace. Also creates QR codes.

License:Apache License 2.0


Languages

Language:Java 100.0%