This repository is for Webkit 1.0 which uses the XML template formate.
This version of the Webkit features:
- A parser for generating sites using XML syntax and Markdown for shorter and simpler configurations. An example of this syntax can be seen in use here.
- A sandbox and local mode for switching between loading local and remote configurations
- A template system for loading specific layouts from a configuration
- A theme system for loading custom styles from a configuration
- Improved inline styling options
The XML parser will not replace the JSON configuration syntax (which remains available here), but provides an easier configuration syntax for project managers to generate a site from scratch.
<Config>
```
---
site:
title: Site Title
template: Template Name (Vue template, optional)
theme: Edgeryders (CSS theme, optional)
lang: en-US (Language, optional)
```
</Config>
Depending on the template loaded, additional template variables can be set in the frontmatter.
<Config>
```
---
menu:
anchor: true (displays anchor links to sections with an ID)
links: (displays external links)
- text: link text 1
url: https://...
- text: link text 2
url: https://...
header:
image: https://i.redd.it/x5zojh91awfz.jpg (header image)
social: ['url', 'twitter', 'facebook', 'linkedin', 'email'] (social links to display)
```
</Config>
<Webkit>
<Config>
```
---
site:
title: Site Title
template: Template Name (Vue template, optional)
theme: Edgeryders (CSS theme, optional)
lang: en-US (Language, optional)
```
</Config>
<Header>
<Text>
## My header title.
My header paragraph text
[My header link #1](url)
[My header link #2](url)
</Text>
</Header>
<Content>
<Text> A text view with html, embedded images, embedded video </Text>
<Text>
### A subtitle
Another text view
</Text>
</Content>
</Webkit>
You can set the Webkit to Sandbox or Local mode:
- Sandbox mode can load multiple configurations based on the URL of the site
- Local mode loads a single configuration file hosted on the server
---
baseUrl: https://edgeryders.eu
title: Webkit Sandbox
mode: local (or sandbox)
When in sandbox mode, you can provide a default topic ID to read the configuration from the root address.
To load another configuration topic, enter the topic ID after the trailing slash of the address where Webkit is deployed:
For example, to load the configuration of topic 13810
from the local server running webkit:
http://localhost:8080/13810
There are cases where different sites need specific layouts and styling. The templates directory hosts Vue templates that can be loaded conditionnally based on the configuration.
Templates require development of a Vue component located in the src/components/templates
directory, while Themes are CSS files that can be loaded locally or remotely.
Local themes are located in the src/assets/themes
directory.
The template and theme of a site are defined in the frontmatter of the configuration. If no template or theme is specified, Webkit will default to the standard configuration.
---
baseUrl: https://edgeryders.eu
title: Webkit Sandbox
mode: local (or sandbox)
template: Campaign
theme: edgeryders.scss (or topic ID with code block containing CSS)
In the XML syntax, blocks can be styled with standard inline css.
<Content style="background: black; padding: 30px">
## My content title
<Text style="background: blue; font-family: Georgia, serif">
My text view with Georgia
</Text>
</Content>
Markdown elements can also be styled using Block Inline Attribute Lists, which can be used to attach attributes such as a class, id and style to Markdown text.
<Content>
## My red title{style="color: red"}
</Content>
npm install
npm run serve
npm run build
npm run test
npm run lint