Sophist Is Getting Better and Fun
Recently I rewrote Sophist from scratch with a different method. This time I used the power and simplicity of JavaScript, so every Sophist file is basically JavaScript with additional powers. This way it is much simpler to both develop a Sophist site and develop the Sophist itself.
On the tech side, this time I used Deno and loving it. And thanks to simplicity, I managed to add a local web server that comes with Sophist.
Some examples
// sample.sphst file
const message = "This is basically JavaScript!";
console.log(message);
// H2 <h2> element
_.h2("This is heading 2");
// It even comes with frontmatter
const fm = _.frontmatter({
title: "Hello world",
});
_.h1(fm.title)
// Markdown? Yeah we have it!
_.markdown('### Markdown supported here!');
_
is a special object that comes with functions. Element like functions (h1, h2, html, etc..) are directly
printed into the html output in the order you call them. So it makes it so much easy and fun to build a web page.
Make sure to check the source code of this site to see Sophist in action => github.com/berkaycubuk/sophist
How to use it in terminal?
When you run sophist .
basically it will search all the sophist files and generate an output in a folder called out.
If you run sophist serve .
you can see your site locally in action on port 8000.