• This repository has been archived on 30/Jun/2022
  • Stars
    star
    130
  • Rank 275,749 (Top 6 %)
  • Language
    JavaScript
  • Created over 3 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Status

This project is no longer maintained. See https://github.com/pengx17/logseq-publish and https://github.com/sawhney17/logseq-schrodinger for alternative approaches to publishing Logseq graphs.

Logseq Publish

Logseq Publish is a tool that generates a fast, SEO-friendly, and scalable website from your Logseq content.

Demo

https://eloquent-keller-6512b6.netlify.app/

How to use

We plan to integrate the publish feature into the Logseq app and provide a one-click publish flow.

For now, you need to:

  1. "Export as JSON" in the Logseq desktop app.
  2. Clone this repo.
  3. Copy the exported JSON to the root as data.json.
  4. Copy the whole assets folder from the Logseq repo to the public folder.
  5. Run yarn && yarn dev to start the site locally.
  6. Run yarn export to generate the published static website in the folder out. You can deploy it to anywhere which supports static hosting, for example Github Pages

Super Early!

We release Logseq Publish in its early stage to better involve the community in its development. Let's help make it better by:

Why

You want to share your Logseq knowledge graph with the world. While currently in Logseq you can "export public pages", which simply bundle the whole Logseq web app with your public pages and let you deploy them as a static website.

This approach has some limitations though:

  • With all its rich features, the code size of Logseq can be big. Combining with the fact that it renders on the client using JavaScript, the exported pages can be slow on a poor network and is also not SEO friendly.
  • You want different features and UI/UX for sharing than for content creation.
  • You want to interpret your Logseq data in different ways than the Logseq app.

Logseq Publish is a new approach for sharing your Logseq content more lightly.

How does it work

  1. Logseq exports a JSON file, which a tree structure consisting of various kinds of block types. (the sample data.json and assets are from the official Logseq documentation)
  2. Logseq Publish provides code to transform the JSON data into structures more suitable for static rendering.
  3. Logseq Publish provides React components for various Logseq block types and other UI elements. You can check them at src/components. Component names begin with "LS" are for Logseq-specific.
  4. Logseq Publish utilizes Next.js to generate static HTML at build time.

FAQ

How to set the homepage?

By default the homepage is Contents. You can change the homepage by update the homepage key in data.json.

What's the "Missing renderer for type:" warning message?

Logseq Publish does not implement all block types of Logseq. Since it's in early stage, if you the types that you need are missing, please send a feature request or (better!) consider contributing.

How can I customize Logseq Publish?

There are a few options:

  • Since the code is open-sourced, you can change the publishing experience by contribution or fork.
  • Because the single source of truth is the exported JSON, you build your own publishing toolchain with the data. If some parts of Logseq Publish is useful for you, just copy it!. In fact, community members are already doing that (https://github.com/believer/devlog).
  • (TODO) We will extrat a publish.css in which you can set CSS variables to customize the style, much like how you customize Logseq by editing custom.css.

More Repositories

1

logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
Clojure
32,019
star
2

awesome-logseq

Awesome Logseq resources created by the community <3
2,230
star
3

logseq-plugin-samples

Logseq plugin samples for beginner 🌱
CSS
298
star
4

marketplace

A centralized packages manager for Logseq marketplace plugins.
JavaScript
246
star
5

mldoc

Another Emacs Org-mode and Markdown parser.
OCaml
235
star
6

publish-spa

A github action and CLI to publish logseq graphs as a SPA app
Clojure
217
star
7

git-auto

A Simple Shell Script To Do Git Commit And Push Automatically
Shell
179
star
8

nbb-logseq

nbb with features enabled for logseq
Clojure
140
star
9

docs

Logseq documentation
Clojure
127
star
10

graph-validator

Validate your logseq graphs
Clojure
47
star
11

awesome-logseq-cn

31
star
12

rdf-export

Export a logseq graph to RDF
Clojure
29
star
13

plugins

Documentation site of Logseq plugins
HTML
19
star
14

deprecated-github-backend

Clojure
18
star
15

bb-tasks

Reusable babashka tasks used by logseq team
Clojure
17
star
16

rsapi

Logseq's rsapi: Encryption, Sync.
Rust
16
star
17

sqlite-db

SQLite integration via WASM
C
12
star
18

sites

Logseq home page
CSS
10
star
19

logseq-cn

Logseq 中文资料库
8
star
20

handbooks

Handbooks resources for Logseq.
Clojure
5
star
21

capacitor-file-sync

Logseq Sync capacitor plugin for iOS and Android
Swift
5
star
22

datahike-rs

Experimental datahike native binding
JavaScript
5
star
23

logseq-extension-example

An example Logseq extension that showcases Logseq's API
JavaScript
3
star
24

Ranker

Ranker is the home for prioritizing and tracking issues and feature requests. We pull in tickets from GitHub and discussions from Discourse, and use algorithm to rank requests so the most important features get built first.
Python
3
star
25

AgeEncryption

Age Encryption
Rust
2
star
26

logseq.github.io

https://docs.logseq.com
HTML
2
star