From e726014585409acacef2e79a8d83a55a9e47ecb6 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 31 May 2021 16:10:50 +0300 Subject: add more examples, update README --- _posts/2021-04-07-plain.md | 15 +++++++++++++++ _posts/2021-04-08-mathjax.md | 17 +++++++++++++++++ _posts/2021-04-08-test-post1.md | 15 --------------- _posts/2021-04-08-test-post2.md | 15 --------------- _posts/2021-04-09-snippets.md | 21 +++++++++++++++++++++ _posts/2021-04-09-test-post3.md | 24 ------------------------ _posts/2021-04-10-collapsible.md | 22 ++++++++++++++++++++++ _posts/snippets/hello.cpp | 7 +++++++ _posts/snippets/hello.hpp | 3 +++ _posts/snippets/snippet.cpp | 7 ------- _posts/snippets/snippet.hpp | 3 --- _posts/snippets/world.cpp | 7 +++++++ _posts/snippets/world.hpp | 3 +++ 13 files changed, 95 insertions(+), 64 deletions(-) create mode 100644 _posts/2021-04-07-plain.md create mode 100644 _posts/2021-04-08-mathjax.md delete mode 100644 _posts/2021-04-08-test-post1.md delete mode 100644 _posts/2021-04-08-test-post2.md create mode 100644 _posts/2021-04-09-snippets.md delete mode 100644 _posts/2021-04-09-test-post3.md create mode 100644 _posts/2021-04-10-collapsible.md create mode 100644 _posts/snippets/hello.cpp create mode 100644 _posts/snippets/hello.hpp delete mode 100644 _posts/snippets/snippet.cpp delete mode 100644 _posts/snippets/snippet.hpp create mode 100644 _posts/snippets/world.cpp create mode 100644 _posts/snippets/world.hpp (limited to '_posts') diff --git a/_posts/2021-04-07-plain.md b/_posts/2021-04-07-plain.md new file mode 100644 index 0000000..362fc89 --- /dev/null +++ b/_posts/2021-04-07-plain.md @@ -0,0 +1,15 @@ +--- +title: Plain text +excerpt: > + Just some placeholder text. +category: Life +--- +Pellentesque et lacus eget lacus laoreet eleifend eu in nunc. +Praesent ornare aliquam dui, vitae maximus lorem. +Donec semper nisi nisi, ac ultrices enim maximus quis. +Vivamus sollicitudin facilisis nulla in auctor. +Fusce massa sapien, congue et dictum sed, pretium sed magna. +Vestibulum vulputate, quam vitae suscipit iaculis, ligula purus luctus quam, in +pharetra ex nisl non sapien. +Praesent auctor dignissim ligula, interdum hendrerit urna finibus aliquam. +Praesent neque turpis, porttitor id hendrerit non, luctus et ligula. diff --git a/_posts/2021-04-08-mathjax.md b/_posts/2021-04-08-mathjax.md new file mode 100644 index 0000000..c521f54 --- /dev/null +++ b/_posts/2021-04-08-mathjax.md @@ -0,0 +1,17 @@ +--- +title: MathJax +excerpt: > + Awesome MathJax-powered math! +category: Work +mathjax: true +--- +Today, we'll "prove" that $$2 \times 2 \ne 5$$. + +$$ +\begin{gather} +2 \times 2 = 2 + 2 = 4 \\ +4 \ne 5 \implies 2 \times 2 \ne 5 +\end{gather} +$$ + +Q.E.D. diff --git a/_posts/2021-04-08-test-post1.md b/_posts/2021-04-08-test-post1.md deleted file mode 100644 index 2ec56a9..0000000 --- a/_posts/2021-04-08-test-post1.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Test post 1 -excerpt: > - This is test post #1. -category: Work ---- -Lorem ipsum dolor sit amet, consectetur adipiscing elit. -Vivamus rutrum cursus lorem, et feugiat arcu porttitor eget. -Praesent laoreet odio orci. -Aliquam vel sodales risus, nec auctor elit. -Interdum et malesuada fames ac ante ipsum primis in faucibus. -Donec nec pulvinar tellus, id pellentesque arcu. -Vestibulum id dapibus velit. -Nam non consequat libero. -Suspendisse euismod purus vitae luctus molestie. diff --git a/_posts/2021-04-08-test-post2.md b/_posts/2021-04-08-test-post2.md deleted file mode 100644 index ee0e0a2..0000000 --- a/_posts/2021-04-08-test-post2.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Test post 2 -excerpt: > - This is test post #2. -category: Life ---- -Pellentesque et lacus eget lacus laoreet eleifend eu in nunc. -Praesent ornare aliquam dui, vitae maximus lorem. -Donec semper nisi nisi, ac ultrices enim maximus quis. -Vivamus sollicitudin facilisis nulla in auctor. -Fusce massa sapien, congue et dictum sed, pretium sed magna. -Vestibulum vulputate, quam vitae suscipit iaculis, ligula purus luctus quam, in -pharetra ex nisl non sapien. -Praesent auctor dignissim ligula, interdum hendrerit urna finibus aliquam. -Praesent neque turpis, porttitor id hendrerit non, luctus et ligula. diff --git a/_posts/2021-04-09-snippets.md b/_posts/2021-04-09-snippets.md new file mode 100644 index 0000000..f76845a --- /dev/null +++ b/_posts/2021-04-09-snippets.md @@ -0,0 +1,21 @@ +--- +title: Code snippets +excerpt: > + Easily include code snippets in your posts. +snippets_root_directory: snippets +snippets_language: c++ +snippets: + hello: + - hello.hpp + - hello.cpp + world: + - world.hpp + - world.cpp +--- +It's pretty simple, just use the corresponding include: + +{% include snippets/section.html section_id='hello' %} + +This is another set of snippets: + +{% include snippets/section.html section_id='world' %} diff --git a/_posts/2021-04-09-test-post3.md b/_posts/2021-04-09-test-post3.md deleted file mode 100644 index a1ca425..0000000 --- a/_posts/2021-04-09-test-post3.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Test post 3 -excerpt: > - This is test post #3. With snippets! -snippets_root_directory: snippets -snippets_language: c++ -snippets: - hello: - - snippet.hpp - - snippet.cpp ---- -Aenean ex ipsum, feugiat vel tortor sit amet, dictum facilisis dui. -Pellentesque commodo leo at eros elementum porta. -Aenean ac mauris risus. -Nam nec mattis orci. -Class aptent taciti sociosqu ad litora torquent per conubia nostra, per -inceptos himenaeos. -Duis rutrum turpis leo, sit amet cursus tellus tincidunt et. -Nullam eget tortor nisl. -Class aptent taciti sociosqu ad litora torquent per conubia nostra, per -inceptos himenaeos. -Pellentesque posuere nunc a purus eleifend pulvinar. - -{% include snippets/section.html section_id='hello' %} diff --git a/_posts/2021-04-10-collapsible.md b/_posts/2021-04-10-collapsible.md new file mode 100644 index 0000000..17b82a3 --- /dev/null +++ b/_posts/2021-04-10-collapsible.md @@ -0,0 +1,22 @@ +--- +title: Collapsible snippets +excerpt: > + Snippets can be hidden in collapsible panels. +snippets_root_directory: snippets +snippets_language: c++ +snippets_collapsible: true +snippets: + hello: + - hello.hpp + - hello.cpp + world: + - world.hpp + - world.cpp +--- +Just set a front matter value, and voilĂ ! + +{% include snippets/section.html section_id='hello' %} + +This is another set of snippets: + +{% include snippets/section.html section_id='world' %} diff --git a/_posts/snippets/hello.cpp b/_posts/snippets/hello.cpp new file mode 100644 index 0000000..2f96a60 --- /dev/null +++ b/_posts/snippets/hello.cpp @@ -0,0 +1,7 @@ +#include "world.hpp" + +#include + +void hello_snippets() { + std::cout << "Hello snippets!\n"; +} diff --git a/_posts/snippets/hello.hpp b/_posts/snippets/hello.hpp new file mode 100644 index 0000000..46556b6 --- /dev/null +++ b/_posts/snippets/hello.hpp @@ -0,0 +1,3 @@ +#pragma once + +void hello_snippets(); diff --git a/_posts/snippets/snippet.cpp b/_posts/snippets/snippet.cpp deleted file mode 100644 index bc4122e..0000000 --- a/_posts/snippets/snippet.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "snippet.hpp" - -#include - -void hello_snippets() { - std::cout << "Hello snippets!\n"; -} diff --git a/_posts/snippets/snippet.hpp b/_posts/snippets/snippet.hpp deleted file mode 100644 index 46556b6..0000000 --- a/_posts/snippets/snippet.hpp +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -void hello_snippets(); diff --git a/_posts/snippets/world.cpp b/_posts/snippets/world.cpp new file mode 100644 index 0000000..54d3807 --- /dev/null +++ b/_posts/snippets/world.cpp @@ -0,0 +1,7 @@ +#include "world.hpp" + +#include + +void hello_world() { + std::cout << "Hello world!\n"; +} diff --git a/_posts/snippets/world.hpp b/_posts/snippets/world.hpp new file mode 100644 index 0000000..32258b1 --- /dev/null +++ b/_posts/snippets/world.hpp @@ -0,0 +1,3 @@ +#pragma once + +void hello_world(); -- cgit v1.2.3