Skip to content

dimfeld/export-logseq-notes

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Logseq Note Exporter

This is a program to take a Logseq directory and convert it into web pages. I'm currently using this to populate the notes section of my website.

Note: Most everything below is out of date. I'll be rewriting the README in the near future to accurately reflect the addition of scripting and other new capabilities.

Features

  • Selective export: Include and exclude pages based on presence of tags in each page
  • Optionally omit lines that only contain links/tags to pages that aren't included.
    • So tag-only lines like #Articles #Done #Thinking don't clutter up the page.
  • Support block references, block embeds, and page embeds.
  • Supports output templates: complete HTML page, text with front matter, or anything else!
  • Gathers hashtags in a page for use in the output template
    • This is configurable to use either a specific "Tags" attribute, or hashtags anywhere in a page.
    • Tags can be excluded

This program also supports operating on a Roam Research EDN export, though I'm not maintaining that support so the parsing may stop working if the Roam EDN format changes enough.

Configuration

Primary configuration is through a TOML file. You can find an annotated config file here and modify it for your needs.

The program also supports command line arguments to override settings in the config file. export-logseq-notes --help will show the arguments available.

Notable features planned

  • Option to only export pages with a certain tag
  • When a page links to another exported page, the output contains a link.
  • Expands block embeds
  • Link block references to original block
  • Translate namespaces into nested directories
  • Option to show backlinks at bottom

Acknowledgements

  • edn-rs for EDN parsing
  • nom for making it easy to write custom parsers
  • The Svelte syntax file is imported from https://github.com/corneliusio/svelte-sublime.

About

Export notes from Logseq or Roam to HTML for use in a static site.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages