From b8c665c08c0f6d22d26a991617f0b20b85c0594c Mon Sep 17 00:00:00 2001 From: Adam Hill Date: Tue, 7 Apr 2020 12:57:48 -0400 Subject: [PATCH] Bump version. --- CHANGELOG.md | 7 +++++++ README.md | 6 ++++-- pyproject.toml | 2 +- setup.py | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f62ab0..709518d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 0.3.0 +Adds the ability for snippets to be either a link (current functionality) or a block element. + +## Breaking changes +- `snippet` Wagtail feature renamed to `snippet-link` +- template search looks for `{model}_snippet_link.html` instead of `{model}_snippet.html` + # 0.2.2 Update travis-ci configuration. diff --git a/README.md b/README.md index ea04cd5..57b3a39 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ # wagtail-draftail-snippet +Wagtail has support for adding numerous types of links to `RichTextBlock` content, but there is not a way to tie a link to an arbitrary `snippet` model currently. `wagtail-draftail-snippet` provides a way to create either an `a href` element for a specific `snippet` model based on a template that can be provided, or a completely free-form piece of HTML for a snippet. + The project provides the following draftail (Wagtail Richtext editor) features: 1. `snippet-link`: Allows to create a link using the snippet chooser modal. The link is rendered using the template `{app_name}/{model_name}_snippet_link.html`. 1. `snippet-embed`: Allows to embed a block using the snippet chooser modal. The block is embedded using the template `{app_name}/{model_name}_snippet_embed.html`. -Wagtail has support for adding numerous types of links to `RichTextBlock` content, but there is not a way to tie a link to an arbitrary `snippet` model currently. `wagtail-draftail-snippet` provides a way to add a new button to the Draftail rich text editor, which creates an `a href` element for a specific `snippet` model based on a template that can be provided. +Unsure whether you want to use a snippet link or embed? Embeds have complete flexibility, but 1) break the flow of text in the Draftail richtext editor and 2) can't be used to link arbitrary text. If you want to render a link to a snippet model inside of body copy, then you probably want to use the snippet link. For anything else, the embed can be used. ![Demo of wagtail-draftail-snippet plugin](https://i.imgur.com/pyX25hg.gif) @@ -37,7 +39,7 @@ The package requires Wagtail 2.5 or above. 1. `poetry build` ## Run tests -1. `poetry install --dev` +1. `poetry install` 1. `poetry run pytest` ## Contributors diff --git a/pyproject.toml b/pyproject.toml index 13ddf3d..394fc17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wagtail-draftail-snippet" -version = "0.2.2" +version = "0.3.0" description = "Associate RichTextBlock text content to a snippet model." authors = ["Parbhat Puri ", "Adam Hill "] repository = "https://github.com/themotleyfool/wagtail-draftail-snippet" diff --git a/setup.py b/setup.py index 9b38e89..72f743c 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ if os.path.exists(readme_path): setup( long_description=readme, name='wagtail-draftail-snippet', - version='0.2.2', + version='0.3.0', description='Associate RichTextBlock text content to a snippet model.', python_requires='==3.*,>=3.6.0', project_urls={