Code Monkey home page Code Monkey logo

nota's Introduction

Nota

nota : mark, token, note, sign.

Static Markdown Blog/Site using Fulcro & Pathom with no backend

Prerequisites

Things you need installed to use this repository

Developers

Commands and alias for tooling while developing nota.

Install dependencies

npm install

Set configurations

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.

Where is the index.html?

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.

Commands

Local build

Start shadow-cljs watching and serving main in localhost:8000

npm run watch

Tests

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

Deploy

Build the release package to production deploy

npm run release

CLI Commands

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)

Posts

Commands to manage posts markdown files and it's entry in the "database".

New Post

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.

Delete Post

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.

Pages

Commands to manage pages markdown files and it's entry in the "database".

New Page

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.

Delete Page

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

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.

New Tags

bb new:tag clojure "Clojure Stuff"

The following prompt will be shown:

New:
{:tag/name "Clojure Stuff", :slug/id "clojure"}

Create? (Y/n):

Delete Tags

bb del:tag clojure
Delete:
{:tag/name "Clojure Stuff"}

Are you sure? (y/N):

Projects using Nota

Acknowledgment

  • 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

License

This is free and unencumbered software released into the public domain.
For more information, please refer to http://unlicense.org

nota's People

Contributors

flipps avatar rafaeldelboni avatar vloth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nota's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.