commit 646404794182ee0390fe269707721cf92205dffd Author: Andrii Hetman <1@einsof.org> Date: Thu Nov 14 18:35:47 2024 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a48cf0d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +public diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..61b0dba --- /dev/null +++ b/config.toml @@ -0,0 +1,21 @@ +base_url = "https://einsof.org" + +# title = "einsof.org" +# description = "" + +default_language = "en" + +generate_feeds = true +feed_filenames = [ "atom.xml", "rss.xml" ] + +compile_sass = false +build_search_index = false + +generate_sitemap = true +generate_robots_txt = true + +[markdown] +highlight_code = true + +[extra] +# Put all your custom variables here diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..edd3eac --- /dev/null +++ b/content/_index.md @@ -0,0 +1,3 @@ ++++ +title = "einsof.org" ++++ diff --git a/content/about.md b/content/about.md new file mode 100644 index 0000000..fc11536 --- /dev/null +++ b/content/about.md @@ -0,0 +1,3 @@ ++++ +title = "About" ++++ diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..90702e7 --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,6 @@ ++++ +title = "Sus" +sort_by = "date" +template = "blog.html" +page_template = "post.html" ++++ diff --git a/content/blog/is_google_search_really_that_bad.md b/content/blog/is_google_search_really_that_bad.md new file mode 100644 index 0000000..a3936f3 --- /dev/null +++ b/content/blog/is_google_search_really_that_bad.md @@ -0,0 +1,28 @@ ++++ +title = "Is Google Search Really That Bad?" + +date = 2024-11-14 ++++ + + +# Yessir + +Zola is a static site generator (SSG), similar to Hugo, Pelican, and Jekyll (for a comprehensive list of SSGs, please see Jamstack). It is written in Rust and uses the Tera template engine, which is similar to Jinja2, Django templates, Liquid, and Twig. + +Content is written in CommonMark, a strongly defined, highly compatible specification of Markdown. Zola uses pulldown-cmark to parse markdown files. The goal of this library is 100% compliance with the CommonMark spec. It adds a few additional features such as parsing footnotes, Github flavored tables, Github flavored task lists and strikethrough. + +SSGs use dynamic templates to transform content into static HTML pages. Static sites are thus very fast and require no databases, making them easy to host. A comparison between static and dynamic sites, such as WordPress, Drupal, and Django, can be found here. + +To get a taste of Zola, please see the quick overview below. + +## Not really + +Zola is a static site generator (SSG), similar to Hugo, Pelican, and Jekyll (for a comprehensive list of SSGs, please see Jamstack). It is written in Rust and uses the Tera template engine, which is similar to Jinja2, Django templates, Liquid, and Twig. + +Content is written in CommonMark, a strongly defined, highly compatible specification of Markdown. Zola uses pulldown-cmark to parse markdown files. The goal of this library is 100% compliance with the CommonMark spec. It adds a few additional features such as parsing footnotes, Github flavored tables, Github flavored task lists and strikethrough. + +### Gachi + +SSGs use dynamic templates to transform content into static HTML pages. Static sites are thus very fast and require no databases, making them easy to host. A comparison between static and dynamic sites, such as WordPress, Drupal, and Django, can be found here. + +To get a taste of Zola, please see the quick overview below. diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c7eadbd --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1731386116, + "narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "689fed12a013f56d4c4d3f612489634267d86529", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e7be9fb --- /dev/null +++ b/flake.nix @@ -0,0 +1,18 @@ +{ + description = "einsof.org site"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + }; + + outputs = { self, nixpkgs, ... }@inputs: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + in + { + packages.x86_64-linux = rec { + site = pkgs.callPackage ./site.nix {}; + default = site; + }; + }; +} diff --git a/site.nix b/site.nix new file mode 100644 index 0000000..3fec3f5 --- /dev/null +++ b/site.nix @@ -0,0 +1,27 @@ +{ + pkgs +}: + +pkgs.stdenv.mkDerivation { + name = "site"; + version = "0.1.0"; + + src = ./.; + # src = pkgs.fetchgit { + # url = "git@einsof.org:/srv/git/repo/magackame/site.git"; + # rev = ""; + # sha256 = lib.fakeSha256; + # }; + + buildInputs = with pkgs; [ + zola + ]; + + buildPhase = '' + zola build + ''; + + installPhase = '' + cp -r public $out + ''; +} diff --git a/static/font/Univers/UniversBold.ttf b/static/font/Univers/UniversBold.ttf new file mode 100644 index 0000000..b3865af Binary files /dev/null and b/static/font/Univers/UniversBold.ttf differ diff --git a/static/font/Univers/UniversCnBold.ttf b/static/font/Univers/UniversCnBold.ttf new file mode 100644 index 0000000..04fd0a2 Binary files /dev/null and b/static/font/Univers/UniversCnBold.ttf differ diff --git a/static/font/Univers/UniversCnRg.ttf b/static/font/Univers/UniversCnRg.ttf new file mode 100644 index 0000000..1bca1bd Binary files /dev/null and b/static/font/Univers/UniversCnRg.ttf differ diff --git a/static/font/Univers/UniversLight.ttf b/static/font/Univers/UniversLight.ttf new file mode 100644 index 0000000..4fa3340 Binary files /dev/null and b/static/font/Univers/UniversLight.ttf differ diff --git a/static/font/Univers/UniversRegular.ttf b/static/font/Univers/UniversRegular.ttf new file mode 100644 index 0000000..edc3d03 Binary files /dev/null and b/static/font/Univers/UniversRegular.ttf differ diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..48f43be --- /dev/null +++ b/static/style.css @@ -0,0 +1,65 @@ +/* +@font-face { + font-family: Univers; + + src: local("Univers"), url("/font/Univers/UniversRegular.ttf"), + url("/font/Univers/UniversBold.ttf"); +} +*/ + +* { + font-family: Univers, sans-serif; +} + +body { + padding: 1rem; + margin: 0; + width: calc(100% - 2rem); + + margin: auto; + max-width: 80ch; + + font-family: sans-serif; + line-height: 1.5; +} + +img { + display: block; + margin: auto; + + max-width: 100%; +} + +code { + font-family: "Anonymous Pro", monospace; +} + +pre { + font-family: "Anonymous Pro", monospace; + padding: 1rem; + + overflow: auto; + scrollbar-width: thin; + + color: white; + background-color: #191724; +} + +blockquote { + color: green; +} + +@media (prefers-color-scheme: dark) { + body { + background-color: #1c1b22; + color: white; + } + + a:link { + color: #875fff; + } + + a:visited { + color: magenta; + } +} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..768e500 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,32 @@ + + + + + + + + + + + {% if page.title %} + {{ page.title }} + {% else %} + {{ section.title }} + {% endif %} + + + + + + + {% block content %} + {% endblock %} + + diff --git a/templates/blog.html b/templates/blog.html new file mode 100644 index 0000000..f7f8f82 --- /dev/null +++ b/templates/blog.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block content %} +

{{ section.title }}

+ + {% for page in section.pages %} + {{ page.title }} + {% endfor %} +{% endblock %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..e48212a --- /dev/null +++ b/templates/index.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} + +{% block content %} +{% endblock %} diff --git a/templates/post.html b/templates/post.html new file mode 100644 index 0000000..98bc372 --- /dev/null +++ b/templates/post.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block content %} +
+

{{ page.title }}

+

{{ page.description }}

+ + + +
+
+ + {{ page.content | safe }} +
+{% endblock %}