Source Code on WordPress.com

Source code on my previous posts wasn’t looking very good, so I found a new blog feature to try:

  • Posting Source Code
  • Begin with shortcode [code option1="value1" option2="value2"]
  • End with shortcode [/code]

Hopefully this will make some of the code examples and notes more readable. šŸ™‚

Favorite options:

  • language = bash, python, powershell, or text
  • gutter = false (hide line numbers)

NOTE FROM THE FUTURE (16 Jan 2016). Markdown enhances the code-posting feature with back-ticks for a span or triple-tilde for a block. “New Editor” does not fully support markdown but the classic WP-Admin still does. Bugs related to HTML entities are still a problem, including HTML/XML tags. Consider using the nice GitHub Gist embed also supported by WordPredd.com.

Advertisements

About notesbytom

Keeping technology notes on WordPress.com to free up my mind to solve new problems rather than figuring out the same ones repeatedly :-).
This entry was posted in Technical Communication and tagged , . Bookmark the permalink.

One Response to Source Code on WordPress.com

  1. Pingback: Embed Gist Code Snippet on WP.com | Notes by Tom

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s