The Curvenote CLI ships with a number of additional MyST Markdown directives and roles bundled, these extensions allow you to interact with and add content from Curvenote’s APIs to your Curvenote Site or Journal, and are documented below.
Adding your own custom directives and roles
You can also add your own custom directives to Curvenote by using MyST’s plugin mechanism, adding these to your local folder and curvenote.yml
file as described in MyST’s plugin documentation.
Directives¶
List Articles¶
Add a listing of articles to any content page on your site by including the cn:articles
directive. This allows you to list all published articles for a site or an individual collection on your site and control how this is presented via options such as layout
, limit
and pagination
.
For example, a listing for the SciPy 2023 abtracts collection:
![](https://cdn.curvenote.com/01904c09-9345-769b-8cb4-9578a9fe81f3/public/directives-articles--d645dd1d2f6c9c8083ceaefc5f25bcf6.png)
Example Usage¶
```{cn:articles}
:venue: my-journal
:collection: 2023
:limit: 10
Reference¶
cn:articles
directive¶
A listing directive that can be used to show a list of articles from a specific venue, collection or kind.
- Options
- venue (string, required)
The venue to list articles from.
- collection (string)
The collection to list articles from.
- status (string)
The status of articles to list (published | in-review).
- submission-kind (string)
The kind of articles to list.
- layout (string)
The layout of the of articles (list | cards).
- wide (boolean)
If set, the listing will be wide.
- limit (number)
The maximum number of articles to list.
- pagination (string)
If
limit
is set, this gives a hint to the renderer on how to handle pagination (more | all | scroll).- show-collection (boolean)
If set to true, the listing will show the collection name.
- show-kind (boolean)
If set to true, the listing will show the kind name.
- show-date (boolean)
If set to true, the listing will not show the publication date.
- show-thumbnails (boolean)
If set to true, the listing will not show thumbnails.
- show-count (boolean)
If set to true, the total number of items in the listing will be shown.
List Collections¶
Publications on Curvenote sites and Journals can be organized into collections of articles. These are very flexible and can include different publication kinds, can represent year’s, issues, special editions and can be nested.
Use the cn:collection
directive to add a listing of the collections available on a site, for example as used on the SciPy Conference site.
![](https://cdn.curvenote.com/01904c09-9345-769b-8cb4-9578a9fe81f3/public/directives-collectio-85a74fea8fe66686912af7336ccb7bed.png)
Example Usage¶
```{cn:collections}
:venue: my-journal
:exclude: archive
Reference¶
cn:collections
directive¶
Create a listing of all collections available in the venue.
- Options
- venue (string, required)
The venue to list collections from.
- filter (string)
The status of collections to list (open | closed | all).
- exclude (string)
Collections to ignore, by name and comma separated.
- show-count (boolean)
If set to true, the number of items in the collection will be shown.