Skip to content

Component Reference

Reference to WSTR-specific Astro components

To use these components, you need to:

  • ensure your Markdown file uses the .mdx extension
  • import the component(s) you want to use below the frontmatter section but before any other page content, using a declaration such as:
import Character from '/src/components/Character.astro';

If your component content doesn’t show up on the rendered page, check it has the .mdx extension and that you’ve imported the component correctly.

Additional examples of using these components can be found in Component Coredata Examples.

Displays a list of articles associated with the given tag.

import ArticlesList from '/src/components/ArticlesList.astro';
<ArticlesList [tag="..."] [subset="articlelibonly|topicsonly"] [header="..."] />
PropertyDescription
tagoptional tag to filter the articles listed
subsetoptional subset of articles to display, either articlelibonly or topicsonly
headeroptional header text to display above the list

Unless subset is defined, the component lists contents from both the Article Library and Topic pages.

<ArticlesList tag="encoding" subset="articlelibonly" header="Encoding Articles" />

Encoding Articles

  • Glyph Variant for open o - Description of glyph variants for the Latin character "open o" and their recommended use cases.

Displays a single source in a format suitable for a formal bibliography. Used by the BibList component, but may also be used independently.

import BibEntry from '/src/components/BibEntry.astro';
<BibEntry key="..." />
PropertyDescription
keysource record id in YAML file
<BibEntry key="alone1946" />
Alone, John Philip Herbert Mackenzie. The Alone-Stokes Short Manual of the Amharic Language (with vocabularies). Macmillan, 1946.

Displays a list of related sources in a format suitable for a formal bibliography.

import BibList from '/src/components/BibList.astro';
<BibList tag="..." [header="..."] [entrytype="non-online|article|etc."]/>
PropertyDescription
tagoptional tag to filter the articles listed; all will display all items; if the tag is omitted nothing will be displayed
headeroptional header text to display above the list
entrytypetype of sources to display; valid values are online, article, book, inbook, inproceedings, misc, non-online, all; defaults to all types
<BibList tag='script-cham' header='Bibliography' entrytype='non-online' />

Bibliography

  • Blood, Doris. “The ascendancy of the Cham script: how a literacy workshop became the catalyst”. International Journal of the Sociology of Language, vol. 2008, no. 192, 2008, pp. 45-55, http://dx.doi.org/10.1515/IJSL.2008.034.
  • Brunelle, Marc. “Diglossia, Bilingualism, and the Revitalization of Written Eastern Cham”. 2008.

Displays a list of related sources using an informal format.

import SourceLinksList from '/src/components/SourceLinksList.astro';
<SourceLinksList tag="..." [header="..."] [entrytype="online|article|etc."]/>
PropertyDescription
tagoptional tag to filter the articles listed; ‘all’ will display all items; if the tag is omitted nothing will be displayed
headeroptional header text to display above the list
entrytypetype of sources to display; valid values are online, article, book, inbook, inproceedings, misc, non-online, all; defaults to all types
<SourceLinksList tag='script-gran' header='External Links' entrytype='online' />

External Links


import Character from '/src/components/Character.astro';
<Character usv="XXXX"|char="a" [options="usv,char,name"]/>

Note: Either usv or char must be provided.

PropertyDescription
usvThe USV of the character to display
charA literal character
optionsA comma-separated list of options to display. Options are usv, char, and name. The default is all three.

This example uses the default options, where all three elements appear.

<Character usv="0634"/>

Result: ش

This example uses just usv and char options:

<Character usv="0634" options="usv,char"/>

Result: ش

  • ض

Combining marks are automatically displayed with a dotted circle to indicate their combining nature.

<Character usv="0301"/>

Result: ◌́


:usv[XXXX]
:char[a]
:usv[XXXX]{usv char name}
:char[a]{usv char name}

These directives are able to work in both .md and .mdx files. Please note the :char directive is a little more limited, and cannot accept any whitespace, or certain meta characters without escaping \[, \{, or wrapping in inline code quotes. Astro processes directives after smart quote translation, so :char['] produces U+2019 ’ RIGHT SINGLE QUOTATION MARK instead or the expected U+0027 ' APOSTROPHE.
The following attributes are supported which correspond to the component’s options= attribute.

AttributeDescription
usvDisplay the USV
charDisplay the character
nameDisplay the Unicode name

No specified attributes displays all three by default

This example uses the default options, where all three elements appear.

:usv[0634]

Result: ش

This example uses just usv and char options:

:usv[0635]{usv char}

Result: ص

This example shows the use of :char

:char[` `] and :char[@]{name char}

Result: and @

  • ض
  • $
USVCharNamePhoneme
ب/b/
س/s/
ش/ʃ/
م/m/


import CharacterTable from '/src/components/CharacterTable.astro';
<CharacterTable startUsv="XXXX" endUsv="XXXX" [caption="..."]/>
PropertyDescription
startUsvThe Unicode scalar value of the first character to display
endUsvThe Unicode scalar value of the last character to display
captionThe caption to display below the table
<CharacterTable
startUsv = "0627"
endUsv = "0632"
caption = "Arabic characters 0627-0632"
/>
USV Char Unicode Character Name
ا
ب
ة
ت
ث
ج
ح
خ
د
ذ
ر
ز
Arabic characters 0627-0632