import hljs from 'highlight.js/lib/highlight';
import javascript from 'highlight.js/lib/languages/javascript';
import ruby from 'highlight.js/lib/languages/ruby';
import elixir from 'highlight.js/lib/languages/elixir';
import shell from 'highlight.js/lib/languages/shell';
import bash from 'highlight.js/lib/languages/bash';
import css from 'highlight.js/lib/languages/css';
import nginx from 'highlight.js/lib/languages/nginx';
import json from 'highlight.js/lib/languages/json';

const languages = {
  javascript,
  ruby,
  elixir,
  shell,
  bash,
  css,
  nginx,
  json,
};

Object.entries(languages).forEach(([name, language]) => {
  hljs.registerLanguage(name, language);
});

hljs.initHighlightingOnLoad();

import highlight from 'highlight.js/lib/highlight';

import bash from 'highlight.js/lib/languages/bash';
import css from 'highlight.js/lib/languages/css';
import elixir from 'highlight.js/lib/languages/elixir';
import html from 'highlight.js/lib/languages/html';
import javascript from 'highlight.js/lib/languages/javascript';
import json from 'highlight.js/lib/languages/json';
import nginx from 'highlight.js/lib/languages/nginx';
import ruby from 'highlight.js/lib/languages/ruby';
import shell from 'highlight.js/lib/languages/shell';
import yaml from 'highlight.js/lib/languages/yaml';

const languages = {
  bash,
  css,
  elixir,
  html,
  javascript,
  json,
  nginx,
  ruby,
  shell,
  yaml,
};

Object.entries(languages).forEach(([name, language]) => {
  highlight.registerLanguage(name, language);
});

highlight.initHighlightingOnLoad();

Add more languages to highlight
Add more languages to highlight
