Documentation

Let's start building that awesome website

Github

1. Getting started

  1. Download the the zip file from Downloads for your Operating System. It has binaries for linux, windows, and mac (32 bit and 64 bit)
  2. Extract the file and open the directory
  3. Run the binary inside the directory. If you have trouble running the binary, please refer Troubleshooting
  4. Once you run your binary, open your browser and go to http://127.0.0.1:8080 for home page and http://127.0.0.1:8080/admin for admin page
  5. Default login credentials for admin will be username: admin password: root123

2. Adding Pages

  1. Pages can be modified under Pages menu item from admin area or directly from html/ directory
  2. Static files such as css,javascript,images,videos must be added to /static directory

3. Base Pages

Base pages are the templates for static pages. Base pages must have template blocks in place to add content from your static page like given below.

	    
	    {{block "block-name" .}} {{end}}
	    
	  

You can use your own block names or just use the default block names generated automatically like given below.

	    
	      {{block "content" .}} {{end}}
	    
	  

4. Static Pages

Static pages inherit a base page. Contents in the static pages template blocks appear in:

	    
	      {{define "content"}} {{end}}
	    
	  

5. Template Pages

Template pages are templates for Markdown and Dynamic pages. Template pages inherit their layout from a Base Page like static page. Template page will have the following tags:

	    
	      {{define "title"}} {{.Title}} {{end}}
	      {{define "content"}}
	      {{.HtmlContent}}
	      {{end}}
	    
	  

.HtmlContent tag will contain the converted html content from the markdown or dynamic page input

6. Markdown Pages

Markdown pages are for markdown content. More information on markdown format can be found here: Markdown

  1. Title can be used to specify the page title.
  2. Url Slug is for SEO.It is the unique url for the markdown page. It can be autogenerated from title or it can be any unique SEO friendly title
  3. Base File is the base page layout
  4. Template file is the template page for the markdown content
  5. The markdown editor can be used to enter the markdown content and click preview to view how the content will look like.

7. Dynamic Pages

Dynamic pages can be used to create web pages just like a text editor.

  1. Title can be used to specify the page title.
  2. Url Slug is for SEO.It is the unique url for the markdown page. It can be autogenerated from title or it can be any unique SEO friendly title
  3. Base File is the base page layout
  4. Template file is the template page for the markdown content
  5. The text editor is used to enter the content that is needed for the page

8. Raw Pages

Sometimes you might want to create html pages with your favorite website creator application. You create the raw page with static page format and point the url to /r/filename.html

9. Standalone Pages

If you want to create a standlone page, which is pure html file, just create the html file and point the url to /sp/filename.html

10. Image Files

Image files can be added by clicking on the Files and then Add Images

11. CSS Editor

You can edit CSS files from Files -> CSS. Enter the file path to edit or create a new file. All files are saved in static directory

12. Javascript Editor

You can edit javascript files from Files -> Javascript. Enter the file path to edit or create a new file. All files are saved in static directory

13. Configuration

  1. port: 8080 (default port is 8080 for development. If you set ssl true, the webserver will be started at port 443)
  2. ssl: false (For development set this to false. When this is set to true, the application will automatically setup ssl certificate for you)
  3. compress: true (Static files will be compressed by default for faster downloads) Note: If you are using your own webserver like nginx, just set this to false
  4. dev: This config setting is set to true while you are developing on your Desktop computer. Set this to true while deploying.
  5. domain: Set this value if you are using "https" in production. Use top level domain name Example:mydomain.com

14. Deployment

Wemebox doesn't need a webserver or database server or installation of any kind to run. Everything required to run your application is embedded inside wemebox executable. Make sure you have setup your config file for production as explained in Config Files

If you want to use your own webserver like Nignix or Apache, run the wemebox application in a different port and setup a reverse proxy.

15. Database

Wemebox comes with an embedded database system. It saves website data into a file inside /dbf directory. If you need to take backups please take a backup of this directory