Introduction

Blink Your Eyes!
When I said; “Build and deploy websites faster than you can blink your eyes”, I meant it. This site was built even before you could blink your eyes .

Let's get you started

First things first—to use sledge you need python on your computer, so if you don't have python, head to the python download page or read this guide for installing on linux. If you have python installed, great, what are we waiting for lets get you started. You need to install sledge using this command: pip install sledge If this command fails, and says something like:
bash: pip: command not found
# on bash
'pip' is not recognized as an internal or external command,
operable program or batch file.
# on windows
              
Then you don't have pip in your PATH environment variable. This is what you should do; go to where you have python installed on your file explorer, for example on Windows C:\Python27\, then navigate to the Scripts dir. Now you should see pip.exe, pip<version-major>.exe (where <version-major> is the major version of python). Two things you may decide to do:
  • Add this directory to your PATH environment variable.
  • For Windows Users: Click Shift on the keyboard and right click your mouse on the Scripts dir. You should see "open command window here", go ahead and click it, and now run pip install sledge

After installing sledge, in fact, you need to do nothing more, you can start writing your markup script which we call Remarkup and have sledge build them for you. Now navigate to you project folder on your command terminal.

cd my/project/folder
python sledge init
                
This command initializes a new sledge project which has the following directory tree structure
project/
|__ folder/
    |__ src/
        |__ imports/
        |__ layout/
        |   |__ layout.frame
        |   |__ layout.yml
        |__ pages/
        |   |__ .framerc
        |   |__ index.frame
        |__ panes/
            |__ index.yml
            |__ specific.yml
                
The pages folder is where all your webpage should be. They may contain subfolders, and these subfolders can contain .frame files. The pages folder may also contain other files and subfolders that may not be part of your webpage, but you'd want to let sledge know that those files and folders should be ignored.

Ignoring directory junks

To ignore junk files and folders in your main directory which is the pages dir, a .framerc file will be initialised. This file must be a json file. Here is an example:
{
  "ignore": ["junks", "junk2", "example.frame", "users/settings.frame"],
  "filter": [".frame"]
}
              

Every one of the paths specified in your ignore must be relative to the root, which is the pages directory, and glob patterns are not supported yet. By default, if your root dir doesn't contain a .framerc file, an abstract one is created and the default value is "ignore": [].

The fiter property also helps ignore junks, that is, if you had other files with extensions say .xml, you could ignore this file by using a filter, adding only the extensions of the files you want to build to this filter. The filter by default is as written above.

Sledge in details.

Ok. We've spoken about sledge and I know you have a vague idea of what sledge is about. The only thing you can think of is that I said “Build and deploy websites faster than you can blink your eyes”, but how?

Sledge uses a tool of standard and specifications known as Remarkup which you can also say, a markup script as I mentioned earlier.

What is Remarkup

Remarkup is a markup script used for building markups from zero level i.e <!DOCTYPE html> to grand level i.e </html>. Remarkup is a tool that provides an interface which exposes you to a fast way to build and deploy your webpages. Remarkup specifications "cuts to the chase", no stress at all for developers. Why waste time writing markup when you still have some javascript and backend to take care of?.

With Remarkup, you can split your markup into tiny fractions that looks simple and comprehensible to you intead of writing heavy markups that you get tired of. It is a common thing among web developers to stop their project half way, just because the markup has got complex and now they are fed up, everthing looks ugly. But now with the model Remarkup proposes, which is not a new model in entirety but may be new to the web. “Hmmm...what could this model be? Intrigue me”.

Lock & Key Model

Remarkup proposes a model which serves better, the lock and key model! This is the best model for writing your markup. A model with which you can split your markup into manageable bits, and even, markups can behave as modules.

Frame—The lock

Frame is the lock here. A frame is the part of your markup that is unlikely to change over time. It can be static yet portable. A frame does not necessarily have to be static, it can be made dynamic by giving it a key which fits perfectly into the frame. Let me get ahead of myself here: This part of dynamics in a frame which gives fluidity—the key—is called a Pane. Think of it as a frame metaphorically, as in the real sense; a frame is a part of something bigger waiting for the other part, say, a panel, to be fixed into it so it can be whole. I hope I hit it here.

Pane—The key

A pane as said earlier is the part of remarkup that adds fluidity to your frame. Without panes, your frame would be completely static, but panes can alter, modify and make your frame lit. Consider panes as where you store variables. So instead of searching for a specific text or a part in your markup, and then things can get messy for you, no, you just have to go to your pane and change whatever thing. Changing anything in your pane causes a change in every one of your frame files that links to that pane. Panes are YAML source files, so you need to have basic knowledge of yaml.

Do you have a problem?

I sure hope all you know about sledge and remarkup is very clear to you now, and your state at the beginning of this document is nomore your current state. If you still think this document doesn't tackle what you have in mind, or doesn't answer your questions, or isn't detailed enough, you may submit an issue to the repository on github.
Code and documentation, in binaries or in source, copyright 2019 Frame Studios. Code is licensed under MIT and documentation is licensed under Creative Commons CC by 3.0.
Frame, Frame Studios, Sledge and Remarkup are trademarks of Frame Studios and may be registered. With all the love @calebpitan.