Skip to content

Commit

Permalink
Merge pull request #1 from Je-ni/master
Browse files Browse the repository at this point in the history
I corrected some typos in the readme
  • Loading branch information
Valentine-Mario authored Aug 4, 2020
2 parents b11ba71 + 5dd7517 commit 00e5c9e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SCML (Scripting Markup Language)


Scripting Markup Language is a custom easy to use markup language with HTML-like syntax with extra features that transpile to Javascript and HTML.


The idea of SCML was to give simple markup extra features, that anyone can easily get started with and get a web page running with little knowledge of JS. It allows you to write less and get more! It is written entirely in the Rust programming language.

To download the binary for the cli [click](https://github.com/Valentine-Mario/SCML/releases/tag/1.0.0)
Expand Down Expand Up @@ -111,8 +111,10 @@ Note: Avoid importing segments in itself.
#### Import SCML files and reuse segments from other files



SCML also allows you reuse other SCML files. Instead of rewriting headers and footers for every HTML files, you can easily create an SCML header and footer file, then import it to be used in your current file using the syntax inFile[path_to_scml]. Sweet right? :grin:


Let's look at an example.
Create a file called **header.scml** and add the following content to it

Expand Down Expand Up @@ -192,6 +194,7 @@ inFile[file2.scml]

Notice that file 1 is imported in file 2 while file 2 is imported in file 3. When File 3 is transpiled, it would contain the contents of file 1 and file 2 because it is dependent on file 2 which is dependent on file 1. And of course you can reuse segments in either file 2 or file 1 from file 3.


#### Comments

Adding comments is pretty simple. To add a comment to your SCML code, just start the line with # to comment out a particular line
Expand All @@ -203,6 +206,7 @@ Adding comments is pretty simple. To add a comment to your SCML code, just start
```
Commented sections would not be included in the transpiled HTML


Note: Avoid using extra spaces when importing files eg: inFile[ file.scml], inFile [file.scml] would be ignored.

## JS PROCESSING
Expand Down Expand Up @@ -237,6 +241,7 @@ This allows you to get the content of a tag:
```
This would get the content of the tag and assign them to the variable name var1 we decleard above.


#### Append text
To append text to a particular html tag, use the following syntax:

Expand Down

0 comments on commit 00e5c9e

Please sign in to comment.