Giter Site home page Giter Site logo

publish-spa's Introduction

Description

This is a github action to publish a Logseq graph as a publishing Single Page Application (SPA). This action can also be run as a CLI.

Usage

Github Action

To setup this action, enable github pages on your repository and add the file .github/workflows/publish.yml to your graph's github repository with the content:

on: [push]

permissions:
  contents: write
jobs:
  test:
    runs-on: ubuntu-latest
    name: Publish Logseq graph
    steps:
      - uses: actions/checkout@v4
      - uses: logseq/[email protected]
      - name: Add a nojekyll file # to make sure asset paths are correctly identified
        run: touch $GITHUB_WORKSPACE/www/.nojekyll
      - name: Deploy πŸš€
        uses: JamesIves/github-pages-deploy-action@v4
        with:
          folder: www

That's it! Your graph will publish on future git pushes by pushing to the gh-pages branch. Don't forget to configure your graph if you're not seeing the pages you expect to see.

NOTE: The above example may not have the latest version of this action. See CHANGELOG.md for released versions. If you'd prefer to always be on the latest version of this action, use logseq/publish-spa@main but be careful as there could be breaking changes.

Action Inputs

This action takes the following inputs:

- uses: logseq/publish-spa@main
  with:
    graph-directory: my-logseq-notes
    output-directory: out
    version: nightly

This action has the following inputs:

graph-directory

Required: Root of the graph directory. Defaults to ..

output-directory

Required: Directory where graph is published. Defaults to www.

version

Required: Specifies the version of Logseq to build the frontend. This can be a git tag (version) or a specific git SHA. Defaults to 0.10.6.

Note: A version before 0.9.2 is not supported as Logseq started supporting this action with 0.9.2.

theme-mode

Optional: Theme mode for frontend. Can be "dark" or "light". Defaults to "light".

accent-color

Optional: Accent color for frontend. Can be one of "tomato", "red", "crimson", "pink", "plum", "purple", "violet", "indigo", "blue", "cyan", "teal", "green", "grass", "orange", "brown". Defaults to "blue".

CLI

To use this as a CLI locally, first install babashka and clojure. Then:

$ git clone https://github.com/logseq/publish-spa
# If you have yarn 1.X:
$ cd publish-spa && yarn install
$ yarn global add $PWD

# Otherwise use npm:
$ cd publish-spa && npm i -g

This CLI depends on Logseq being checked out locally in order to build the static directory for it. If you haven't built the static directory, you'll need to do it once (takes some time):

$ git clone https://github.com/logseq/logseq && cd logseq
# Switch to a stable version
$ git checkout 0.10.6
# Install deps and build static directory
$ yarn install --frozen-lockfile && yarn gulp:build && clojure -M:cljs release publishing

Then use the CLI from any logseq graph directory!

$ logseq-publish-spa out
Parsing 306 files...
Export public pages and publish assets to out successfully πŸŽ‰

Development

This github action use nbb-logseq and nbb compatible libraries to build up a Logseq database and then generate html for the publishing app.

When viewing a published graph directory, it's highly recommended to use a local http server as multiple features are known to not work (e.g. assets and slides) when viewed as a static file. For example, to view the published graph out from the above example:

$ python3 -m http.server 8080 -d out

LICENSE

See LICENSE.md

Additional Links

publish-spa's People

Contributors

avelino avatar cnlhc avatar logseq-cldwalker avatar talal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

publish-spa's Issues

Custom `.css`, `.js`

Hi, how to add custom js file?

And why format of this plugin not same with default? I mean custom.css, custom.js

PDF Support on published graphs

Currently, published graphs that link a PDF don't work. Not only you can't use the built-in logseq viewer, you can't even download the PDF (without editing the URL or using your browser's developer tools). It's as if the link is broken.

An easy meantime patch could be just linking the PDF so it works in the browser or it downloads the file, even if highlighting and notes don't work.

As @LuciferianInk said:

I understand that in-page PDF highlighting and such may be difficult to support in the exported web app, currently, but it would be VERY nice if there was still a link, for my users to click. As it is, the PDF link is simply stripped from the export, leaving a bunch of pages where PDF content is referenced, but there's no actual PDF to look at.

To Reproduce

Steps to reproduce the behavior (from original post logseq/logseq#4048):

  1. Add a PDF to your logseq graph
  2. Export the graph as standalone HTML
  3. Open the standalone HTML
  4. Try opening the PDF

Workaround

From @acsr post

Manually change the Link in the Markdown source of the page into a file asset:
Remove the leading ! and replace the two dots starting the go-one-up asset link with a same level file link prefix
[Filename-of-the-pdf-as-text.pdf](file://./assets/Filename-of-the-pdf-as-text.pdf)

  • For me the PDF now shows up in a new tab using the default PDF viewer of the browser (for me: inside a new Chrome tab), when the PDF is already in the assets folder. But it is not exported there automatically anymore!

Solution to finalize the workaround

  • Do not remove the default PDF asset ![Name.pdf](../assets/Name.pdf) Link in the MD
  • Add an aditional Display link [Name.pdf](file://./assets/Name.pdf) just after the regular PDF asset link
    This exports the PDF into assets, works as usual in the Logseq app but adds at least link access to the asset!

Poor but better than nothing.

Note

This is a duplicate of logseq/logseq#4048

Error running CLI to publish graph

What Happened?

When I run logseq-publish-spa output at root of my Logseq graph directory, I got error:

Error: Logseq static directory '../logseq/static' does not exist. Please provide a valid directory

it does not matter whether I created output directory or not.. I assume output directory is also at the root of the graph directory.

Reproduce the Bug

  1. open shell
  2. go to root directory of a Logseq graph
  3. run logseq-publish-spa output

Expected Behavior

the graph should be published successfully.

Desktop or Mobile Platform Information

MacOS: 14.2 (23C64)
Logseq App: Version 0.10.5 (79)
latest version of logseq-publish-spa

Pre-render static pages to make them indexable by search engines

Currently only the main page of the export is pre-rendered (and correspondingly indexed by Google. to use Logseq docs as an example: https://www.google.com/search?q=site%253Ahttps%253A%252F%252Fdocs.logseq.com)

The fact that there is at least one page pre-rendered is exciting because it implies that infrastructure for it is already there.
It'd be great if there were an option to pre-render all the pages (optionally - only pages tagged with a particular tag)

With many pages actual pre-rendering may take some time but:

  • After initial build - it can be done incrementally only for changed pages, which should take minimal time
  • You can make it opt-in - I imagine people who value SEO/searchability of the website would be happy to take increase build time as a tradeoff

Dockerfile for publish-spa

What Happened?

Hello dear friend, I'm writing a project for my university. I need to publish my website using Gitlab ci. And for this I am writing a dockerfile and my image takes up a lot of space of 5 GB. If I write this command in docker. My image is starting to take up a lot of space. How can I reduce the space occupied?

Reproduce the Bug

FROM ubuntu
RUN mkdir publish-spa
COPY .Β  /publish-spa
RUN apt-get update && apt-get install curl -y & apt-get install -y -q --allow-unauthenticated git sudo && sudo apt install default-jdk
RUN curl -L -0 https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh && chmod +x linux-install.sh && sudo ./linux-install.sh
RUN curl -sL0 https://raw.githubusercontent.com/babashka/babashka/master/install && chmod +x install &/install
RUN curl -sSL https://deb.nodesource.com/setup_18.x | sudo bash -
RUN sudo apt install -y nodejs && node --version
RUN cd publish-spa && npm i -g
RUN npm install -g -y yarn
RUN git clone https://github.com/logseq/logseq && cd logseq & git checkout 0.10.6
WORKDIR /logseq
RUN yarn install --frozen-lockfile && yarn gulp:build && clojure -M:cljs release publishing
RUN yarn autoclean -i && yarn autoclean -f && yarn cache clean
WORKDIR /
RUN cp -r logseq publish-spa
WORKDIR /publish-spa
RUN npm install @logseq/nbb-logseq

Expected Behavior

No response

Desktop or Mobile Platform Information

No response

Tasks

No tasks being tracked yet.

slide feature doesn't work when published on urls with a non "/" path

After exporting my graph, e.g. here, there are several things missing, most notably:

  1. The presentation feature does not work. It is searching for Reveal.js:
  2. The Logseq - Diagrams as Code plugin does not work in this context. I do not even see an error searching for the corresponding JavaScript. I guess I should either:
    • Install the plugin locally and upload it to my GitHub repo (bullets), or
    • Specify in some configuration files the plugins to install so that Publish SPA will install them at build time. This would be great, but I could not find the corresponding documentation.

Am I missing something?

PD: This question is related to another question at the Logseq - Diagrams as Code repo.

Version string of the Logseq static build not easily identifyable in SPA build

It is not easy to identify the version of the used Logseq static build and the publish-spa version that was used during publication.

It would help a lot if (at least as a debug option) the version tag of publish-spa and the logseq static build is included either in the html source as metadata or in the SPA UI reachable over an about link in the help section.

Why is adding your own page not sufficient?
The purpose is to have a proof of the actual used version instead of the intended versions, to spot misconfiguration or failed attempts to update the code.

challenges

  • The commandline command logseq-publish-spa has no --version output option or drops it during execution
  • The command logseq-publish-spa has no verbose option to dump the version of the static logseq build, you just rely on the given path.

If not available like suggested:

  • how can the version be retrieved manually from the final SPA build or from the installed code?
  • the actual state of the checkout (git status) is not enough, since the yarn install does not offer useful output in his warnings.
  • the full (re-)install command I used was:
    logseq % yarn install --frozen-lockfile && yarn gulp:build && clojure -M:cljs release publishing
    
    • Maybe there is a different syntax necessary to update properly

Fail to export when page name contains emoji

What Happened?

Fail to export graph when page name contains emoji

Reproduce the Bug

  1. create a new graph
  2. run logseq-publish-spa out, success
  3. add a page titled πŸ”¨test
  4. run logseq-publish-spa out , error
 Error: ENOENT: no such file or directory, open 'C:\Users\sansui\test\mygraph\pages\πŸ”¨test.md'
C:\Users\sansui\Developer\publish-spa\node_modules\mldoc\index.js:1031
throw b}function
^
el [Error]: ENOENT: no such file or directory, open 'C:\Users\sansui\test\mygraph\pages\πŸ”¨test.md'
    at new el (file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:179:94)
    at $APP.Sm.j (file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:1267:319)
    at file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:332:310
    at Jq (file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:332:319)
    at file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:562:45
    at Q (file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:308:469)
    at file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:421:113
    at file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:561:498
    at Q (file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:308:469)
    at file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:563:263 {
  data: {
    K: null,
    O: 6,
    H: [
...

Expected Behavior

No response

Desktop or Mobile Platform Information

Windows
Logseq v0.10.9

[Feature Request] Custom config.edn for export

What Happened?

It would be helpful to either specify a seperate config.edn for export or to overwrite config.edn setting on export.
The particular use-case I imagine would be to specify a different home page. A typical user may just want their own home-page to be a journal entry or a page with links to common namespaces.
Whereas a public home page is more likely to either be a welcome page or a tutorial page on how to use the logseq graph

Reproduce the Bug

FR

Expected Behavior

No response

Desktop or Mobile Platform Information

No response

Have I misconfigured?

Is there a step I'm missing.. ran it on a few graphs, always get:

$ logseq-publish-spa out
Error: Logseq static directory '../logseq/static' does not exist. Please provide a valid directory

Feature: Select default page

I would love to be able to select an default page that loads up if a user go to the website.
Sou youu would be able to link to the importent pages or create an inventory list so that the user could find quicker what he searches. Is this possible?

Something like here: https://docs.logseq.com/
It automatically redirects to the page "content" and even had an little "house logo" on the site for the main page.

And as little extra I would love to see the option, that the sidebar is default visible.

[feature request] generate multiple html files instead of a (potentially) huge one

What Happened?

publish-spa will only generate one html (index.html) which contains all the pages for a given graph.

This approach works reasonably well for small graph but it does not scale well for large graph.

For example with my graph (contains about 5000 files), it produces a index.html with 77M size which is not practical to serve it for a web server..

Reproduce the Bug

I just run logseq-publish-spa out under my graph root directory

Expected Behavior

generate multiple html files (maybe one per page?) instead of only index.html

Desktop or Mobile Platform Information

MacOS: 14.2 (23C64)
Logseq App: Version 0.10.6 (80)
latest version of logseq-publish-spa

GitLab CI example

What Happened?

logseq-publish had GitLab examples, and now redirects here. Unfortunately no GitLab-related discussion has yet arisen in the issues.

Reproduce the Bug

  1. Check logseq-publish GitLab examples
  2. Find logseq-publish deprecated, linking here
  3. Find no GitLab examples of logseq/publish-spa

Expected Behavior

It could be nice to showcase how to build a LogSeq container in which this CLI runs, and use its image for building LogSeq pages from graphs stored in git repositories on GitLab.

Desktop or Mobile Platform Information

N/A

Install for CLI instructions outdated and not working with yarn version 2+, upgrade method unclear with lockfile issues

My Initial Install

I tried to upgrade my working initial publish-spa 0.2.0 setup and the former logseq static bild using logseq 0.9.8.

but I got a broken install and never back to work.

I used the instruction at https://github.com/logseq/publish-spa?tab=readme-ov-file#cli currently still published in branch main for Release 0.3.0 , edf2903

Prerequisite: yarn was upgraded globally to version 3.7 after the initial install for other purposes! ( I am not familiar with fully isolated installs using yarn!), the working install was issued under yarn v1.22.19.

Deleting the publish-spa git checkout and the containing static logseq build and starting from scratch ended up with the same resulting errors below.

I now used again:

  1. delete publish-spa git cloned folder
  2. recreate folder
  3. babashka and clojure installed! (bb -> Babashka v1.3.186 REPL, clj -> Clojure 1.11.1)
  4.  git clone https://github.com/logseq/publish-spa
     cd publish-spa && yarn install
    
  5. output
        ➀ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker πŸ‘
        
        ➀ YN0000: β”Œ Resolution step
        ➀ YN0000: β”” Completed in 4s 382ms
        ➀ YN0000: β”Œ Fetch step
        ➀ YN0013: β”‚ wrap-ansi@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
        ➀ YN0013: β”‚ wrappy@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
        ➀ YN0013: β”‚ y18n@npm:4.0.3 can't be found in the cache and will be fetched from the remote registry
        ➀ YN0013: β”‚ yargs-parser@npm:11.1.1 can't be found in the cache and will be fetched from the remote registry
        ➀ YN0013: β”‚ yargs@npm:12.0.5 can't be found in the cache and will be fetched from the remote registry
        ➀ YN0000: β”” Completed in 3s 366ms
        ➀ YN0000: β”Œ Link step
        ➀ YN0000: β”” Completed in 0s 227ms
        ➀ YN0000: Done in 7s 984ms
    
  6. command
    yarn global add $PWD
    
    Error:
    Usage Error: The 'yarn global' commands have been removed in 2.x - consider 
    using 'yarn dlx' or a third-party plugin instead
    
    $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require 
    #0] <scriptName> ...
    

No idea of the purpose of yarn global add $PWD and how to replace the functionality

A default new graph doesn't publish content

What Happened?

After creating a new graph (0.9.8), pushing to github, setting up with publish-spa, the results don't show any content, eg
https://pwright.github.io/cost-experiment/#/all-pages

Reproduce the Bug

  1. Create graph
  2. push to github
  3. set up publish spa
  4. enable Pages
  5. view result

Expected Behavior

A reported error would be nice if the solution isn't easy, but a workaround is to replace the new graph config.edn with https://github.com/logseq/publish-spa/blob/main/test/publish-test-graph/logseq/config.edn

Desktop or Mobile Platform Information

Logseq 0.9.8

Aliases are not honored on SAP

What Happened?

I uses page aliases in Logseq, which are working great locally. After this GH action has rendered and published those pages the aliases are no longer honored. Instead links points to unrefrerenced pages with the name of the alias.

Reproduce the Bug

There's no need to reproduce the bug since all my work is public on this repo as well as GH action's log can be audited from here.

You can verify for instance that on this block I mention:

Retrieve [[ASREPRoast]] hashes

which is an alias for the AS-REP Roasing.

image

Nevertheless, if you click on the link on the mentioned block it points to

https://staypirate.github.io/HTB-Notes/#/page/asreproast

instead of

https://staypirate.github.io/HTB-Notes/#/page/as-rep%20roasting

I want to highlight again that locally the alias works, the problem is only present on the published pages. Which makes me think that the bug should rely on this GH actions.
You can test that the alias locally works by cloning my repo and open it on you Logseq client.

Expected Behavior

The aliases should be honored on the SAP the same way the Logseq client does.

Desktop or Mobile Platform Information

I locally run Logseq v0.9.20 via Flatpak:

❯ flatpak info com.logseq.Logseq

Logseq - A local-first, non-linear, outliner notebook for organizing and
sharing your personal knowledge base

          ID: com.logseq.Logseq
         Ref: app/com.logseq.Logseq/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 0.9.20
     License: AGPL-3.0-or-later
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 425.3Β MB
     Runtime: org.freedesktop.Platform/x86_64/23.08
         Sdk: org.freedesktop.Sdk/x86_64/23.08

      Commit: bf636be62e77efc1b529f79eabaa6f5eac551da6141a2d8e98dbd2449782552d
      Parent: 34810510e13c9cf47043d5c10488a3eb3a028442ef2221f7bb6528fb0283f1f7
     Subject: Update runtime to 23.08 (0769284e)
        Date: 2023-11-11 18:36:41 +0000

whiteboards generate error block workflow

What Happened?

the raw log is logs_21.zip

The root cause is that the whiteboard rename has some problems, as I rename a whiteboard, it copies and renames but does not delete the old one, causing id conflict, but it does not show correctly. Issue: logseq/logseq#9194

publish.yml

name: logseq-publish
on: [push]

permissions:
  contents: write
jobs:
  test:
    runs-on: ubuntu-latest
    name: Publish Logseq graph
    steps:
      - uses: actions/checkout@v3
      - uses: logseq/[email protected]
      - name: add a nojekyll file # to make sure asset paths are correctly identified
        run: touch $GITHUB_WORKSPACE/www/.nojekyll
      - name: Deploy πŸš€
        uses: JamesIves/github-pages-deploy-action@v4
        with:
          folder: www

Reproduce the Bug

  • create a whiteboard file
  • push to trigger action
  • rename it
  • re push

Expected Behavior

I want this action to catch the error, and warn it but not block it.

Desktop or Mobile Platform Information

No response

Publish workflow fails

What Happened?

I tried to publish my graph:

But when the workflow ran I got this error

Options: {:directory ".", :static-directory ".logseq-logseq/static", :theme-mode "light", :accent-color "blue"}
Error: Invalid graph directory '/home/runner/work/logseq/logseq' as it has no logseq/config.edn.
Error: Process completed with exit code 1.

Similar issue

Reproduce the Bug

  • I mostly followed [[this tutorial](https://docs.logseq.com/#/page/publishing%20(desktop%20app%20only)](https://docs.logseq.com/#/page/publishing%20(desktop%20app%20only)

  • Created a new public github repo https://github.com/HarvsG/logseq

  • I enabled github pages

  • Created a new folder C:\Users\{user}\Documents\Coding\repositories\logseq-public

  • 3 dots -> settings -> editor -> All pages public when publishing to off

  • Confirm at least one page is marked public:: true

  • In logseq 3 dots -> Export Graph -> Export public pages and selected the above foler

  • Inside logseq-public run mkdir -p .github/workflows/ && touch .github/workflows/publish.yml

  • run nano .github/workflows/publish.yml

    • From https://github.com/logseq/publish-spa?tab=readme-ov-file#usage

      on: [push]
      
      permissions:
        contents: write
      jobs:
        test:
          runs-on: ubuntu-latest
          name: Publish Logseq graph
          steps:
            - uses: actions/checkout@v3
            - uses: logseq/[email protected]
            - name: Add a nojekyll file # to make sure asset paths are correctly identified
              run: touch $GITHUB_WORKSPACE/www/.nojekyll
            - name: Deploy πŸš€
              uses: JamesIves/github-pages-deploy-action@v4
              with:
                folder: www
  • Inside logseq-public I ran git init

git remote add origin [email protected]:HarvsG/logseq.git
git add *
git commit -m "Initial commit" 
git add .github/workflows/publish.yml
git commit -m actions
git branch -M main
git push -u origin main
  • In digital ocean I made a cname record from notes.codingdoctor.co.uk to harvsg.github.io.

    • The TXT entry for _github-pages-challenge-harvsg.codingdoctor.co.uk was already configured from another project
  • In the github pages dashboard

Expected Behavior

The workflow runs correctly

Desktop or Mobile Platform Information

Windows 11 desktop 0.10.3

bb: command not found

What Happened?

I followed the CLI instructions on my NixOS machine. When running logseq-publish-spa, I get the following output:

$ logseq-publish-spa out 
Downloading dependencies...
/bin/sh: line 1: bb: command not found
node:internal/errors:857
  const err = new Error(message);
              ^

Error: Command failed: bb --config [private yarn path]/global/node_modules/@logseq/publish-spa/.nbb/.cache/758227426d2e2654ea251bc69dafc5dbe6c3f018/deps.edn --deps-root [private yarn path]/global/node_modules/@logseq/publish-spa uberjar [private yarn path]/global/node_modules/@logseq/publish-spa/.nbb/.cache/758227426d2e2654ea251bc69dafc5dbe6c3f018/nbb-deps.jar
/bin/sh: line 1: bb: command not found

    at checkExecSyncError (node:child_process:861:11)
    at Module.execSync (node:child_process:932:15)
    at file:///[private yarn path]/global/node_modules/@logseq/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_deps.js:5:94
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async file:///home/gerkules/.config/yarn/global/node_modules/@logseq/publish-spa/publish_spa.mjs:9:18 {
  status: 127,
  signal: null,
  output: [
    null,
    Buffer(0) [Uint8Array] [],
    Buffer(39) [Uint8Array] [
       47,  98, 105, 110,  47, 115, 104,  58,  32,
      108, 105, 110, 101,  32,  49,  58,  32,  98,
       98,  58,  32,  99, 111, 109, 109,  97, 110,
      100,  32, 110, 111, 116,  32, 102, 111, 117,
      110, 100,  10
    ]
  ],
  pid: 259744,
  stdout: Buffer(0) [Uint8Array] [],
  stderr: Buffer(39) [Uint8Array] [
     47,  98, 105, 110,  47, 115, 104,  58,  32,
    108, 105, 110, 101,  32,  49,  58,  32,  98,
     98,  58,  32,  99, 111, 109, 109,  97, 110,
    100,  32, 110, 111, 116,  32, 102, 111, 117,
    110, 100,  10
  ]
}

Reproduce the Bug

  • Create an empty graph
    • Create a new page called "Home"
    • Go to setting, disable journal and set "Home" as home page
    • Enter some text on the "Home" page
  • Follow the instructions for the CLI guide
    • logseq-publish-spa command is available
    • yarn install --frozen-lockfile && yarn gulp:build && clojure -M:cljs release publishing exited with nil and code 0
  • Go to the graph folder and run logseq-publish-spa out

Expected Behavior

Should've built a working spa

Desktop or Mobile Platform Information

  • Linux, NixOS with unstable channel (and I upgraded all packages just before running the commands in the README "CLI" section)
    • Might be possible to reproduce with nix package manager on other linux distros, just a wild guess
  • Logseq: 0.9.13
  • Clojure CLI version: 1.11.1.1273
  • Node: v18.17.1
  • Yarn: 1.22.19

Support rendering of plugins

What Happened?

As a LogSeq user, I need to produce a static rendering of my graph including all plugins and themes #8, in order to be able to reproduce the interfaces that are made available through the graph data.

Reproduce the Bug

  1. Create a static export from a graph that uses the Sepia theme together with the Kanban plugin.
  2. See both not being available in the output.

Expected Behavior

The theme and plugin are available in the output.

A few menu and accessibility improvements...

There's a few changes to the menu that would be really nice to have for published graphs...

  • The Add to Favorites, Unfavorite page, and Delete page buttons don't do anything in published graphs, so they should be removed.
  • The Join the community and Bug report buttons should also be removed because they are misleading. I'm using Logseq as a knowledge base for my software projects. If my users click "Join the community" they're probably trying to join a community related to my projects/organization. Similarly, if they click "Bug report" they're probably trying to report a bug in my own software rather than Logseq.
    • I would be fine with something more clear, like a "Made with Logseq" link being included somewhere, but those two options being in the menu are a problem.
  • We need a "dark/light" mode toggle and the ability to set a default. It currently relies on the system theme to determine which to use, but this isn't good enough for a couple reasons:
    • It fails to recognize the theme for some operating systems, defaulting to light mode.
    • A lot of themes don't work for people and whether one does or not may depend on their physical environment. We need the ability to choose one that works. The ability for publishers to enable >2 theme options would be more ideal, but we need a light/dark toggle at the very least.

"Filename too long" Error in github action

What Happened?

Got a "Filename too long" error in github action

Checking out the ref
  /usr/bin/git checkout --progress --force -B main refs/remotes/origin/main
  Error: error: unable to create file pages/<a 160 chars chinese here>.org: File name too long

Reproduce the Bug

submit a file with long filename to your repo.

Expected Behavior

No response

Desktop or Mobile Platform Information

No response

Publish my Logseq graph - is hard because of a few things missing or not stressed in the README.

I have never written a gh Issue before. I hope putting these comments in an Issue is the proper place for them. I use Logseq daily and want it to be the best.

I did NOT use the official Logseq documentation at https://docs.logseq.com/#/page/publishing to publish my Logseq graph. I tried. I suppose with a little more documentation in the README I will be able to get it to work. So here are my requests, but first.

In case anyone else is having trouble and can use these simple alternative publishing solutions, here they are:
https://www.youtube.com/watch?v=fHc2cVNMNrA&ab_channel=OneStutteringMind
https://docs.logseq.com/?ref=blog.logseq.com#/page/publishing%20(desktop%20app%20only)

I skipped the official documentation because I had too many questions and:

  1. I wish the README was written as arecipe. That it required multiple educated guesses and I still need more time to get it to work makes me sad.
    1.1 Ok, It required some understanding of github actions.
    1.2 It is not clear if I am to use the graph or the exported graph for this gh Action. Which one gets pushed to github for the github Action? I must have missed this. But bears repeating in the README for an official solution.
    1.3 It is not clear if I can git remote add origin to the logseq graph directory or if it has to be copied else where first. Why would I ask that? When I was using an earlier solution - https://github.com/pengx17/logseq-publish and did a git fetch and git pull It messed things up s.t. no further deploys worked.
    1.4 Most ppl may know the answer but it might help to be explicit. Can I ignore the gitdir: in the .git file in the Logseq graph dir, assuming I am pushing up the graph or should I push from the referenced directory? Seems like they should both work. Tangentially, there seems to be a bug in the All graphs page. If a graph is in a subdirectory of a logseq dir the leading logseq dir is ignored.
    1.5 The pengx17 gh Actions solution seems to allow for multiple graphs to all be present on gh pages. Can this feature bug be preserved?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.