npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

strapi-plugin-preview

v0.7.0

Published

Strapi - Preview plugin

Downloads

44

Readme

Strapi - Preview plugin

Utilities for Strapi Headless CMS that allow to preview content (pointing to custom URL) and allow to create clone of original entry

⏳ Installation

(Use yarn to install this plugin within your Strapi project (recommended). Install yarn with these docs.)

yarn add strapi-plugin-preview

Then need to integrate /extensions folder with content-manager/admin to see manual follow This README

Enjoy 🎉

🖐 Requirements

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

Supported Strapi versions:

  • Strapi v3.5.3 (recently tested)

(This plugin may work with the 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.

Features

-**Create Clone ** Now you will be able to clone every content type entry

-**Publish Clone ** When entry is clone, it could be published, which will overwrite original contentType record

-Preview your entry With customised preview URI, You can preview your draft (entry)

Preview URL customization: plugins.js

in file /config/plugins.js need to add previewUrl field with two parameters like below:

preview: {
  publicationState: 'preview',
  previewUrl: 'http://localhost:8001/preview/:contentType/:id'
}

:contentType - will be replaced with contentType :id - will be replaced with id of contentType record

Component model configuration

Component by default is neither previewable and cloneable . To enable You can configure it by setting previewable or cloneable to true in a configuration json file (*.settings.json):

For example for component called paragraph_component You need to change components/text/paragraph_component.json by modifying option object:

{
  "collectionName": "components_text_paragraph_components",
  "info": {
    "name": "paragraph_component",
    "icon": "align-justify"
  },
  "options": {
+    "previewable": true,
+    "cloneable": true
  },
  "attributes": {
    "body": {
      "type": "text"
    }
  }
}

Previewing and Cloning could be mixed, or you can just set one of them.

Usage

  • Clone - Go to entry and click Clone (it will add new entry and set relation to original entry "cloneOf")
  • Preview - Go to entry and click Preview (it will redirect to URI provided in plugins.js configuration with injected contentType and id)
  • Publish - if entry has cloneOf relation, than You will be able to replace original entry with your modified one by clicking "publish" and confirmation in modal

Contributing

Feel free to fork and make a Pull Request to this plugin project. All the input is warmly welcome!

Community support

For general help using Strapi, please refer to the official Strapi documentation. For additional help, you can use one of these channels to ask a question:

  • Email us We are always glad to help.
  • Slack We're present on official Strapi slack workspace.
  • GitHub (Bug reports, Contributions, Questions and Discussions)

License

MIT License Copyright (c) 2020 VirtusLab Sp. z o.o. & Strapi Solutions.