<!DOCTYPE html> <html lang="
en"
> <head> <meta http-equiv="
Content-Type"
content="
text/html; charset=UTF-8"
> <meta charset="
utf-8"
> <meta name="
viewport"
content="
width=device-width, initial-scale=1, shrink-to-fit=no"
> <meta http-equiv="
X-UA-Compatible"
content="
IE=edge"
> <title> a post with code | KGML Lab
</title> <meta name="
author"
content="
"
> <meta name="
description"
content="
an example of a blog post with some code"
> <meta name="
keywords"
content="
jekyll, jekyll-theme, academic-website, portfolio-website"
> <link rel="
stylesheet"
href="
/assets/css/bootstrap.min.css?a4b3f509e79c54a512b890d73235ef04"
> <link rel="
stylesheet"
href="
https://cdn.jsdelivr.net/npm/[email protected]/css/mdb.min.css"
integrity="
sha256-jpjYvU3G3N6nrrBwXJoVEYI/0zw8htfFnhT9ljN3JJw="
crossorigin="
anonymous"
> <link defer rel="
stylesheet"
href="
/assets/css/academicons.min.css?f0b7046b84e425c55f3463ac249818f5"
> <link defer rel="
stylesheet"
type="
text/css"
href="
https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:100,300,400,500,700|Material+Icons&display=swap"
> <link defer rel="
stylesheet"
href="
/assets/css/jekyll-pygments-themes-github.css?591dab5a4e56573bf4ef7fd332894c99"
media=""
id="
highlight_theme_light"
> <link rel="
shortcut icon"
href="
/assets/img/logo.jpg?2e16c9616245b247507d64d1f83bf696"
> <link rel="
stylesheet"
href="
/assets/css/main.css?d41d8cd98f00b204e9800998ecf8427e"
> <link rel="
canonical"
href="
https://kgml-lab.github.io/blog/2015/code/"
> <script src="
/assets/js/theme.js?9a0c749ec5240d9cda97bc72359a72c0"
></script> <link defer rel="
stylesheet"
href="
/assets/css/jekyll-pygments-themes-native.css?5847e5ed4a4568527aa6cfab446049ca"
media="
none"
id="
highlight_theme_dark"
> <script>initTheme();</script> </head> <body class="
fixed-top-nav "
> <header> <nav id="
navbar"
class="
navbar navbar-light navbar-expand-sm fixed-top"
role="
navigation"
> <div class="
container"
> <a class="
navbar-brand title font-weight-lighter"
href="
/"
> KGML Lab
</a> <button class="
navbar-toggler collapsed ml-auto"
type="
button"
data-toggle="
collapse"
data-target="
#navbarNav"
aria-controls="
navbarNav"
aria-expanded="
false"
aria-label="
Toggle navigation"
> <span class="
sr-only"
>Toggle navigation
</span> <span class="
icon-bar top-bar"
></span> <span class="
icon-bar middle-bar"
></span> <span class="
icon-bar bottom-bar"
></span> </button> <div class="
collapse navbar-collapse text-right"
id="
navbarNav"
> <ul class="
navbar-nav ml-auto flex-nowrap"
> <li class="
nav-item "
> <a class="
nav-link"
href="
/"
>About
</a> </li> <li class="
nav-item "
> <a class="
nav-link"
href="
/publications/"
>publications
</a> </li> <li class="
nav-item "
> <a class="
nav-link"
href="
/projects/"
>Research
</a> </li> <li class="
nav-item "
> <a class="
nav-link"
href="
/teaching/"
>teaching
</a> </li> <li class="
nav-item "
> <a class="
nav-link"
href="
/people/"
>people
</a> </li> <li class="
nav-item"
> <button id="
search-toggle"
title="
Search"
onclick="
openSearchModal()"
> <span class="
nav-link"
>ctrl k
<i class="
ti ti-search"
></i></span> </button> </li> <li class="
toggle-container"
> <button id="
light-toggle"
title="
Change theme"
> <i class="
ti ti-sun-moon"
id="
light-toggle-system"
></i> <i class="
ti ti-moon-filled"
id="
light-toggle-dark"
></i> <i class="
ti ti-sun-filled"
id="
light-toggle-light"
></i> </button> </li> </ul> </div> </div> </nav> <progress id="
progress"
value="
0"
> <div class="
progress-container"
> <span class="
progress-bar"
></span> </div> </progress> </header> <div class="
container mt-5"
role="
main"
> <div class="
post"
> <header class="
post-header"
> <h1 class="
post-title"
>a post with code
</h1> <p class="
post-meta"
> Created in July 15, 2015
</p> <p class="
post-tags"
> <a href="
/blog/2015"
> <i class="
fa-solid fa-calendar fa-sm"
></i> 2015
</a> ·
<a href="
/blog/tag/formatting"
> <i class="
fa-solid fa-hashtag fa-sm"
></i> formatting
</a> <a href="
/blog/tag/code"
> <i class="
fa-solid fa-hashtag fa-sm"
></i> code
</a> ·
<a href="
/blog/category/sample-posts"
> <i class="
fa-solid fa-tag fa-sm"
></i> sample-posts
</a> </p> </header> <article class="
post-content"
> <div id="
markdown-content"
> <p>This theme implements a built-in Jekyll feature, the use of Rouge, for syntax highlighting. It supports more than 100 languages. This example is in C++. All you have to do is wrap your code in markdown code tags:
</p> <div class="
language-markdown highlighter-rouge"
><div class="
highlight"
><pre class="
highlight"
><code><span class="
p"
>```
</span><span class="
nl"
>c++
0 commit comments