nota : mark, token, note, sign.
Static Markdown Blog/Site using Fulcro & Pathom with no backend
Things you need installed to use this repository
Commands and alias for tooling while developing nota.
npm install
Set the resources/config.edn
with your keys or the corresponding enviroment variables.
The config is generated using shadow-cljs hook, macros and juxt/aero under the hood, check it's documentation for more information on how to use.
Aero's #profile reader conditionals available:
:dev
for when running locally dev builds:release
for compiled final builds.
The index page is being generated by a custom shadow-cljs hook all of this to be possible to use Fingerprint-Hash on the js generated.
Start shadow-cljs watching and serving main in localhost:8000
npm run watch
Start shadow-cljs watching and serving tests in localhost:8022
npm run watch:tests
Run Karma tests targeted for running CI tests with Headless Chrome Driver
npm run ci-tests
Run Babashka script tests
bb tests
Build the release package to production deploy
npm run release
For more information on optional arguments or how to use the commands you can always add an -h
at the end of the command. (Eg. bb del:post -h
)
Commands to manage posts markdown files and it's entry in the "database".
bb new:post "Hello World" -d "Such hello, much world" -t "first markdown"
The following prompt will be shown:
New:
{:post/name "Hello World",
:post/description "Such hello, much world",
:post/timestamp 1635110961351,
:post/path "posts/hello-world.md",
:post/tags #{"markdown" "first"},
:slug/id "hello-world"}
Create? (Y/n):
This will create the file resources/public/posts/hello-world.md
and add an entry in the database src/data.edn
.
bb del:post hello-world
The following prompt will be shown:
Delete:
{:post/name "Hello World",
:post/description "Such hello, much world",
:post/timestamp 1635101110744,
:post/path "posts/hello-world.md",
:post/tags #{"markdown" "first"}}
Are you sure? (y/N):
This will delete the file resources/public/posts/hello-world.md
and remove the entry in the database src/data.edn
.
Commands to manage pages markdown files and it's entry in the "database".
bb new:page "About me" -s about
The following prompt will be shown:
New:
{:page/name "About me", :page/path "pages/about.md", :slug/id "about"}
Create? (Y/n):
This will create the file resources/public/pages/about.md
and add an entry in the database src/data.edn
.
Since -s
(slug) is optional this command could be
bb new:page "About me"
# =>
New:
{:page/name "About me",
:page/path "pages/about-me.md",
:slug/id "about-me"}
Create? (Y/n):
Or even
bb new:page About
# =>
New:
{:page/name "About", :page/path "pages/about.md", :slug/id "about"}
Create? (Y/n):
Is possible to create "hidden" pages adding
--hide
to the command, this will filter the page from pages list resolver, but anyone will stil be able to access it via url/slug.
bb del:page about
The following prompt will be shown:
Delete:
{:page/name "About", :page/path "pages/about.md"}
Are you sure? (y/N):
This will delete the file resources/public/posts/hello-world.md
and remove the entry in the database src/data.edn
.
Tags aren't required to nota work, but you can override it's default behaviour (capitalize tag) to customize the name that will be shown.
bb new:tag clojure "Clojure Stuff"
The following prompt will be shown:
New:
{:tag/name "Clojure Stuff", :slug/id "clojure"}
Create? (Y/n):
bb del:tag clojure
Delete:
{:tag/name "Clojure Stuff"}
Are you sure? (y/N):
- fulcro: A library for development of single-page full-stack web applications in clj/cljs
- pathom: Pathom is a Clojure(script) engine for processing EQL requests
- shadow-cljs: ClojureScript compilation made easy
- babashka: Native, fast starting Clojure interpreter for scripting
- flipps: CSS and Aesthetics
- font-awesome: Sun and Moon SVGs
This is free and unencumbered software released into the public domain.
For more information, please refer to http://unlicense.org