snipt

Ctrl+h for KB shortcuts

Markdown

Blogging on Snipt

Snipt offers a full featured blogging platform alongside its obvious code storage and sharing functionalities. This Snipt documents those blogging features.

If you have any questions, there are a bunch of ways to get in touch:

  • Ask "nicksergeant" in #snipt on irc.freenode.net.
  • Use the comments attached to this snipt.
  • Use the support chat in the bottom right.
  • Reply to us on Twitter.
  • File a support ticket on GitHub

URLs

First off, every user automatically has a Snipt blog. The URL format is:

username.snipt.net

So if your username is cz, your URL would be https://cz.snipt.net/.

Note: If you have an underscore in your username, the underscores would be represented by dashes in your default blog URL (since underscores are not valid in domains or subdomains). So our api_test_user has a blog URL of: https://api-test-user.snipt.net.

Custom domain

If you become a Snipt Pro, you can point a custom domain to your Snipt blog. Here's an example of a Snipt blog with a custom domain: http://nicksergeant.com.

If you decide to go Pro (you should, it's awesome), simply head to your Account and enter the domain you'd like to use, and update your DNS with instructions from your Account page.

Posts

To get a Snipt to appear on your Snipt blog, you simply mark a Snipt as both Public and Blog post. Markdown is a great post Type if you're writing text-heavy posts, or you can simply use whatever code type and you'll get the Snipt-style highlighting on blog posts, as well.

Publish date

On blog posts, sometimes it's useful to state that the post was originally published on a certain date and time (such as with importing from another blogging platform). When you mark a post as Blog post, the Publish date field will automatically appear. You can also use the Publish date to schedule posts to be published in the future.

Custom content

Snipt embeds

The blogging platform allows you to embed other Snipts into blog posts themselves. We haven't yet built out the UI for this yet, so you have to do some digging.

In the blog post, you would enter this code to embed another Snipt:

[[921ac0bbb4d922ddcbc2e61fd2cd8ed]]

The ID between the brackets is the key of the Snipt. You can find the key by going to your Snipt and clicking "Embed". The key is the ID at the end of the URL (not including slashes):

https://snipt.net/embed/921ac0bbb4d922ddcbc2e61fd2cd8ed/

YouTube videos

When you're in your Markdown snipt, adding this custom tag will automatically embed a YouTube video with the desired dimensions:

[[youtube-{video_id}-{width}x{height}]]

Where {video_id} is replaced with something like K7vU2cDIyjU (you can grab the ID in the URL of any YouTube video). {width} would be replaced with a width value like 688 and {height} with something like 387.

Vimeo videos

Same as YouTube above, but the code is:

[[vimeo-{video_id}-{width}x{height}]]

Tweets

First, grab the ID from the tweet URL. If the URL is https://twitter.com/Snipt/status/319285740448133123, the tweet_id would be 319285740448133123. Then you'd embed your tweet in your post like so (omit the curly brackets):

[[tweet-{tweet_id}]]

Headings

Currently we have one custom style for headings in certain themes:

Themes

Regular Snipt users are given a default blog theme for which to use for their Snipt blog. However, if you become a Snipt Pro, you gain access to exclusive Pro-only blog themes. Currently there is one Pro theme available, but we're working on others.

Sidebar

Both the default blog theme and the Pro blog theme have support for adding additional content in the sidebar. To enable this content, create a Snipt with the title "Sidebar", set the Type to Markdown, and mark it as Blog post. The content will then appear in the sidebar of your blog theme.

The sidebar in the Pro theme also supports a GitTip button. To enable the button, first set your GitTip username in your Account, then place this text where you would like the button to be rendered in the sidebar:

[[gittip]]

Header

The Pro theme also has support for additional text in the header. To enable this content, create a Snipt with the title "Header", set the Type to Markdown, and mark it as Blog post. The content will then appear in the sidebar of your blog theme.

Custom CSS for Pro users

If you're a Snipt Pro, you can customize the CSS of your blog theme (either the default theme or any of the Pro themes). To enable this, create a Snipt with the title "CSS", set the Type to CSS, and mark it as Blog post. The custom CSS will then be loaded into your blog theme.

Custom fields for Pro users

If you're a Snipt Pro, we offer a few custom fields you can override for your blog. All of these fields can be updated on your Account page once you're a Pro. The fields are:

  • Disqus shortname -- If you have your own Disqus account that you'd like to use for your blog comments.
https://snipt.net/embed/cc771878540e077ad245a0a29e100262/
/raw/cc771878540e077ad245a0a29e100262/
cc771878540e077ad245a0a29e100262
markdown
Markdown
134
2019-06-18T12:42:54
True
False
False
Aug 13, 2013 at 01:57 PM
/api/public/snipt/53863/
blogging
<p>Snipt offers a full featured blogging platform alongside its obvious code storage and sharing functionalities. This Snipt documents those blogging features.</p> <p>If you have any questions, there are a bunch of ways to get in touch:</p> <ul> <li>Ask "nicksergeant" in #snipt on irc.freenode.net.</li> <li>Use the comments attached to this snipt.</li> <li>Use the support chat in the bottom right.</li> <li>Reply to us on <a href="http://twitter.com/snipt">Twitter</a>.</li> <li>File a support ticket on <a href="https://github.com/nicksergeant/snipt/issues">GitHub</a></li> </ul> <h2>URLs</h2> <p>First off, every user automatically has a Snipt blog. The URL format is:</p> <pre><code>username.snipt.net </code></pre> <p>So if your username is <code>cz</code>, your URL would be <a href="https://cz.snipt.net/">https://cz.snipt.net/</a>.</p> <p><em>Note</em>: If you have an underscore in your username, the underscores would be represented by dashes in your default blog URL (since underscores are not valid in domains or subdomains). So our <code>api_test_user</code> has a blog URL of: <a href="http://api-test-user.snipt.net">https://api-test-user.snipt.net</a>.</p> <h2>Custom domain</h2> <p>If you become a <a href="https://snipt.net/pro/">Snipt Pro</a>, you can point a custom domain to your Snipt blog. Here's an example of a Snipt blog with a custom domain: <a href="http://nicksergeant.com">http://nicksergeant.com</a>.</p> <p>If you decide to go Pro (you should, it's awesome), simply head to your <a href="https://snipt.net/account/">Account</a> and enter the domain you'd like to use, and update your DNS with instructions from your Account page.</p> <h2>Posts</h2> <p>To get a Snipt to appear on your Snipt blog, you simply mark a Snipt as both <code>Public</code> and <code>Blog post</code>. Markdown is a great post <code>Type</code> if you're writing text-heavy posts, or you can simply use whatever code type and you'll get the Snipt-style highlighting on blog posts, as well.</p> <p><strong>Publish date</strong></p> <p>On blog posts, sometimes it's useful to state that the post was originally published on a certain date and time (such as with importing from another blogging platform). When you mark a post as <code>Blog post</code>, the <code>Publish date</code> field will automatically appear. You can also use the <code>Publish date</code> to schedule posts to be published in the future.</p> <p><strong>Custom content</strong></p> <p><strong><em>Snipt embeds</em></strong></p> <p>The blogging platform allows you to embed other Snipts into blog posts themselves. We haven't yet built out the UI for this yet, so you have to do some digging.</p> <p>In the blog post, you would enter this code to embed another Snipt:</p> <pre><code>[[921ac0bbb4d922ddcbc2e61fd2cd8ed]] </code></pre> <p>The ID between the brackets is the <code>key</code> of the Snipt. You can find the key by going to your Snipt and clicking "Embed". The key is the ID at the end of the URL (not including slashes):</p> <pre><code>https://snipt.net/embed/921ac0bbb4d922ddcbc2e61fd2cd8ed/ </code></pre> <p><strong><em>YouTube videos</em></strong></p> <p>When you're in your Markdown snipt, adding this custom tag will automatically embed a YouTube video with the desired dimensions:</p> <pre><code>[[youtube-{video_id}-{width}x{height}]] </code></pre> <p>Where <code>{video_id}</code> is replaced with something like <code>K7vU2cDIyjU</code> (you can grab the ID in the URL of any YouTube video). <code>{width}</code> would be replaced with a width value like <code>688</code> and <code>{height}</code> with something like <code>387</code>.</p> <p><strong><em>Vimeo videos</em></strong></p> <p>Same as YouTube above, but the code is:</p> <pre><code>[[vimeo-{video_id}-{width}x{height}]] </code></pre> <p><strong><em>Tweets</em></strong></p> <p>First, grab the ID from the tweet URL. If the URL is <code>https://twitter.com/Snipt/status/319285740448133123</code>, the <code>tweet_id</code> would be <code>319285740448133123</code>. Then you'd embed your tweet in your post like so (omit the curly brackets):</p> <pre><code>[[tweet-{tweet_id}]] </code></pre> <p><strong><em>Headings</em></strong></p> <p>Currently we have one custom style for headings in certain themes:</p> <ul> <li>H4s are styled with a blue decorator in the side gutter of the "Pro Adams" theme, as seen here: <a href="http://nicksergeant.com/work/">http://nicksergeant.com/work/</a></li> </ul> <h2>Themes</h2> <p>Regular Snipt users are given a default blog theme for which to use for their Snipt blog. However, if you become a <a href="https://snipt.net/pro/">Snipt Pro</a>, you gain access to exclusive Pro-only blog themes. Currently there is one Pro theme available, but we're working on others.</p> <ul> <li>Default theme sample: <a href="https://test.snipt.net/">https://test.snipt.net/</a></li> <li>"Pro Adams" theme sample: <a href="http://nicksergeant.com">http://nicksergeant.com</a></li> </ul> <h2>Sidebar</h2> <p>Both the default blog theme and the Pro blog theme have support for adding additional content in the sidebar. To enable this content, create a Snipt with the title "Sidebar", set the <code>Type</code> to Markdown, and mark it as <code>Blog post</code>. The content will then appear in the sidebar of your blog theme.</p> <p>The sidebar in the Pro theme also supports a <a href="http://gittip.com/">GitTip</a> button. To enable the button, first set your GitTip username in your <a href="https://snipt.net/account/">Account</a>, then place this text where you would like the button to be rendered in the sidebar:</p> <pre><code>[[gittip]] </code></pre> <h2>Header</h2> <p>The Pro theme also has support for additional text in the header. To enable this content, create a Snipt with the title "Header", set the <code>Type</code> to Markdown, and mark it as <code>Blog post</code>. The content will then appear in the sidebar of your blog theme.</p> <h2>Custom CSS for Pro users</h2> <p>If you're a <a href="https://snipt.net/pro/">Snipt Pro</a>, you can customize the CSS of your blog theme (either the default theme or any of the Pro themes). To enable this, create a Snipt with the title "CSS", set the <code>Type</code> to CSS, and mark it as <code>Blog post</code>. The custom CSS will then be loaded into your blog theme.</p> <h2>Custom fields for Pro users</h2> <p>If you're a <a href="https://snipt.net/pro/">Snipt Pro</a>, we offer a few custom fields you can override for your blog. All of these fields can be updated on your <a href="https://snipt.net/account/">Account</a> page once you're a Pro. The fields are:</p> <ul> <li><strong>Disqus shortname</strong> -- If you have your own <a href="http://disqus.com">Disqus</a> account that you'd like to use for your blog comments.</li> </ul>
blogging, snipt