simsala

所属分类:前端开发
开发工具:PHP
文件大小:0KB
下载次数:0
上传日期:2021-04-08 11:55:25
上 传 者sh-1993
说明:  用于web的静态站点编辑器和生成器
(Static site editor and generator for the web)

文件列表:
UNLICENSE (1211, 2021-04-08)
css/ (0, 2021-04-08)
css/screen.css (3486, 2021-04-08)
index.php (650, 2021-04-08)
lib/ (0, 2021-04-08)
lib/Phapp/ (0, 2021-04-08)
lib/Phapp/Phapp.php (1168, 2021-04-08)
lib/Phapp/PhappPDOView.php (1149, 2021-04-08)
lib/Simsala/ (0, 2021-04-08)
lib/Simsala/App.php (567, 2021-04-08)
lib/Simsala/EditorView.php (8269, 2021-04-08)
lib/Simsala/FileManager.php (2313, 2021-04-08)
lib/Simsala/LoginView.php (551, 2021-04-08)
lib/Simsala/MarkdownSimsala.php (293, 2021-04-08)
lib/Simsala/NavigationFile.php (3937, 2021-04-08)
lib/Simsala/View.php (502, 2021-04-08)
lib/SimsalaPhp/ (0, 2021-04-08)
lib/SimsalaPhp/Simsala.php (6379, 2021-04-08)
lib/php-markdown/ (0, 2021-04-08)
lib/php-markdown/License.text (1631, 2021-04-08)
lib/php-markdown/markdown.php (49025, 2021-04-08)

simsala ======= Static site editor and generator for the web. Features -------- * Generate a static web site from a tree of [Markdown][1] files. * Automatic generation of a nested site navigation. * Editor works on everything with a web browser. Even Opera Mini. How to use ---------- ### Setup Simply clone this repository into your web root: $ git clone https://github.com/markusfisch/simsala.git Then, create a __contents__ directory within the new simsala directory: $ mkdir simsala/contents Your [Markdown][1] files will go there. To start, you may leave that empty. Next you need to create a __layouts__ directory in simsala: $ mkdir simsala/layouts Put your layouts into that directory. For example, save this as contents.html in simsala/layouts: <?= $title ?>
Why contents.html? A layout file corresponds to a content file if it has the same name or the name of the directory in which the content file is in. So the most basic layout is contents.html since all content files are in the contents folder. ### Set password Calculate the MD5 sum of the password you like to use to access the web interface. On Linux/BSD/OSX you can use md5sum: $ printf 'your-password' | md5sum Next, open simsala/index.php with a text editor and find this line: $app = new App( // MD5 sum of your password '0cd9686c955f3fdfead2081e7cb9eb27' ); Put the MD5 hash between the single quotes. ### Log in Now, open your web site with /simsala in your web browser: http://example.com/simsala You should see a login form. Give your password and press __Login__. ### Edit Start creating files and folders as you like. At any time, you may press __Publish__ to generate the HTML files in the directory that contains simsala. Symbols & Methods ----------------- Simsala provides the following symbols and methods to be used in your layout files: * $title - name of a content file (- and _ are replaced with blanks) * $content - rendered content of a content file * $this->nav( $dir ) - nested navigation tree, argument is optional and defaults to content directory * $this->map( $dir ) - site map of given directory, argument is optional and defaults to content directory Advanced use ------------ If you're using git for your project, it's probably better to add a subtree instead of just cloning simsala into your project: $ git subtree add --prefix simsala https://github.com/markusfisch/simsala.git master --squash That way you can always update simsala to the latest version with: $ git subtree pull --prefix simsala https://github.com/markusfisch/simsala.git master --squash [1]:https://en.wikipedia.org/wiki/Markdown [2]:https://github.com/markusfisch/simsala-sample

近期下载者

相关文件


收藏者