diff --git a/loconotion.py b/loconotion.py index 8c1c303..f1fa1d9 100644 --- a/loconotion.py +++ b/loconotion.py @@ -130,6 +130,12 @@ class Parser(): def get_page_config(self, token): # starts by grabbing the gobal site configuration table, if exists site_config = self.config.get("site", {}) + + # check if there's anything wrong with the site config + if (site_config.get("slug", None)): + log.error("'slug' parameter has no effect in the [site] table, and should only present in page tables.") + del site_config['slug'] + # find a table in the configuration file whose key contains the passed token string matching_page_config = [value for key, value in self.config.items() if key.lower() in token] if (matching_page_config): diff --git a/test_site.toml b/test_site.toml index 8d914b4..c2a6b64 100644 --- a/test_site.toml +++ b/test_site.toml @@ -25,7 +25,4 @@ page = "https://www.notion.so/A-Notion-Page-03c403f4fdc94cc1b315b9469a8950ef" [[d2fa06f244e64f66880bb0491f58223d.meta]] name = "description" - content = "A fullscreen list database page" - -[d2fa06f244e64f66880bb] #list page - slug = "list" \ No newline at end of file + content = "A fullscreen list database page" \ No newline at end of file