How It Works

Create the site

First passage is creating the directory structure of the site. This can be done easily with command sgrun --newsite /home/youruser/sitedir You could create a site in other ways, but this is the fastest.

Considerations on file names

Due some times file names are used to set page title, the correct way is to use, in the file names, the "-" as space. For example, if you want to have a title like "This Is A Good Day", you should name file this-is-a-good-day.md, and put content in it. Title can be overwrited via def. Default files extension is "md" (generally considered markdown text files), but you can change via configuration file.

Adding some blog contents

Contents are text files and images: for example, you can create a directory (under /posts, for example) like year/month/day (final results could be yoursitedir/posts/2014/05/23, for example), and put a text file called my-first-page.md. If you need to put an image with this, put in the same directory a jpeg file called my-first-page.jpg. When compiled, you will pruduce an html file called my-first-page.html, where my-first-page.jpg is the image put at the beginning of the body. Image will be resized, and a thumbnail will be created in a subdirectory called thumbnails. The presence of thumbnail make application to consider that image is not to be changed or resized. Posts directories can be considered like one or more blogs: they are defined in a statement of configuration file [Paths] PostsDirectories = dir1[|dir2|dir3...] If you want to simplify process, you can put in configuration file a statement like setnewpostdirectory [Paths] NewPostsDirectory = /home/me/newpost and put the text file with the correct name in it. A jpg image to be used with it, doesn't to be renamed, it will g.static: then, all will be put into posts tree. If more than one blog is on the site, first will be used.

Creating an image gallery

Well, this is simple: simply create a a sub directory under /images (or the image directory that you've set) and put here the images (at least 4 images). Images will be resized according to configuration, and an index will be created. Some galleries could be very big, with a lot of files, so not all the files will be processed, but only the files that doesn't have a thumbnail. A text file, needed to create an html page, to display image, will be created. Same mode of definition for image directories like for posts: configuration file must be edited [Paths] ImagesDirectories = dir1[|dir2|dir3...]

Last update: 2021-02-06 17:47