Skip to content

Ben-Kantor/bookmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bookmark

Bookmark is a dynamic markdown webserver, that serves repositories of markdown and media content as a polished, navigable single-page website. It has an extensive media embed and link system, and preserves embedded html. It has full compatibility with Github-Flavored Markdown and Obsidian Vaults. It's designed with a focus on speed and developer experience.

Features

Core Functionality

  • Real-time markdown processing with GitHub Flavored Markdown support
  • Support for [[wikilinks]] and [markdown](links) with automatic resolution
  • Interactive navigation sidebar with folder expansion/collapse and active file highlighting
  • A single-page application frontend with Turbolinks
  • Table of contents generated from document headers with collapsible sections
  • A user palette with file search, configuration, and commands (opened with Escape)
  • Automatic file discovery by prefix matching, index file detection, and directory navigation
  • File type icons and buttons icons using Nerd Fonts
  • Full accessibility with Aria tags.

Navigation & Interface

  • Full keyboard control with arrow keys and vim keys
  • Adjustable explorer and contents panel widths with drag handles and click-to-collapse
  • Dark/light mode toggle with high contrast accessibility option and persistence
  • Adaptive touch-friendly interface with swipe gestures for panel control
  • Click-to-copy any header to clipboard
  • Clean URLs with proper history handling and anchor scrolling

Rich Content & Embeds

  • Support for ![[filename]] embeds with extensive configuration options
  • Configurable dimensions, page ranges, line ranges, headers, titles, and CSS styling
  • Native handling of markdown, HTML, PDF, images, video, audio, and plaintext
  • YouTube, Vimeo, and arbitrary HTTP content embedding, including code files and markdown
  • PhotoSwipe lightbox integration with zoom, pan, and gallery navigation
  • Comprehensive code block rendering with highlight.js and language auto-detection
  • Embeds can target a particular range of a file by headers or line numbers
  • Automatic fallback to a download UI for binary content
  • Configurable file type overrides via glob patterns and extension mapping

Developer Experience

  • Fully typed frontend and backend with ES2020+ deno features
  • Zero-config TypeScript execution with built-in tooling and web standards
  • Intelligent memoization with size-based LRU eviction and memoization
  • Comprehensive error catching with user-friendly fallbacks and developer warnings
  • Lazy loading, efficient DOM updates, and minimal re-rendering

Installation

  1. Clone the repository:
git clone https://github.com/Ben-Kantor/bookmark
cd bookmark
  1. Install Deno: Run this command: curl -fsSL https://deno.land/install.sh | sh

Follow the instructions on the official Deno website.

  1. Add your content: Move your content directly into the ./content directory. Avoid more than three levels of folders, and files with duplicated names. Make sure you have a .404.md and index.md file.

  2. Configure the server: Edit the constants.ts file to change the title, description, and paths as needed.

  3. Launching: Run deno run serve to launch the server.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

AI Disclosure

LLM code tools were used for writing html, css, and some client ts, and reviewing and refactoring server code. All LLM-Generated code has been carefully reviewed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published