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

Blogger Integration #16

Open
hongthaiis opened this issue Dec 9, 2015 · 2 comments
Open

Blogger Integration #16

hongthaiis opened this issue Dec 9, 2015 · 2 comments

Comments

@hongthaiis
Copy link

Hi,
I would like to integrate SunlightJS to blogger. I followed step by step in "installation guide" at your home page: http://sunlightjs.com/docs.html#installation:

  • First, I added these line to my template:

    <link rel="stylesheet" type="text/css" href="/path/to/sunlight.default.css" />
    <script type="text/javascript" src="/[my_path]/sunlight-min.js"></script>
    

    <script type="text/javascript" src="/[my_path]/sunlight.csharp-min.js"></script>
    <script type="text/javascript">
    Sunlight.highlightAll();
    </script>

  • Then, in post, I wrapped code in pre tag:

    public object DoStuff() {
    return new object();
    }
    

But all my result only be this: http://i.imgur.com/JdbOyT1.png
Where am I wrong?

@tmont
Copy link
Owner

tmont commented Dec 9, 2015

A couple possibilities:

  1. Sunlight.highlightAll() needs to come after the DOM is ready, i.e. right before the closing </body> tag or in a DOMReady event listener (like $(document).ready(...))
  2. You are missing the sunlight-highlight-csharp class on your <pre> tag.

@hongthaiis
Copy link
Author

Sorry, tmont!
I've tried many ways to integrate sunlightJS to Blogger, including your way, but it didn't work! :(

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

2 participants