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

Start testing Google Code Prettify #19

Closed
Phrancis opened this issue Jan 12, 2015 · 6 comments
Closed

Start testing Google Code Prettify #19

Phrancis opened this issue Jan 12, 2015 · 6 comments

Comments

@Phrancis
Copy link
Contributor

Here is a guide to get started: http://code.google.com/p/google-code-prettify/wiki/GettingStarted

Here are the steps:

  1. Create a test HTML page to test it with the default loadout.
  2. Download the Prettify package and install & test locally
  3. Create and test a new custom style
@Phrancis
Copy link
Contributor Author

Step 1 completed. By adding <script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script> into the header, and using <pre class="prettyprint">CODE HERE</pre> the default style can be used. class="prettyprint linenums" will also enable line numbers.
prettify1

@Phrancis
Copy link
Contributor Author

Note it's possible to change between the default skins by changing the way it's written in the <script> using CGI arguments, like so:

<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?autoload=true&amp;skin=desert"></script>

This changes the skin to "desert.css". Other default skins can be seen at this link: http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html

This will be useful for testing multiple different skins in different pages. All Prettified code in one single HTML file has to be using the same skin, AFAICT.

@Phrancis
Copy link
Contributor Author

Running into a few problems, namely getting the Prettify things to run locally. Posted to SO: http://stackoverflow.com/questions/27914206/prettify-not-linking-correctly-locally

@Phrancis
Copy link
Contributor Author

Got Prettify to work and pushed it today. Now to test making a customized style.

@Phrancis
Copy link
Contributor Author

Customized tests didn't work with current setup. I forked a working repo with pre-made styles and it seems to work good now. Just need to test customized CSS and this will be done.

@Phrancis
Copy link
Contributor Author

Got all CSS/HTML/JS files to work in local directories and should be honky-dory from here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant