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 windowsThen 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:
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 initThis 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.ymlThe
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.
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 uses a tool of standard and specifications known as Remarkup which you can also say, a markup script as I mentioned earlier.
<!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”.