Textual.js is client-side static website generator written in Javascript that uses Markdown files to generate a website in real-time, without the need of server-side support for PHP, Ruby, Node.js, etc.
Textual.js was developed in the spirit of static website generators like Jekyll, Pelican and especially CMS.js. It uses jQuery and a slightly modified Marked for HTML rendering, and the default theme was inspired by the Casper theme.
- Clone the repo
git clone https://github.com/ranaroussi/textual.js.gitor download the latest release. - Configure
aseets/js/config.jswith your site's information. - Visit your site!
Textual.js can be configured to work with either a Web Server or a GitHub Repository.
In Server mode (default mode), Textual.js uses the web server's Directory Indexing
feature to scan and index Markdown files. Then, it uses HTML, CSS and Javascript to
render your website as a single-page app.
GitHub mode works essentially the same as Server mode, only instead of scanning your server for Markdown files, it uses GitHub's API to access your repository and index the relevant files.
For self hosting your website, make sure the server's directory indexing feature is enabled (both Apache and NGINX are supported).
- Apache - Make sure
htaccessis enabled (your website should already be working if it is) OROptions Indexesis set for your directory:
<Directory /var/www/yoursite.com/>
Options Indexes
</Directory>
- NGINX - Make sure
autoindex onis set for your directory:
server {
location / {
try_files $uri $uri/ /index.html;
autoindex on;
}
}
- Set
github_modeinassets/js/config.jstotrue. - Specify the details of your GitHub account, repository and branch under in
github_modeinassets/js/config.js.
// use github
github_mode: true,
// github settings: user, repo, branch
github_settings: {
host: 'https://api.github.com',
username: 'your-github-username',
repo: 'your-repository',
branch: 'website-branch' // usually gh-pages
}Once Textual.js is installed and running, simply copy all of your posts from your Jekyll
project's _post folder to your designated Textual.js posts folder, and all of your Markdown pages
from Jekyll's projects root folder into your designated Textual.js pages folder.