-
Notifications
You must be signed in to change notification settings - Fork 0
Source files
Source files are placed in the content directory of your project, must be in XML format, and must have an extension of .xml so that Salal can identify them. Here is a simple example:
content
|__index.xml
|__subdirA
|__index.xml
|__subdirB
|__index.xml
A simple source file might look something like this:
<page>
<event-listing name="Battle of the Banjoes"
year="2021" month="04" day="17"
location="123 Main St, Acme AZ, USA"
price="$15 general admission, $10 students and seniors">
The best banjo players in the state go head-to-head for the coveted Golden Fingerpicking Award.
</event-listing>
</page>
All XML elements in the source file must have a corresponding template, so in this case your project will need to have a page template and an event-listing template. Note that the event-listing element is the content of the page element. The content of your elements can either be one or more subelements, or some text. For example, the content of the event-listing element is the text beginning with The best banjo players in the state. At this time Salal does not permit you to mix text and subelements in your content. So, this would be okay:
<page>
<event-listing/>
<event-listing/>
</page>
As would this:
<page>
Here is some text content.
Here is some more text content.
</page>
But not this:
<page>
Here is some text content.
<event-listing/>
</page>
- Home
- About Salal
- Installation
- Tutorials
- Core concepts
- Getting more out of Salal
- Advanced topics
- Change log