{"id":38327520,"url":"https://github.com/viktomas/logseq-export","last_synced_at":"2026-01-17T02:46:44.482Z","repository":{"id":60130648,"uuid":"541169066","full_name":"viktomas/logseq-export","owner":"viktomas","description":"Tool to export raw Logseq Markdown files into Markdown blog posts with front matter.","archived":false,"fork":false,"pushed_at":"2024-05-26T11:51:45.000Z","size":311,"stargazers_count":66,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-14T17:48:43.072Z","etag":null,"topics":["export","golang","logseq"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viktomas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-25T12:47:34.000Z","updated_at":"2025-12-21T11:39:43.000Z","dependencies_parsed_at":"2024-06-19T16:23:17.761Z","dependency_job_id":"6fca89f3-0066-4793-b474-29bd1314047d","html_url":"https://github.com/viktomas/logseq-export","commit_stats":{"total_commits":46,"total_committers":2,"mean_commits":23.0,"dds":0.4347826086956522,"last_synced_commit":"615dc750676b9ac18f216b8587144790bad675fb"},"previous_names":["viktomas/logseq-extractor"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/viktomas/logseq-export","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktomas%2Flogseq-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktomas%2Flogseq-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktomas%2Flogseq-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktomas%2Flogseq-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viktomas","download_url":"https://codeload.github.com/viktomas/logseq-export/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktomas%2Flogseq-export/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28492522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T02:39:23.645Z","status":"ssl_error","status_checked_at":"2026-01-17T02:34:19.649Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["export","golang","logseq"],"created_at":"2026-01-17T02:46:44.412Z","updated_at":"2026-01-17T02:46:44.472Z","avatar_url":"https://github.com/viktomas.png","language":"Go","readme":"# logseq-export\n\nTool to export raw [Logseq](https://github.com/logseq/logseq) Markdown pages (with `public::` page property) into Markdown blog posts with front matter.\n\n- Takes Logseq page properties (`title:: Hello world`) and turns them into [Front Matter properties](https://gohugo.io/content-management/front-matter/) `title: Hello World`.\n- Changes the Markdown syntax to remove the top-level bullet points.\n- if you have top-level block `- private` in your file, `logseq-export` will remove it and all content that follows. I use it for copyrighted content like verbatim highlights/pictures from books.\n\nSee an **example of a deployed graph** on [viktomas.github.io/logseq-export](https://viktomas.github.io/logseq-export/). The graph and the [Hugo](https://gohugo.io/) project can be found in the [example](/example/) folder. Run the example locally with ``\n\n**Note: I completely reworked `logseq-export` to be a bit more versatile and universal. See the [version `v0.0.3`](https://github.com/viktomas/logseq-export/tree/v0.0.3) if you are not ready to move on.**\n\n## Install\n\n- Download the latest binary for your OS in the [Releases](https://github.com/viktomas/logseq-export/releases) page\n- `go install github.com/viktomas/logseq-export@latest` if you have Go installed\n\n## Usage\n\nThe `logseq-export` utility will export the pages into an export folder that can then be imported into your static site generator.\n\n```mermaid\ngraph LR;\nLS[Logseq graph] --\"logseq-export\"--\u003e EF[export folder]\nEF --\"import_to_hugo.sh\"--\u003e HU[Hugo static site generator]\n```\n\n### Export\n\n```\nlogseq-export\n  -outputFolder string\n        [MANDATORY] Folder where all public pages are exported.\n  -logseqFolder string\n        [MANDATORY] Path to the root of your logseq graph containing /pages and /journals directories.\n```\n\n*Optional* configuration is in a file called `export.yaml` in your logseq folder.\n\n```yml\n# list of logseq page properties that won't be quoted in the markdown front matter\nunquotedProperties:\n  - date\n```\n\n#### Command example\n\nThis is how I run the command on my machine:\n\n```sh\nlogseq-export \\\n  --logseqFolder /Users/tomas/workspace/private/notes \\\n  --outputFolder /tmp/logseq-export \\\n```\n\nThis will take my logseq notes and copies them to the export folder, it will also copy all the images to `/tmp/logseq-export/logseq-assets`, but the image links themselves are going to have `/logseq-asstes/` prefix (`![alt](/logseq/assets/image.png)`).\n\n#### Constraints\n\n- `logseq-export` assumes that all the pages you want to export are in `pages/` folder inside your `logseqFolder`.\n\n\n### Import\n\n```sh\n# these environment variables are optional\n# the values in this example are default values\nexport BLOG_CONTENT_FODLER=\"/graph\"\nexport BLOG_IMAGES_FOLDER=\"/assets/graph\"\n\n# copies pages from `/tmp/logseq/export/logseq-pages` to `~/workspace/private/blog/content/graph`\n# copies assets from `/tmp/logseq/export/logseq-assets` to `~/workspace/private/blog/static/assets/graph`\n# replaces all `/logseq-assets` in all image URLs with `/assets/graph`\n./import_to_hugo.sh \\\n  /tmp/logseq-export\n  ~/workspace/private/blog\n```\n\n### Logseq page properties with a special meaning (all optional)\n\n- `public` - as soon as this page property is present (regardless of value), the page gets exported\n- `title` - either the `title::` is present and used as `title:` front matter attribute, or the page file name is unescaped (e.g. `%3A` changes to `:`) and used as the `title:`\n- `tags` - Logseq uses comma separated values (`tags:: tag1, tag2`) but valid `yaml` in the front matter has to surround the value with square brackets (`tags: [tag1, tag2]`). The `tags` attribute is **always unquoted**.\n- `slug` used as a file name\n- `date` it's used as a file name prefix\n  - if your logseq `date::` attributes contains the link brackets e.g. `[[2023-07-30]]`, `logseq-export` will remove them\n\n## From\n\n![logseq test page](./docs/assets/logseq-teset-page-2.png)\n\n## To\n\n`content/graph/2022-09-25-test-page.md` :\n\n~~~md\n---\ndate: \"2022-09-25\"\npublic: true\nslug: \"test-page\"\ntitle: \"Test page\"\n---\n\nThis is an example paragraph\n\n- Second level means bullet points\n\t- `logseq-export` also supports multi-level bullet points\n\n```ts\nconst v = \"Hello world\"\n```\n\nYou can\nalso\nhave\n\nMulti-line strings\n~~~\n\n## Local development\n\n- Have golang installed\n- Use unix or WSL2 on Windows\n- `make build` - builds the binary\n- `make test` - tests the project\n- `make watch-test` - (only on macOS) - run test on every file change\n- `make example` - export the example Logseq graph into the example Hugo site\n- `make watch-example` (only on macOS) - run `make example` on any file change\n\n## Releasing\n\n1. tag commit on `main` branch\n2. first push `main`, wait for pipeline to finish, then push the tag. Otherwise you [confuse goreleaser](https://blog.viktomas.com/graph/goreleaser-already-exists-error/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviktomas%2Flogseq-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviktomas%2Flogseq-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviktomas%2Flogseq-export/lists"}