Skip to content
/ topics Public

Simple web app to expose topics (e.g. FAQs)

Notifications You must be signed in to change notification settings

bzg/topics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Topics

Topics generates a static HTML/CSS/JS site from topics data.

Install

Assuming bbin is installed:

bbin install io.github.bzg/topics

Run

Suppose you have an input.json file structured like this:

[
  {
    "title": "Topic title",
    "content": "<p>HTML</p>",
    "category": "Category name"
  }
]

To output an index.html file:

topics input.json

Customize

You can add configuration in a config.edn file:

{:title   "My FAQ"
 :tagline "Frequently asked questions"
 :footer  "<a href=\"https://example.com\">My site</a>"
 :source  "https://example.com/data/faq.json"
 :css     "custom.css"}

Here are the configuration keys:

:title   - Website title (default: "Topics")
:tagline - Website tagline (default: "Topics to explore")
:footer  - Footer HTML
:source  - URL displayed as content source
:css     - Custom CSS file to include

Use $ topics -c my_config.edn input.json to use another file name than config.edn.

The index.html output can link to a custom CSS file.

By default, topics links to a custom.css file, if it exists in the local directory, but you can use other file like this:

$ topics -C my_custom.css input.json

Feedback

To get or provide feedback, send an email to [email protected].

Requirements

topics is written as a Clojure Babashka script and we recommend installing it with bbin. Install everything:

brew install babashka/brew/bbin

For detailed installation instructions:

Support the Clojure(script) ecosystem

If you like Clojure(script), you can support the ecosystem by making a donation to clojuriststogether.org.

License

The code in this repository is licensed under EPL-2.0.

About

Simple web app to expose topics (e.g. FAQs)

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published