Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Latest commit

 

History

History
68 lines (61 loc) · 1.22 KB

SCOPE.md

File metadata and controls

68 lines (61 loc) · 1.22 KB

JSAP SCOPE

Code snippets

Snippets of code that get executed when a JSAP file is parsed

<body>
${ 
    let x = Math.sqrt(3.14159265); 
    return `sqrt of pi is ${x}`;
}
</body>

Expressions

Snippets that return themself

<body>
={ 
    `now is ${new Date()}`;
}
</body>

JSON front-matter

JSAP equevelant to yaml front-matter; It provides specific configuration options for the page (must be first line of the file)

%{
    "isolate": true,
    "error": "404.jsap",
    "cool": "yes",
    "more settings": 10000
}

.JSAPConfig

Configuration files for directories (webserver only, not parser)

{
    "hidden": true,
    "permalink": "different/path",
    "auth": {
        "username": "beep beep",
        "password": "lettuce"
    }
}

Includes

Include other JSAP or html files

<body>
    +"headershiz.html" <!-- include headershiz.html to the file-->
</body>

Comments

Gets removed by the parser, never makes it to the web

-{
    This comment will never show up to the client
}-

Callables

JSAP.forward(url: string): void

Forwards the client to another page

JSAP.frontmatter(): FrontMatter

Gets the parsed front matter