5.13.3 • Published 3 years ago

@mentor-medier/article-tag-block v5.13.3

Weekly downloads
179
License
CC-BY-NC-ND-4.0
Repository
github
Last release
3 years ago

@wpmedia/article-tag-block

Fusion News Article Tags block

Acceptance Criteria

  • If there is a tags array, it will render anchor tags with href set to Tags Slug and clickable text set to Tag Text.
  • If there is a tags array and slug is missing for tags, it will render anchor tags with href set to '#' and clickable text set to Tag Text.
  • If the tags array is empty, it will not render anything.
  • If taxonomy section is missing, it will not render anything.

Props

PropRequiredTypeDescription
required propyes
optional propno
contentConfig examplePlease specify which content sources are compatible

ANS Schema

The Article Tag Block expects the taxonomy section from Composer's ANS schema, which is laid out as

taxonomy: {
          tags: [{
            description: "Tag-1 Description",
            slug: "Tag-1 Slug",
            text: "Tag-1 Text"
        }, {
            description: "Tag-2 Description",
            slug: "Tag-2 Slug",
            text: "Tag-2 Text"
        }]
      }

ANS Fields

  • taxonomy.tags[x].slug Detects for '#' as href for fallback
  • taxonomy.tags[x].text Required to be string
{
  taxonomy: {
    tags: [
      {
        slug: 'sportsball',
        text: 'Sports!'
      },
      {
        slug: '#',
        text: 'General'
      }
    ]
  }
}

Internationalization fields

  • Add all internationalization fields used in the block

Events

Blocks can emit events. The following is a list of events that are emitted by this block.

Event NameDescription
eventNameDescribe the event

Event Listening

Include block specific instructions for event listening.

OR

This block does not emit any events.

Additional Considerations

Optional

5.13.2

3 years ago

5.13.3

3 years ago

5.11.3

3 years ago

5.11.2

3 years ago

5.10.4

3 years ago

5.10.2

3 years ago

5.10.0

3 years ago

5.9.15

3 years ago