Try   HackMD

中文教學

How to Use Template

Template helps you use HackMD easier and faster, especially in these three ways:

  1. Save your time copy-pasting from recurring notes, such as your weekly meeting minutes.
  2. Keep your contents consistent, use the same styling for all your blog posts and study notes.
  3. Re-use complex components, such as UML diagrams, so you don't have to build them from scratch every time.

:bulb: Hint: If you want to use template for styling (using HTML <style>), embedding the template might be the better way.
You could find the tutorial and some example styling template below:

Apply template

1. Create a new note with template

Click on the button next to the [New note] and click [ Create a note from template] in the drop down menu. You will then see the template panel. Choose which template to use and hit [Use this template].

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Alternatively, you could create a new empty note and see the last three templates you used at the bottom of the editing area. Click to apply.

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

2. Insert template to a note

You could save block of contents as templates and re-use them when needed. Click the menu icon at the top-right corner and hit " Insert from template" to see the template panel. The chosen template will be inserted to your cursor position in the note when you click [Use this template].

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Custom template

Save current note as template:

Click " Save as template" in the menu at the top-right corner, and give your template a name.

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Create a template from scratch

You could "Create new template" from the button on the top right corner on the template panel.

:bulb: Hint: The template created this way will receive its title from the template name, but changing the title doesn't change the template name. To change that, see manage template

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Manage template

You could manage (rename, edit, and delete) your templates in the template panel.

:bulb: Hint: The preview of a template in the template panel would be its rendered view, so those invisible elements, such as YAML metadata、contents of HTML <style> or <!-- blocks commented out --> will not show.

Since templates are just normal notes marked as templates, when you try to delete a template, HackMD will confirm the deletion of the underlying note. If you want to keep the note, don't forget to check the checkbox to keep the content.

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

:warning: Warning
On the other hand, if you want to delete a template but don't want to lose the content. You should check the option Turn this template into a regular note and keep its content !

Editing template is pretty much the same as editing regular notes - all your edits will be automatically saved, except you will see a green banner telling you that you're editing a template.

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

▲ Green banner shows under template editing mode

If you unintentionally modify the template, you could always recover your content in [My Trash/Team Trash] .

:bulb: Hint: New changes on a template won't get applied to notes previously created with that template. If that's what you want, try embedding the template.

Default template

Default template is a Prime feacture.

Templates saves time and efforts and you can set one of them as the default template so that every new note will apply the same template.

You can set default template for each workspace.

:warning: You cannot set a personal template as the default template for a team.

My Workspace

Visit My Workspace → Settings → Notes → Template

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

▲ Set default template for My Workspace

Team Workspace

Visit Team Workspace → Team Settings → Notes → Template

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

▲ Set default template for a Team Workspace