This webpage uses only core Janet libraries, e.g. spork, and libraries from this project.
You can find the source code in Source Hut repo.
The content source documents are using the
Mendoza .mdz format stored in the
content/
directory of the project root. The layout is in the
Temple format stored in the templates/
directory of the project
root. Static assets you can find in the static/
directory of the project
root.
The main driver of the application is Shawn. Its envelope
contains the configuration of the environments and its acts
are
the whole app's driving force. The concern separates the acts
:
acts.janet
with the high-level acts for environment
initialization, monitoring and these used by the webserver. acts/shared
with the helper acts used by other acts. acts/static
with acts to deal with the static assets acts/content
with acts dealing with content sources acts/blog
with acts dealing with the blog sources acts/pkgs
with acts dealing with the packages information acts/web
with act running web server. Another part of the application is the Chidi, serving
rendered HTML and static assets when run in the dev
mode. It runs
as a cocoon
. Webserver definition is in the app/init
. It
serves the /__dashboard
and facilities for editing and rendering
content and updating the packages from the web interface. It also server
the static content for development purposes.
The last part (for now at least) is the freshly minted Trevor providing the websockets for the development server. For now, it means only alerting about the packages cloned and rendered and dynamic refresh of the packages list, but the plan is to become the primary means of communication in development.
The application is run by the gp
bin script in the root of the
project. The script takes one argument with the environment:
dev
gets all packages, renders all content, copies the static
files, and starts the development HTTP server. Development is the default
environment.prod
gets all packages, renders all content, copies the static
files and finishesrel
connects to the remote server, pull the latest version from
git and build with prod
When you run the application in the dev
environment, the flow is:
When you run the application in the prod
environment, the flow is:
When you run the application in the rel
environment, it just
ssh to the server, pull the latest git version, run gp prod
there, and copy it
to Nginx's directory.