nvim-neorg / neorg

Modernity meets insane extensibility. The future of organizing your life in Neovim.
GNU General Public License v3.0
6.33k stars 208 forks source link

Export image to Markdown #1418

Open lasnikr opened 4 months ago

lasnikr commented 4 months ago

Prerequisites

Neovim Version

NVIM v0.9.5

Neorg setup

require("neorg").setup {
        load = {
          ["core.defaults"] = {},
          ["core.concealer"] = {},
          ["core.dirman"] = {
            config = {
              workspaces = {
                notes = "~/notes",
              },
              default_workspace = "notes",
            },
          },
      ["core.export"] = {},
        },
},

Actual behavior

.image https://raw.githubusercontent.com/nvim-neorg/neorg/main/res/neorg.svg
.image ~/test.jpg

exports (:Neorg export to-file out.md) to


://raw.githubusercontent.com/nvim-neorg/neorg/main/res/neorg.svg

/test.jpg

(including line breaks)

Expected behavior

.image https://raw.githubusercontent.com/nvim-neorg/neorg/main/res/neorg.svg
.image ~/test.jpg

exports to

![](https://raw.githubusercontent.com/nvim-neorg/neorg/main/res/neorg.svg)
![](~/test.jpg)

Steps to reproduce

:Neorg export to-file out.md

Potentially conflicting plugins

No response

Other information

:InspectTree:

(infirm_tag) ; [1:1 - 12]
 name: (tag_name) ; [1:2 - 6]
  (word) ; [1:2 - 6]
 (tag_parameters) ; [1:8 - 12]
  (tag_param) ; [1:8 - 12]
(paragraph) ; [1:13 - 2:0]
 (paragraph_segment) ; [1:13 - 76]
(infirm_tag) ; [2:1 - 8]
 name: (tag_name) ; [2:2 - 6]
  (word) ; [2:2 - 6]
 (tag_parameters) ; [2:8 - 8]
  (tag_param) ; [2:8 - 8]
(paragraph) ; [2:9 - 17]
 (paragraph_segment) ; [2:9 - 17]

Also, two quick questions, can I somehow export all my files to html (with links to each other) and can I use images and code blocks inside the bullet of a list?

Help

Yes

Implementation help

Is this line the logic that exports images?

lasnikr commented 4 months ago

Alright, it seems like this should rather be a feature request than a bug report. Since it just isn't implemented (but why is there code for it, and why does it do something?) I found this part of the wiki giving a workaround solution, which isn't that ideal for my use case since what I am thriving for is a pdf or html page. Right now I have to convert from norg to md to whatever I want, but this is a bit cumbersome.