Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Convert: support @-links to other pages in the blog #13

Closed
natikgadzhi opened this issue May 31, 2020 · 1 comment
Closed

Convert: support @-links to other pages in the blog #13

natikgadzhi opened this issue May 31, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@natikgadzhi
Copy link
Owner

Support @-links in Notion to other pages in the same Notion Database (blog).

To do that, Notoma needs to know the URL structure of the blog engine that the user is using after the conversion to .md — it can't just link to another .md file.

Behavior

  1. When parsing each page, if the page has @-links to other pages, try processing each link and replacing it with the link to the blog page corresponding to the linked Notion page.
  2. If the link is to a Notion page that is not in the same database, don't process it and keep the Notion.so URL.
  3. If the link is in the same database (same blog), try guessing the URL structure.
  4. If the URL structure can't be detected, log an error and keep the link.

Implementation details

Unfortunately, every static gen engine has their own permalink pattern (URL structure), that can also be tweaked in the engine config.

So this behavior will only work for some engines, that Notoma will have to detect, and read their configs. Most of the configs are just YAML or JSON anyway.

Alternatively, Notoma can ask for a permalink format and have it's own permalink setting. That would be easier.

@natikgadzhi natikgadzhi added the enhancement New feature or request label May 31, 2020
@natikgadzhi natikgadzhi self-assigned this May 31, 2020
@natikgadzhi
Copy link
Owner Author

Closed in #17

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant