Enveloppe / obsidian-enveloppe

Enveloppe helps you to publish your notes on a GitHub repository from your Obsidian Vault, for free!
https://enveloppe.github.io/
Apache License 2.0
602 stars 38 forks source link

[Bug]: The website shows "Error" when hovering page numbers #109

Closed carloslab-ai closed 1 year ago

carloslab-ai commented 1 year ago

Material General discussion

Requirements

mkdocs==1.4.2
mkdocs-material==9.0.14
mkdocs-mermaid2-plugin==0.6.0
mkdocs-ezlinked-plugin==0.3.3
mkdocs-awesome-pages-plugin==2.8.0
mdx_breakless_lists==1.0.1
mkdocs-preview-links-plugin==0.6.2
mkdocs-embed-file-plugins==2.0.5
mkdocs_custom_fences==0.1.2
mkdocs-git-revision-date-localized-plugin==1.1.0
mkdocs-encryptcontent-plugin==2.4.5
mkdocs-callouts==1.9.0
mkdocs-custom-tags-attributes==0.3.0
mkdocs-meta-descriptions-plugin==2.2.0
obsidiantools==0.10.0
pyvis==0.3.1
cairosvg==2.6.0
pillow==9.4.0
mkdocs-glightbox==0.3.1
mkdocs-minify-plugin==0.6.2

Mkdocs.yml

site_name: Carlos's Blog
site_description: This is my blog
site_url: https://carlos-gamedev.github.io/

theme:
    name: 'material'
    logo: assets/meta/logo.png
    favicon: assets/meta/logo.png
    custom_dir: overrides
    font:
        text: Ubuntu
        code: Ubuntu Mono
    language: en
    palette:

    # Light mode
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: teal
      accent: light blue
      toggle:
        icon: material/toggle-switch-off-outline
        name: Switch to dark mode

    # Dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: blue
      accent: indigo
      toggle:
        icon: material/toggle-switch
        name: Switch to light mode
    features:
        - navigation.indexes
        - navigation.top
        - navigation.tabs
        - navigation.tabs.sticky
        - navigation.expand
        - search.suggest
        - search.highlight

# Extensions
markdown_extensions:
  - footnotes
  - nl2br
  - attr_list
  - sane_lists
  - meta
  - smarty
  - tables
  - mdx_breakless_lists
  - def_list
  - pymdownx.arithmatex:
      generic: true
  - pymdownx.details
  - pymdownx.magiclink
  - pymdownx.critic
  - pymdownx.caret
  - pymdownx.keys
  - pymdownx.mark
  - pymdownx.tilde
  - pymdownx.highlight:
      use_pygments: true
      anchor_linenums: true
  - pymdownx.tasklist:
       custom_checkbox: true
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg
  - admonition
  - toc:
      permalink: true
  - pymdownx.inlinehilite
  - pymdownx.snippets
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:mermaid2.fence_mermaid
plugins:
  - search
  - meta-descriptions
  - git-revision-date-localized:
      type: date
      fallback_to_build_date: true
      locale: fr
      custom_format: "%A %d %B %Y"
      enable_creation_date: true
  - ezlinks:
        wikilinks: true
  - mermaid2:
      arguments:
        theme: |
          ^(JSON.parse(__md_get("__palette").index == 1)) ? 'dark' : 'light'
  - awesome-pages
  - embed_file:
      callouts: true
      custom-attributes: 'assets/css/custom_attributes.css'
  - custom-attributes:
      file: 'assets/css/custom_attributes.css'
  - tags:
      tags_file: tags.md
  - encryptcontent:
      title_prefix: '🔐'
      summary: 'Page privée'
      placeholder: 'Mot de passe'
      decryption_failure_message: 'Mot de passe invalide !'
      encryption_info_message: "Vous n'avez pas accès à cette page"
      search_index: 'encrypted'
      password_button: True
      password_button_text: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" height="1em" width="1em"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M416 32h-64c-17.67 0-32 14.33-32 32s14.33 32 32 32h64c17.67 0 32 14.33 32 32v256c0 17.67-14.33 32-32 32h-64c-17.67 0-32 14.33-32 32s14.33 32 32 32h64c53.02 0 96-42.98 96-96V128C512 74.98 469 32 416 32zM342.6 233.4l-128-128c-12.51-12.51-32.76-12.49-45.25 0c-12.5 12.5-12.5 32.75 0 45.25L242.8 224H32C14.31 224 0 238.3 0 256s14.31 32 32 32h210.8l-73.38 73.38c-12.5 12.5-12.5 32.75 0 45.25s32.75 12.5 45.25 0l128-128C355.1 266.1 355.1 245.9 342.6 233.4z"/></svg>'
  - callouts
  - glightbox
hooks:
  - overrides/hooks/on_page_markdown.py
  - overrides/hooks/on_env.py
extra_javascript:
  - assets/js/mathjax.js
  - assets/js/utils.js
  - https://polyfill.io/v3/polyfill.min.js?features=es6
  - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
  - assets/js/chirpy.js
  - assets/js/wiki_hover.js
extra_css:
    - https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css
    - assets/css/template/blog.css
    - assets/css/template/grid.css
    - assets/css/template/img-grids-float.css
    - assets/css/template/utils.css
    - assets/css/admonition.css
    - assets/css/custom_attributes.css
    - assets/css/customization.css
extra:
  SEO: assets/meta/logo.png
  comments: true #disable comments globally
  generate_graph: true #generate the graph of the site
  attachments: 'assets/img' #path to the folder where the attachments are stored
  blog_list:
    pagination: true #enable pagination
    pagination_message: true #display the message "Showing x posts out of y"
    pagination_translation: 'posts in' #message to display before the number of posts ; Add your own translation!
    no_page_found: "No pages found!" #message to display when no pages are found ; Add your own translation!
  hooks:
    strip_comments: true
    fix_heading: true

Error

The website shows "Error" when hovering page numbers

Bug description

The website shows "Error" when hovering page numbers

Steps to reproduce

  1. Go to "https://carlos-gamedev.github.io/Category%206/#page1"
  2. Hover one of the page numbers

Expected behavior

No response

Screenshots

image

Additional context

No response

Mara-Li commented 1 year ago

Could you please open the console (CLTR + MAJ + I) to check it?

To be honest, I ignored the page number when I coded this so I think I will just exclude it in the code.

As I don't have a computer this WE, I can't fix that for the moment ;(.

(Yes you can't web code on Ipad yet :()

vu-truong-personal commented 1 year ago

I've checked and the bug is in wiki_hover.js

image
Mara-Li commented 1 year ago

Perfect! As I said, I can't right know edit the file to prevent the error, but i will do it tomorrow 😀

vu-truong-personal commented 1 year ago

Many thanks! :heart_eyes:

Mara-Li commented 1 year ago

Fixed in follow_template v.0.0.10 https://github.com/ObsidianPublisher/follow_template/blob/0.0.10/docs/assets/js/chirpy.js