Skip to content

πŸ“ File Structure

bernzrdo edited this page Apr 4, 2024 · 5 revisions

This is the default file structure for a lithor project.


πŸ“ build

After building, your static website's files will be saved here.

Warning

Do not create or edit anything here. Any alterations will be lost FOREVER when the project is built.


πŸ“ commands

Script files for comment commands are stored here. These files can either be JavaScript or TypeScript. The name of the file will dictate how the comment command is called.


πŸ“ public

A place to store static files. Useful if you’re trying to include images, videos, audios, documents or any other type of file in the build. Under the hold, it'll copy this directory into the build directory recursively.


πŸ“ src

πŸ“ pages

Every page of your website lives here. Here you can use comment commands. The relative path to the page dictates the URL path to access it. Here are some examples:

Page Path URL Path
src/pages/hello-world.html /hello-world
src/pages/index.html /
src/pages/abc/123.html /abc/123

πŸ“ templates

Templates used by the extends and includes comment command are stored here.

πŸ“ js, ts, css, scss

Script and style files are stored in their respective directory. You may reference these files as their compiled counterparts. Here are some examples:

File path Compiled path
src/js/script.js /js/script.js
src/ts/graphics.ts /js/graphics.js
src/css/style.css /css/style.css
src/scss/cards.scss /css/cards.css

Warning

CSS filenames may conflict with Sass filenames. Same with JavaScript with TypeScript files. Example: style.css will conflict with style.scss.


πŸ“„ lithor.json

The lithor configuration file. Learn more on Configuration.