diff --git a/index.html b/index.html index ae717859ee..fef21c9757 100644 --- a/index.html +++ b/index.html @@ -152,6 +152,27 @@
If you want to prevent any elements from being automatically highlighted, you can use the attribute data-manual
on the <script>
element you used for prism and use the API.
Example:
<script src="prism.js" data-manual></script>
+ In combination with CDNs, we recommend using the Autoloader plugin which automatically loads languages when necessary.
+ +The setup of the Autoloader, will look like the following. You can also your own themes of course.
+ ++ +<!DOCTYPE html> +<html> +<head> + ...
+<link href="https://myCDN.com/prism@v1.x/themes/prism.css" rel="stylesheet" />
+</head> +<body> + ...
+<script src="https://myCDN.com/prism@v1.x/components/prism-core.min.js"></script> + <script src="https://myCDN.com/prism@v1.x/plugins/autoloader/prism-autoloader.min.js"></script> + <script>Prism.plugins.autoloader.languages_path = 'https://myCDN.com/prism@v1.x/components/'</script>
+</body> +</html>
CDNs which provide PrismJS are e.g. cdnjs and jsDelivr.