List of supported languages on homepage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
diff --git a/index.html b/index.html
index f290b8f..aa713a9 100644
--- a/index.html
+++ b/index.html
@@ -152,7 +152,11 @@
<p>If you want to prevent any elements from being automatically highlighted, you can use the attribute <code>data-manual</code> on the <code><script></code> element you used for prism and use the <a href="extending.html#api">API</a>.
Example:</p>
<pre><code><script src="prism.js" data-manual></script></code></pre>
-</p>
+</section>
+
+<section id="languages-list" class="language-markup">
+ <h1>Supported languages</h1>
+ <p>This is the list of all languages currently supported by Prism, with their corresponding alias, to use in place of <code>xxxx</code> in the <code>language-xxxx</code> class:</p>
</section>
<section id="plugins">
@@ -214,6 +218,37 @@
<script src="utopia.js"></script>
<script src="components.js"></script>
<script src="code.js"></script>
+<script>
+(function() {
+ var languageItems = [];
+ var languages = components.languages;
+ for (var id in languages) {
+ if (id == 'meta') {
+ continue;
+ }
+ var name = languages[id].title || languages[id];
+
+ languageItems.push({
+ tag: 'li',
+ attributes: {
+ 'data-id': id
+ },
+ contents: [
+ name,
+ ' - ',
+ {
+ tag: 'code',
+ contents: id
+ }
+ ]
+ });
+ }
+ $u.element.create('ul', {
+ contents: languageItems,
+ inside: '#languages-list'
+ });
+}());
+</script>
</body>
</html>
diff --git a/style.css b/style.css
index 83950e1..b0f364d 100644
--- a/style.css
+++ b/style.css
@@ -388,4 +388,17 @@ label a.owner {
label a.owner:not(:hover) {
text-decoration: none;
color: #aaa;
-}
\ No newline at end of file
+}
+
+#languages-list ul {
+ column-count: 3;
+}
+ #languages-list li {
+ padding: .2em;
+ }
+ #languages-list li[data-id="javascript"] {
+ border-bottom: 1px solid #aaa;
+ padding-bottom: 1em;
+ margin-bottom: 1em;
+ margin-right: 1em;
+ }
\ No newline at end of file