You can embed other notes into the current one. This allows you to "modularize" your notes and reuse common parts.
For example, you are writing a series of posts or even a book, and you want to reuse the below info block in all your posts:
Embedding notes will save you time by adding the same hint to each post. Also, if you want to change this hint later, you don't have to find them in all posts and change them all over again. Here's how.
{}
at where you want to embed the note. Choose to embed a HackMD note and specify the note ID.
Even cooler, you can customize the style of your notes in HackMD, changing their appearance and applying your favorite themes. Once you know how to embed notes, we can use this feature more flexibly.
<style>...</style>
element to set the styles of page elements.Notes in HackMD support partial HTML and CSS, which can be used to customize the style of your notes. Writing within the <style>
tag is the most straightforward method.
You can refer to:
Design your own theme in another HackMD note. You can find the example we used below:
{%hackmd @debbylin/theme-matcha %}
Preview: https://hackmd.io/@debbylin/BJY6lnkWa
Theme: https://hackmd.io/@debbylin/theme-matcha-book
{%hackmd @debbylin/theme-matcha-book %}
Happy to use it or duplicate the CSS, customize it.
Some languages, such as Mandarin, Japanese, and Korean, can be written vertically.
{%hackmd hackmd-vertical-writing-theme %}
Try to paste the code below into one of your note. You shall see the theme of the note has changed accordingly.
{%hackmd @themes/dracula %}
This line is to tell HackMD: "Please go to the Workspace @themes
and fetch the note whose slug of permalink is dracula
. Include that note into the current one."