Learn how you can use processing directives to instruct Cloudpress to process the content of your document in a specific way
@@
, followed by the directive name.()
.name=value
.value
contains spaces, it must be surrounded by quotes ("
), e.g. name="Some value"
.Directive | Description | Supported In |
---|---|---|
@@image | Controls how an image is exported. | Google Docs + Notion |
@@begin_raw_content | Denotes the start of a raw content block | Google Docs + Notion |
@@end_raw_content | Denotes the end of a raw content block | Google Docs + Notion |
@@begin_code_block | Denotes the start of a code block | Google Docs |
@@end_code_block | Denotes the end of a code block | Google Docs |
@@split | Splits the rich text content of a document to a seperate field | Google Docs + Notion |
@@image
@@image
directive allows to to specify extra information for an image, such as the alt text or caption. The @@image
directive applies to the next image that Cloudpress encounters in the document.
The @@image
directive supports the arguments listed below:
Argument | Desciption | Required? |
---|---|---|
alt | The alt text of the image | No |
title | The title of the image | No |
caption | The caption of the image | No |
filename | The filename that must be used when Cloudpress uploads the image to your CMS,. Cloudpress will set the file extension based on the image type. | No |
@@image(filename="the-african-wild-dog")
: Specifies that the filename for the next image must be “the-african-wild-dog”@@image(filename="the-african-wild-dog", alt="African wild dog in the Kruger")
: Specifies that the filename for the next image must be “the-african-wild-dog” and the alt text must be “African wild dog in the Kruger”@@image
directive will override the values from the image in the document. For example, if the image in the document has an alt text specified, and you also specify the @@image
directive with an alt
attribute, Cloudpress uses the alt
attribute from the directive rather than the alt text from the image.@@image
directive without any attributes, it will have no effect.@@begin_raw_content
and @@end_raw_content
@@begin_raw_content
and @@end_raw_content
directives are used in a pair to denote the start and end of a raw content block. All the content between @@begin_raw_content
and @@end_raw_content
are exported to your CMS as-is. This allows you to export content to your CMS which would not otherwise be supported by Cloudpress.
Since Cloudpress exports the content as-is, Cloudpress will only export the types of content contained between the @@begin_raw_content
and @@end_raw_content
as per the table below. Any other type of content will be discarded by Cloudpress.
Type of document | Allowed content |
---|---|
Google Doc | - Normal text |
Notion Page | - Text content block - Code block |
@@begin_code_block
and @@end_code_block
@@begin_code_block
and @@end_code_block
directives are used in a pair to denote the start and end of a code block.
These directives are supported only in Google Docs and must contain only normal text between the @@start_
and @@end_
directives. Any other type of content will be discarded by Cloudpress and any formatting (like bold and italics) will be removed from the text.
@@begin_code_block
directive supports the arguments listed below:
Argument | Desciption | Required? |
---|---|---|
language | The programming language used in the code block. This is typically used by the syntax highlighter in CMS, so refer to your CMS for the correct values. | No |
@@split
@@split
directive is used to split the content of your document across multiple fields in your CMS. This is useful when you have multiple rich text fields in your CMS that you want to update from a single source document.
You can use multiple @@split
directives in a single document with each instance of the @@split
directive splitting the content to a separate field.
The @@split
directive support the arguments listed below.
Argument | Desciption | Required? |
---|---|---|
fieldname | The fieldname in your CMS to which the content following this directive must be exported. | Yes |
fieldname
argument will depend on which CMS you use. Please refer to the following Cloudpress documentation for the various CMSs.