[Resolved] "Crayon Syntax Highlighter" doesn’t show codes properly when pjax transition

This topic contains 2 replies, has 2 voices, and was last updated by Avatar alan432 10 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1014
    Avatar
    alan432
    Participant

    First of all, I love your theme.

    I’m making the personal blog which using “Crayon Syntax Highlighter” plugin to highlight my code samples. I realized when I move to pages by pjax transition, my codes are not styled properly by this plugin. How can I fix it?

    #1015
    Avatar
    M Tonomura
    Keymaster

    Hello, alan432.

    Thank you for using our theme.
    I investigated and it’s because “Crayon Syntax Highlighter” needs to load its style and js on the page where it’s used. So it will be solved by adding the lines below at Pjax Blog Settings > Pjax > “Replace Tags in Html Head Tag”.

    —— add these lines at the end of the textarea —–
    script#crayon_js
    script#lazy-load-crayon

    #1016
    Avatar
    alan432
    Participant

    Thank you for your quick response.
    It works for me! Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Latest Posts