Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query about importing into Obsidian from Grav #73

Open
Penworks opened this issue Jan 31, 2024 · 1 comment
Open

Query about importing into Obsidian from Grav #73

Penworks opened this issue Jan 31, 2024 · 1 comment

Comments

@Penworks
Copy link

Penworks commented Jan 31, 2024

Hi. I don't know if any of you good people might be able to help/advise. Its a bit long, TLDR: Im getting unwanted indents in imported markdown in Obsidian from a Grav blog feed.

So I have an issue with templating posts that are being exported from a Grav blog into Obsidian. Im using your plugin to export and the Obsidian Simple RSS plugin to import. (This plugin is great, I use it for importing other feeds including Mastodon. There is total control for custom feed import and template design according to specified feed fields and items. AFAIK it is the only Obsidian RSS plugin that creates individual files in Obsidian for each post.)

The Grav blog is markdown, and Obsidian is also markdown. Im getting a layout problem for the Grav posts, shown in the screenshot below. For some reason there are multiple level indents for the image html element, and the following paragraph. All other content has no extra indents. The indents are interpreted as 'code' in Obsdn markdown and therefore it breaks the design template layout. See screenshots for edit view and read view - showing that Obsidian markdown interpret this as 'code' in both views. The raw.md file in bsidian vault shows the indents being created at import. The original markdown in Grav has no indents.

Only by manually removing the indents can I make the post behave as normal, ie an image, followed by paragraph of text.

Edit view in Obsidian:
screenshot snippet of obsidian file generated from Grav RSS post, in edit view

Read view in Obsidian:
screenshot snippet of obsidian file generated from Grav RSS post, in read view

The actual markdown imported into Obsidian:

screenshot of markdown in Obsidian

Indents for image and first para in the actual rss

image

I cant see any way of controlling this in the feed twig template or anywhere else. (I also cant control it at the import stage.)

Any ideas are gratefully received.

@Penworks
Copy link
Author

Penworks commented Jan 31, 2024

I solved this. If the dev wants to delete this post please go ahead.. But, it might be helpful to others who come across this problem.

I solved the issue by making all the item code in the feed.rss.twig template non indented, i.e. moving all item calls to the edge (shown below), no indentation at all. This solved the problem of indents being interpreted by markdown as code blocks.

Like this:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant