Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Noel Fernandes 16 posts 80 karma points
    Jul 29, 2018 @ 07:45
    Noel Fernandes
    0

    Programmers/Developers blog using Umbraco

    Hi All!!

    I wanted to setup a developers blog using Umbraco. The articles in this blog would have code written in various languages, with C#, XML, JSON and Javascript being the main ones.

    I would like to know if there were any blog packages that would support formatting & rendering of programming languages as code. Something on the lines of these examples:

    https://hassantariqblog.wordpress.com/2017/02/20/asp-net-core-step-by-step-guide-to-access-appsettings-json-in-web-project-and-class-library/

    https://blog.elmah.io/appsettings-in-aspnetcore/

    https://andrewlock.net/sharing-appsettings-json-configuration-files-between-projects-in-asp-net-core/

    Thanks in advance. Noel

  • Nigel Wilson 945 posts 2077 karma points
    Jul 29, 2018 @ 20:16
    Nigel Wilson
    0

    Hi Noel

    I can't provide a definite answer to your question, but if the blog uses the grid content data type, then it shouldn't prove too difficult to adjust to your needs.

    The grid provides the built-in ability to apply a css class to a row or a column within the row. the simplest option would be to utilise the built in css class option on a row or column within the row.

    So you could then alter the styling or apply a jquery plugin, etc to render the output as desired.

    Hope this helps.

    Nigel

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Jul 30, 2018 @ 07:39
    Marc Goodson
    103

    Hi Noel

    Have a look at prism.js

    https://prismjs.com/

    This will provide syntax highlighting on the front end of your website, and you'll just need to follow the particular markup when you write your posts in Umbraco:

    <pre><code class="language-css">p { color: red }</code></pre>
    

    I tend to do this by hand on my blog, but sure it would be possible to implement something via a Macro where you picked the language and pasted the code example.

    Or there appears to be a TinyMCE plugin that works with Prism...

    https://www.tiny.cloud/docs/plugins/codesample/

    (but I never tried setting it up via /config/tinymce.config)

    regards

    Marc

  • Noel Fernandes 16 posts 80 karma points
    Aug 15, 2018 @ 06:47
    Noel Fernandes
    0

    Hi Marc,

    Thank you very much for your response.

    I have had a look at prismjs and found it very easy to integrate into a sample view. As you mentioned, I can always handle the markup manually.

    Once again....Thanks for your recommendation.

    Regards Noel

Please Sign in or register to post replies

Write your reply to:

Draft