Skip to content

A static site generator on fire built with Elixir ⚗️ & Phoenix LiveView 🐦‍🔥

License

Notifications You must be signed in to change notification settings

j4nk3e/alchemy_pub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlchemyPub

AlchemyPub is a static site generator on fire built with Elixir & Phoenix LiveView.

It generates websites from markdown files. Changes to the source files are instantly published to all viewers.

Instead of saving generated pages as html files, they are rendered on startup and stored in memory using ETS. A file watcher picks up changes and broadcasts them using PubSub. Using the magic of Phoenix LiveView the change is immediately visible to all page viewers.

As a markdown parser, Earmark is used because of its possibilities to add custom transformers. This way, [[Wikilinks]]-style references are resolved and anchors are automatically generated for headers.

For styling, daisyUI allows easy change of themes and creation of your own style using Tailwind. Code blocks are automatically highlighted using highlight.js.

Page visits are tracked on the server using PhoenixAnalytics. The tracking data is stored in a file based database. No external database or configuration is required.

Getting Started

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Put your pages as markdown files in the priv/pages directory. You can read more on the Home page.

Ready to run in production? Please check the Phoenix deployment guides.

Credits

AlchemyPub is originally brought to you by j4nk.dev. It is published under the Apache License 2.0.

Roadmap

  • Add date support for articles
  • Use date for navigation
  • Menu generation & navigation
  • Title parsing from content header
  • Tags support
  • Toplevel pages
  • Icon support
  • Hidden pages
  • Write tests
  • Write documentation
  • Publish on Github
  • Live page add/remove support
  • Deployment
  • Keyboard navigation
  • Live viewer count
  • LiveView patch tag navigation support
  • Live tracking
  • Static content updates (images)
  • Slide support

About

A static site generator on fire built with Elixir ⚗️ & Phoenix LiveView 🐦‍🔥

Resources

License

Stars

Watchers

Forks

Sponsor this project