Socket
Book a DemoInstallSign in
Socket

@strapi-community/strapi-plugin-url-alias

Package Overview
Dependencies
Maintainers
8
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@strapi-community/strapi-plugin-url-alias

Unique, autogenerated URL paths.

1.0.0-alpha.11
latest
npmnpm
Version published
Maintainers
8
Created
Source

Strapi URL alias plugin

Unique, flexible and autogenerated URL aliases for your Strapi managed web content.

NPM Version Monthly download on NPM CI build status codecov.io

This plugin is in ALPHA state

✨ Features

  • Unique URLs No duplicate URLs possible
  • Auto generated Automatically generated based on a pattern
  • Flexible Overwrite single URLs
  • Public endpoint Get your page by path with the /get endpoint
  • Auto slugify The URLs will automatically be slugified to ensure valid paths

✨ #StrapiPluginWeek

This plugin was made as an entry to the Strapi Plugin Week hackathon.

See the demo video.

⏳ Installation

Install the plugin in your Strapi project.

# using yarn
yarn add @strapi-community/strapi-plugin-url-alias

# using npm
npm install @strapi-community/strapi-plugin-url-alias --save

After successful installation you have to rebuild the admin UI so it'll include this plugin. To rebuild and restart Strapi run:

# using yarn
yarn build
yarn develop

# using npm
npm run build
npm run develop

Enjoy 🎉

🖐 Requirements

Complete installation requirements are the exact same as for Strapi itself and can be found in the Strapi documentation.

Supported Strapi versions:

  • Strapi 4.3.2 (recently tested)
  • Strapi ^4.x

(This plugin may work with older Strapi versions, but these are not tested nor officially supported at this time.)

We recommend always using the latest version of Strapi to start your new projects.

💡 Usage

This plugin extends the Strapi edit view to add a 'URL alias' sidebar. In the sidebar you are able to add a URL alias for your page.

You can either overwrite the URL, or have it be generated based on a URL pattern.

🔌 URL pattern

To create dynamic URLs this plugin uses URL patterns. The URL pattern will be used to generate unique URLs based on the data available.

You can add URL patterns in the settings section of the plugin.

/pages/[my-title-field]

Fields can be injected in the pattern by escaping them with [].

The following field types are allowed in a pattern:

  • id
  • uid
  • string

📺 Endpoint

The plugin also comes with an endpoint you can use to find any content by path.

REST

await fetch(`${API_URL}/api/url-alias/get?path=/about-page`);
// GET /api/url-alias/get?path=/about-page

🌎 Community support

📝 Resources

FAQs

Package last updated on 23 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.