-
-
Notifications
You must be signed in to change notification settings - Fork 196
3. Create a blog post
After configuring DasBlog Core you can start creating, editing and publishing blog posts!
Dasblog Core supports a basic in browser blogging experience by logging in and navigating to post creation page (...post/create).
Dasblog Core supports:
- Adding new categories
- Future post dates
- Uploading and inserting images
- Disallowing comments
You can choose between several Web post edit controls (TinyMCE, NiceEdit, Froala and a Html Text Area control) defined in the Site Admin page (.../admin/settings).
Of course you can also use a blogging tool like Open Live Writer to create and edit blog posts.
The credentials required when adding a blog are the same ones used when logging into the site. Account setup instructions can be found here.
If you are publishing multi line code snippets (xml, html, c#, etc.) or some other text that needs a strict syntax and/or specific formatting we strongly suggest using the <pre>
tag .
The content of the <pre>
tag will need to be HTML-escaped for each of the following characters & < >
.
& &
< &lt;
> &gt;
In this first example I want my blog to display the HTML code snippet exactly as shown here but it contains multiple instances of < >
:
<div>
<h1>Details</h1>
</div>
This is the literal HTML source code I would need to make that happen:
<pre>
&lt;div&gt;
&lt;h1&gt;Details&lt;h1&gt;
&lt;/div&gt;
</pre>
I have C# sample code that has the following characters & < >
:
List<string> val = null;
if(val != null && val.Count() > 0)
{
Console.WriteLine("Problem detected");
}
I will need to encode as follows for it to display correctly:
<pre>
List&lt;string&gt; val = null;
if(val != null && val.Count() &gt; 0)
{
Console.WriteLine("Problem detected");
}
</pre>
Finally, if you also want code coloring or numbering I would suggest a code highlighter. My preferred code highlighter is EnlighterJS, an open source syntax highlighter written in pure JavaScript.
If you have additional questions or concerns please submit an issue.