Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Settings

Zhuochun edited this page Sep 3, 2017 · 8 revisions

Basic Settings

A basic set of settings are available in Settings page: cmd-, -> Packages -> Markdown-Writer -> Settings.

If you do not see any settings (due to a Atom's bug), please activate Markdown-Writer using command (e.g. Open Cheat Sheet). Then close and reopen the Settings page.

Refer to Settings for Front Matters on how to configure URLs to categories/posts/tags definitions.

Advance Settings

Markdown-Writer provides additional set of customisations (full list) to overwrite the default behaviours.

Apply Settings Globally

Go to menu Atom -> Config..., find or add "markdown-writer": key and append the configurations under it.

"*": # the first line you see in config.cson
  "...": # other plugins installed
  "markdown-writer":
    siteEngine: "jekyll" # add any additional configurations here, with indentation

Apply settings to Specific Projects

Open your project in Atom, trigger command Markdown Writer: Create Project Configs. This will create a _mdwriter.cson file under your project/blog root, with all the default settings.

Edit any settings, then run command Window: Reload or use menu: View -> Developer -> Reload Window to source the changes.

If you want to fallback some settings to your global configs, remember to delete those settings.

Read this config file for an example.

Example Customizations

Change Front Matter

'markdown-writer':
  'frontMatter': """
layout: "custom-layout"
title: "<title>"
date: "<date>"
---
  """

Use * instead _ for Italic Style

'markdown-writer':
  'textStyles':
    'italic': 'before': "*", 'after': "*"

Use Octopress Image Tag

'markdown-writer':
  'imageTag': "{% img <align> <src> <width> <height> '{alt}' %}"

Use Different Unorder List

'markdown-writer':
  ulBullet0: "-" # indentation = 0
  ulBullet1: "*" # indentation = 1
  ulBullet2: "+" # indentation = 2

Change Image Directory

Put under current file's directory/images/file-name/*.jpg

'markdown-writer':
  siteImagesDir: "{directory}/images/{slug}/"
Clone this wiki locally