Skip to content

Commit

Permalink
Merge branch 'release/0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackMorganNZ committed Jan 9, 2018
2 parents d93f3ef + 2d0cedb commit 9e88f81
Show file tree
Hide file tree
Showing 241 changed files with 2,768 additions and 488 deletions.
6 changes: 1 addition & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
|Verto Image|

|Build Status| |Code Climate Status|
|Build Status|

Verto is an extension of the Python Markdown package, which allows
authors to include complex HTML elements with simple text tags in their
Expand Down Expand Up @@ -82,10 +82,6 @@ The changelog is available within the `documentation`_.
.. |Build Status| image:: https://travis-ci.org/uccser/verto.svg?branch=master
:target: https://travis-ci.org/uccser/verto

.. |Code Climate Status| image:: https://codeclimate.com/github/uccser/verto/badges/gpa.svg
:target: https://codeclimate.com/github/uccser/verto
:alt: Code Climate

.. |Verto Image| image:: https://raw.githubusercontent.com/uccser/verto/master/verto/images/verto-logo.png
:target: https://github.com/uccser/verto
:alt: Verto GitHub
91 changes: 54 additions & 37 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,43 @@
Changelog
#######################################

0.7.0
=======================================

Fixes:

- :doc:`processors/relative-link` processor will now handle query parameters.
- Modify :doc:`processors/panel` processor for translating subtitles, by requiring subtitle text as second level heading.
- Modify :doc:`processors/image` processor for translating captions, by requiring caption text between start and end tags.
- Modify :doc:`processors/image` processor to allow finer control of output, in particular when dealing with image with width values.
- Add new tag configuration value ``tag_argument`` to override tag name.
- Dependency updates:

- Update ``markdown`` to 2.6.10.
- Update ``Jinja2`` to 2.10.
- Update ``setuptools`` to 38.2.5.
- Update ``sphinx`` to 1.6.5.

0.6.1
=======================================

Fixes:

- Adds all interactives to required files.
- Typo in Interactive documentation.
- Adds all interactives to required files.
- Typo in interactive tag documentation.

0.6.0
=======================================

Features:

- Added :doc:`processors/image-inline` processor, intended for use in tables.
- Added :doc:`processors/scratch-inline` processor for inline scratch support.
- Added :doc:`processors/image-inline` processor, intended for use in tables.
- Added :doc:`processors/scratch-inline` processor for inline scratch support.

Fixes:

- Removed ``beautifulsoup4`` dependency.
- Typo in VertoResult documentation (*heading_root* -> *heading_tree*).
- Removed ``beautifulsoup4`` dependency.
- Typo in VertoResult documentation (*heading_root* -> *heading_tree*).

0.5.3
=======================================
Expand All @@ -29,46 +46,46 @@ In this hotfix Verto result data for unique identifiers and required files is no

Fixes:

- Remove implicit Beautify processor, fixing white-spacing issues.
- All terms are added to glossary correctly now.
- Remove implicit Beautify processor, fixing white-spacing issues.
- All terms are added to glossary correctly now.

0.5.2
=======================================

Fixes:

- Verto container tags, are now supported in markdown lists.
- Verto container tags, are now supported in markdown lists.

0.5.1
=======================================

Fixes:

- Verto tags and custom tags, are now support embedding into markdown lists.
- Verto tags and custom tags, are now support embedding into markdown lists.

0.5.0
=======================================

Fixes:

- A new more descriptive error when an argument is given and not readable.
- Custom HTML string parsing has been implemented, allowing for correct parsing of HTML and XHTML in templates.
- A new more descriptive error when an argument is given and not readable.
- Custom HTML string parsing has been implemented, allowing for correct parsing of HTML and XHTML in templates.

Documentation:

- Basic example in README.
- New contributing documentation.
- Fixed reference to incorrect file in the image processor documentation.
- Added new documentation for implicit processors.
- Basic example in README.
- New contributing documentation.
- Fixed reference to incorrect file in the image processor documentation.
- Added new documentation for implicit processors.

0.4.1
=======================================

Fixes:

- pypi configuration fixes.
- pyup configuration to use develop branch.
- Improved asset file loading for deployed package.
- pypi configuration fixes.
- pyup configuration to use develop branch.
- Improved asset file loading for deployed package.

0.4.0
=======================================
Expand All @@ -78,29 +95,29 @@ Fourth prerelease of the Verto converter.

Adds support for the following processors:

- :doc:`processors/iframe`
- :doc:`processors/interactive`
- :doc:`processors/heading`
- :doc:`processors/scratch`
- :doc:`processors/table-of-contents`
- :doc:`processors/iframe`
- :doc:`processors/interactive`
- :doc:`processors/heading`
- :doc:`processors/scratch`
- :doc:`processors/table-of-contents`

Features:

- The :doc:`processors/scratch` processor supports ``split`` and ``random`` options.
- The :doc:`processors/scratch` processor supports ``split`` and ``random`` options.

Fixes:

- Scratch blocks work with other extensions.
- Glossary slugs are now added to the output of Verto.
- Processors are now ordered correctly.
- Scratch blocks work with other extensions.
- Glossary slugs are now added to the output of Verto.
- Processors are now ordered correctly.


0.3.1
=======================================

Fixes:

- Updated documentation and changelog.
- Updated documentation and changelog.

0.3.0
=======================================
Expand All @@ -109,17 +126,17 @@ Third prerelease of the Verto converter.

Adds support for the following processors:

- :doc:`processors/heading`
- :doc:`processors/iframe`
- :doc:`processors/interactive`
- :doc:`processors/scratch`
- :doc:`processors/table-of-contents`
- :doc:`processors/heading`
- :doc:`processors/iframe`
- :doc:`processors/interactive`
- :doc:`processors/scratch`
- :doc:`processors/table-of-contents`

Fixes:

- Verto now orders tags correctly in the markdown pipeline.
- System tests for multiple calls to Verto and for multi-line templates.
- Glossary tags now correctly store slugs for the Verto result as per documentation.
- Verto now orders tags correctly in the markdown pipeline.
- System tests for multiple calls to Verto and for multi-line templates.
- Glossary tags now correctly store slugs for the Verto result as per documentation.

0.2.0
=======================================
Expand Down
3 changes: 2 additions & 1 deletion docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ The json description of a generic processor must contain the attributes:
- ``arguments``: An object describing arguments passed to the tag.
- ``template_parameters``: An object describing template parameters.
- (Optional) ``template_name``: A custom name for the html-template to use. Defaults to the processor name otherwise.
- (Optional) ``tag_argument``: The text given at the beginning of a tag (e.g. the tag argument for ``{image file-path="example.png"}`` is ``image``). This is only necessary for processors with different names sharing the same resources (e.g. both ``image-container`` and ``image-tag`` share the ``tag_argument``).

The ``argument`` parameter is a dictionary (or object) containing argument name, argument-info pairs. Where the argument-info contains the attributes:

Expand All @@ -161,7 +162,7 @@ The ``argument`` parameter is a dictionary (or object) containing argument name,

These arguments are transformed for use in the html-template by the ``template_parameters`` attribute. This attribute is similar to the ``argument`` attribute by containing parameter name, parameter-info pairs. Where the parameter-info contains the attributes:

- ``argument``: The name of the argument to retrieve the value of to use/transform into the parameter value.
- ``argument``: The name of the argument to retrieve the value of to use/transform into the parameter value.
- (Optional) ``default``: The value the parameter defaults to if the argument is not given otherwise defaults to ``None``.
- (Optional) ``transform``: The name of the transform to modify the argument value by or defaults to null for no transformation. The avaliable transforms are detailed below.
- (Optional) ``transform_condition``: A function that takes the context after parameters are set but before transformation (The transformations are done in order they appear in the json document). If the function returns ``True`` then the transformation is applied.
Expand Down
39 changes: 31 additions & 8 deletions docs/source/processors/image-inline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,53 @@ Overriding HTML for Images

When overriding the HTML for images, the following Jinja2 placeholders are available:

- ``{{ file_path }}`` - The location for the path to the URL.
- ``{{ full_file_path }}`` - The location for the path to the URL.
- ``{{ alt }}`` - The alternative text for the image.
- ``{{ hover_text }}`` - The text to display when the user hovers over the image (see `image title attribute <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title>`_).
- ``{{ caption }}`` - The text for the image caption.
- ``{{ caption_link }}`` - The URL for the caption link .
- ``{{ source_link }}`` - The URL for the source .
- ``{{ file_relative }}`` - If the ``full_file_path`` is a relative link, this is the boolean value ``True``, otherwise ``False``.

If the ``file_path`` provided is a relative link, the link is passed through the ``relative-file-link.html`` template.
The default HTML for relative images is:
If ``{{ file_relative }}`` is ``True``, the following placeholders are also available to allow finer control of output of relative images (see *Example 2* below):

.. literalinclude:: ../../../verto/html-templates/relative-file-link.html
:language: css+jinja
- ``{{ file_path }}`` - The file path of the image, with file extension removed.
- ``{{ file_extension }}`` - The file extension for the image.
- ``{{ file_width_value }}`` - If the file name of the image ends in a width suffix (for example: ``apple@200px.png``), this is the numerical width value as an integer (in the example before: ``200``).
- ``{{ file_width_unit }}`` - If the file name of the image ends in a width suffix (for example: ``apple@200px.png``), this is the width unit (in the example before: ``px``).

**Example 1**

For example, providing the following HTML:

.. literalinclude:: ../../../verto/tests/assets/image-inline/doc_example_override_html_template.html
:language: css+jinja
:language: css+jinja

with the following tag:

.. literalinclude:: ../../../verto/tests/assets/image-inline/doc_example_override_html.md
:language: none
:language: none

would result in:

.. literalinclude:: ../../../verto/tests/assets/image-inline/doc_example_override_html_expected.html
:language: html
:language: html

**Example 2**

This is an example of using the ``scrset`` attribute for relative images.

The following HTML for ``image.html``:

.. literalinclude:: ../../../verto/tests/assets/image-inline/doc_example_2_override_html_template.html
:language: css+jinja

with the following tag:

.. literalinclude:: ../../../verto/tests/assets/image-inline/doc_example_2_override_html.md
:language: none

would result in:

.. literalinclude:: ../../../verto/tests/assets/image-inline/doc_example_2_override_html_expected.html
:language: html
Loading

0 comments on commit 9e88f81

Please sign in to comment.