site is ready

This commit is contained in:
Lazy Hippopotamus
2024-03-09 18:31:52 -05:00
parent b2b7386011
commit d5773c0afe
17 changed files with 336 additions and 258 deletions

View File

@@ -32,11 +32,12 @@
but still may be included in other files - for configuration, templating, or even modular elements!
[/][=textimage_source-][^baseurl]/res/default.html.png[/][^textimage]
[=textimage_text-]
Sitix is a universal preprocessor. HTML? Of course. CSS? Yep! JavaScript? Certainly! Sitix will template and preprocess anything, whether it be a nice simple HTML file or a hand-edited GIF
from 1998. Say goodbye to annoying configuration discrepancies between CSS and HTML and JavaScript - just throw your shared config in a config.stx file and let Sitix do the rest!
Sitix is a universal preprocessor. HTML? Of course. CSS? Yep! JavaScript? Certainly! Sitix will template anything, whether it be a nice simple HTML file or a hand-edited GIF
from 1998. Say goodbye to annoying configuration discrepancies between CSS and HTML and JavaScript - just throw your shared variables in a config.stx file and let Sitix do the rest!
[/][=textimage_source-][^baseurl]/res/lato.css.png[/][^textimage]
<div class="text scrolly" style="font-size: 2em;">
No more restrictive project structures, irritating configuration files, or <b>magic</b>. Goodbye Ruby, "blog-awareness", difficult configuration, and bulky outputs.
Sayonara obtuse frameworks, inefficient CSR, and annoying configuration.
Sitix renders <b>what you want, when you want it,</b> and doesn't ask questions.
</div>
<div class="text plug">

View File

@@ -1,8 +1,22 @@
[!]
[!][@on minify]
[=title About]
[=isSimple ]
[=content-]
<div class="text">
About Page (TODO)
Sitix began in Summer '23 when I got fed up with the quirks of Jekyll and decided to build my own templating engine. I put together a schematic not unlike
modern Sitix and began implementing it in Rust (which I had just learned), but I quickly realized that my pattern was simply not going to work for such a complex
design, and so after a lot of fruitless debugging and such I eventually stopped developing it. It's probably still up <a href="https://github.com/LinuxRocks2000/sitix">here</a>.<br>
In November '24 I was working on a client's website and, once again, got fed up with Jekyll. I remembered the Sitix project I'd begun in 2023 and tried to implement it
- but failed spectacularly. Sitix was a shipwreck. So, through early March, I reimplemented: I moved to C++, a much more familiar language; changed the structure to be
just quirky enough to satisfy me while still robust and usable, and quickly got Sitix behind several websites.<br><br>
Sitix is designed to replace everything I like about Jekyll (Liquid. It's just Liquid. I hate literally everything else), while also providing a saner interface,
and being much easier to compile and install (farewell, Gem Hell). I also incorporated concepts from JavaScript (especially JSON); parts of the object model are
obviously inspired by JavaScript, and the tree-like structure of a Sitix file is heavily remnant of JSON. I also added a little of my own "charm"; evident
in the scope system (which is even less sane than JavaScript's) and the not-quite-XML tag structure.<br><br>
Sitix is a very young project, and I'm still working out the bugs and adding crucial features. The stuff I'm working on is usually going to be near the top of
<a href="[^baseurl]/pages/todo.html">the TODO list</a>.<br><br>
Sitix is protected by GNU GPLv3. Please put a little "built with Sitix by Tyler Clarke" with a link to this website somewhere on every Sitix-generated page
you make (Sitix can make this easy with templates :D), if you choose to use Sitix.
</div>
[/]
[#templates/default.html]

View File

@@ -1,11 +1,16 @@
[!]
[=title Install Sitix]
[=isSimple ]
[=content-]
<div class="text">
Sitix is written in C++ without any frameworks or anything. It doesn't muck about with Node.JS or Ruby or any such stuff. This means native-level performance,
but requires compilation and testing on many platforms. It's guaranteed to work on Fedora Linux and probably works in most other Linuxes;
MacOS is a <i>possibility</i>. Windows, being too stone-age for POSIX, probably won't be able to run Sitix.<br><br>
At the moment, Sitix has no prebuilt binaries; I hope to include RPM/DEB packages in the next release.<br>To install it, you'll need to clone
<a href="https://github.com/LinuxRocks2000/sitix-rewrite">the Github repository</a>, run <code>./build.sh</code>, and (assuming the build completes successfully)
copy the generated <code>sitix</code> binary to some PATH-accessible location (<code>/usr/bin</code> is a good bet). Sitix requires a C++20-compatible
G++ installation; it has no other dependencies. Sitix is theoretically cross-compilable to Windows, but I have no intention of ever officially supporting Windows.
G++ (usually included with the gcc package); it has no other dependencies. Sitix is theoretically cross-compilable to Windows, but I have no intention of ever officially supporting it;
Microsoft doesn't deserve it.
</div>
<div class="text">
Once you've got Sitix installed, see <a href="[^baseurl]/pages/usage">Usage</a>.

13
site/pages/noteboard.html Normal file
View File

@@ -0,0 +1,13 @@
[!][@on minify]
[=title Noteboard]
[=isSimple ]
[=content-]
<div class="text">
This is where I'll post miscellaneous notes on Sitix stuff. If you're using Sitix (or just interested in the project), you should check back here
periodically for information on new releases, design considerations, known bugs, etc. You can think of it as a miniblog.
</div>
<div class="text">
<b>2024-3-9:</b> The stupid "Something has gone terribly wrong" warning is NOT important; you can safely ignore it. It's just debugging information pour moi.
</div>
[/]
[#templates/default.html]

View File

@@ -1,5 +1,6 @@
[!]
[=title Todo]
[=isSimple ]
[=content-]
<div class="text">
Sitix is still a pretty young piece of software, so if there's a missing feature that isn't on this list, don't hesitate to submit a feature request on <a href="https://github.com/LinuxRocks2000/sitix-rewrite/issues">the issues page</a>.
@@ -11,6 +12,8 @@
<li>Code cleaning (need to fix memory management especially)</li>
<li>Make config less hack (move from \[i config] to \[i exists], and create empty objects on global with -c)</li>
<li>Add an unpack/ghost operator so setting objects to other objects works (something like \[=ghostingName-] \[%ghostedObject] \[/])</li>
<li>Safety: Sitix should not delete your entire codebase if you accidentally mistype the command.</li>
<li>Get rid of that stupid "something has gone terribly wrong" warning. It's not a problem, it's just an artefact of an old debugging marathon.</li>
</ul>
</div>
[/]

58
site/pages/usage.html Normal file
View File

@@ -0,0 +1,58 @@
[!]
[=title Usage]
[=isSimple ]
[=content-]
<div class="text">
Sitix is a KISS program, so there's not a lot of setup. Once you've got it installed (see <a href="[^baseurl]/pages/install">for information on that</a>),
you need a project to build. The simplest Sitix project structure is just a <code>site</code> folder, which contains the actual Sitix "scripts". When
(you absolutely must be outside of the site directory to do this!) you run <code>sitix site</code>, Sitix will delete the <code>output</code> directory
and all contents, if it exists, and then create a new <code>output</code> directory for the compiled site code. Then, Sitix will walk down the tree of
your <code>site</code> directory, creating appropriate subdirectories and directly copying over any file that doesn't have an opening phrase - <code>\[!]</code>,
for a Sitix page, or <code>\[?]</code> for a data page (which will not be rendered itself, but may be used for templating or configuration). The opening phrase
MUST be the first three bytes of the file; if there are any whitespaces before it, the file will be treated as plain data. If you want
it to render to a different directory, pass the <code>-o location</code> flag.
</div>
<div class="note">
WARNING: <code>-o</code> is very dangerous! If you tell Sitix to render to a directory with important information in it, <b>that directory is as good as gone</b>.
At the moment Sitix does not put any effort into questioning your choices, so make sure to double-check everything is okay before running any sitix command! Avoiding
<code>-o</code> unless you <i>really</i> need it is generally a good policy.
</div>
<div class="text">
Let's cover some syntax. All Sitix commands are enclosed in brackets like <code>\[command]</code> (you can escape brackets with backslashes). There aren't very many
Sitix commands; at the moment, it's just:
<ul>
<li><code>\[=variableName variableContent]</code>: This simply sets <code>variableName</code> to be equal to <code>variableContent</code> at that point on the scope tree.</li>
<li><code>\[=variablename-]variableContent\[/]</code>: The expanded form of above. This allows for much more complicated variables, including variables containing
Sitix commands (in the compressed form, anything inside MUST be plaintext). It's generally preferred to use this when the content is more than a word or two.</li>
<li><code>\[^variableName]</code>: "Dereferences" a variable, forcing it to render. If that variable contains other variables (like <code>\[=parent-] \[=child-] content \[/] \[/]</code>),
the child variables will NOT be rendered, but if variables with the same name as the children exist at some point in the parent tree of the dereferenced variable exist, they will be replaced.
Variables at the dereferencing position will NOT be replaced.</li>
<li><code>\[#filename]</code>: Dereferences a Sitix file (or plain file, which would just copy over content without processing it) at this position. The filename must be relative
to the root directory (usually the <code>site</code> directory), rather than the directory the including file is stored in. This is very useful for templating.</li>
<li><code>\[i request &lt;...&gt;]\[e]\[/]</code>: This is an if condition. If in Sitix contains an object (between the <code>\[i]</code> and either <code>\[/]</code> or <code>\[e]</code>) that will
be rendered if the condition evaluates to "true", and, optionally (between <code>\[e]</code> and <code>\[/]</code>), an object that will be rendered if the condition is false.<br>
Requests can be,
<ul>
<li><code>config configName</code>: Check whether or not a command-line config switch is enabled (you can enable them with <code>-c configName</code>).</li>
<li><code>equals variable1 variabl2</code>: Check whether two variables are the same (the check is flawed, but pretty good. See the relevant section in <code>main.cpp</code>
for information on this.)</li>
<li><code>exists variable</code>: Check whether a variable exists. Good for simple boolean flags.</li>
</ul>
</li>
<li><code>\[f array iterator]</code>: For loop that iterates over an array (note: in Sitix, every subdirectory of the root dir can be treated as
an array of objects, each object being a file! This allows things like generating blog links). The <code>iterator</code> variable will be, for every item,
the referenced array element. <b>Note: When iterating over a directory, every file will be given a <code>filename</code> property!</b> This can be used like
<code>\[f directory i]\[^i.filename]\[/]</code>, which would spew out the filenames of every file in that directory.</li>
<li><code>\[@command option]</code>: Set a file-specific flag. File-specific flags are used to do things like minify text. At the moment, the only valid @-commands
are <code>\[@on minify]</code>, which enables minifier for the file, and <code>\[@off minify]</code>, which disables minifier. Minifier simply reduces chains of whitespace
to a single whitespace. In the future, <code>\[@on markdown]</code> and <code>\[@off markdown]</code> will allow Markdown-like processing across the file.</li>
</ul>
You can use Sitix commands in any file with a Sitix opening phrase; Sitix commands in files that do not have an opening phrase will be ignored.<br>
And that's it! To see how these are used creatively in the wild, check out <a href="https://github.com/LinuxRocks2000/sitix-website">the source code for this website</a>.
</div>
<div class="text">
For a more thorough look at Sitix, check out <a href="https://github.com/LinuxRocks2000/sitix-rewrite">the source code</a>. There's a rather large comment at the start of
<code>main.cpp</code> that provides a deep look at Sitix syntax and usage.
</div>
[/]
[#templates/default.html]

View File

@@ -1,4 +1,6 @@
*, body, html {
[!][@on minify]
[#config.stx]
*:not(ul), body, html {
margin: 0px;
padding: 0px;
font-family: Lato, Arial, Helvetica, sans-serif;
@@ -172,12 +174,17 @@ i.highlight {
}
h1, h2, h3, h4, h5, h6 {
text-align: right;
padding-right: 10vw;
text-align: center;
}
h1 {
font-size: 6em;
text-align: right;
padding-right: 10vw;
}
h2 {
font-size: 3em;
}
div.toptext {
@@ -232,3 +239,29 @@ code {
color: white;
font-family: monospace;
}
.note {
margin-left: 30vw;
margin-right: 30vw;
margin-top: 50px;
margin-bottom: 50px;
background-color: orange;
padding: 20px;
box-sizing: border-box;
border-radius: 20px;
min-height: 180px;
font-size: 1.2em;
}
.note::before {
content: "";
background-image: url("[^baseurl]/res/warning.svg");
background-size: contain;
width: 100px;
height: 100px;
display: block;
background-position: center;
background-repeat: no-repeat;
margin: 20px;
float: left;
}

59
site/res/warning.svg Normal file
View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="39.622208mm"
height="33.866497mm"
viewBox="0 0 39.622208 33.866497"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="warning.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="3.0263953"
inkscape:cx="42.459754"
inkscape:cy="100.28432"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-1.3616779e-4,-1.6848815e-4)">
<path
id="rect1"
style="fill:#ff9955;stroke:#dd5f00;stroke-width:3.565;stroke-linecap:round;stroke-linejoin:round"
d="M 19.937896,1.7825 38.093292,32.084166 H 1.7824999 Z"
sodipodi:nodetypes="cccc" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:85.3334px;line-height:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:center;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:middle;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;opacity:1;vector-effect:none;fill:#dd5f00;fill-opacity:1;stroke-width:5.00001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1"
x="57.734219"
y="97.928741"
id="text1"
transform="matrix(0.26458333,0,0,0.26458333,3.982288,2.4584934)"><tspan
sodipodi:role="line"
id="tspan1"
x="57.734219"
y="97.928741">!</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -26,6 +26,9 @@
</div>
</div>
<div id="main" class="scrolly-container">
[i exists isSimple]
<h2>[^title]</h2>
[/]
[^content]
</div>
<div id="bottom">
@@ -37,6 +40,9 @@
<b>Shameless Plugs</b><br>
<a href="https://swaous.asuscomm.com">Tyler Clarke's personal site</a><br>
<a href="https://linuxrocks2000.github.io/">Tyler Clarke's (old) webcomic/blog/personal site</a><br>
<a href="https://fedoraproject.org/">Fedora Linux</a><br>
<a href="https://www.gnu.org/">GNU</a><br>
<a href="https://www.fsf.org/">The Free Software Foundation</a><br>
<a href="https://avrahamsociety.org/">The Avraham Society (first site to be officially generated with Sitix)</a><br>
<a href="https://linuxrocks2000.github.io/not-art-gallery">The Not Art Gallery</a>
</div>