[Resolved] Highlight Code?

Home Forums Support [Resolved] Highlight Code?

Home Forums Support Highlight Code?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #273389
    Paul Fowler

    Hi All,

    I wonder if anyone can help, I’m using the latest GP Premium on macOS, and am starting my first blog, I’m trying a couple of test posts using Markdown.

    The problem I have is that if I add a Terminal command in the post using the Markdown code tags ‘ ‘ it shows up fine in Ulysses, but when posted I get it command blank like so:
    Plain Code Links

    When I change the Theme to a standard WordPress one, I get the output I’m looking for with the code highlighted:
    Code Highlighted

    Does anyone know if this is something I can achieve with GP Premium?

    I’ve looked through the vast settings, but nothing seems to jump out me at what I would need to change?

    Cheers,

    Paul.

    #273454
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Any chance you can link me to that page? It should just be a case of styling the HTML element wrapping around the code.

    Either:

    code {
        background: #DDD;
        padding: 2px;
    }

    Or:

    pre {
        background: #DDD;
        padding: 2px;
    }
    #273846
    Paul Fowler

    Hi Tom,

    The link is: macgeekpaul.com

    When I type the test post in Markdown, I am using the ‘code’ tags, is Ulysses it looks like this before publishing:

    Ulysses allows me to publish straight to WordPress without any editing beforehand, it does all the converting between Markdown & HTML which is a huge preference for me.

    Some of the themes I’ve tried automatically highlight the ‘example code’ but I prefer to use GP Premium, I’ve found a plug-in that will highlight the code with GP Premium, but I have to manually change the code tags from using < > to using [ ] which defeats my objective of automatically posting from Ulysses.

    The code you have highlighted above, is that something I will need to change every time I post, or is it a permanent edit?

    Sorry if this is really basic questions, I’m a complete newbie and this and just stumbling my through at the moment. πŸ™‚

    Paul.

    #273908
    Tom
    Lead Developer
    Lead Developer

    That site doesn’t seem to be using GP?

    The code I provided above is a one time edit – you just need to add it to your CSS.

    #273953
    Paul Fowler

    Yeah sorry Tom, by the time I had given you the link, I had since been testing different themes.

    But I have entered the code in the GP theme CSS section and it works like a charm, thank you so much for sorting the out for me, much appreciated. πŸ‘

    Paul.

    #273962
    Tom
    Lead Developer
    Lead Developer

    Glad I could help πŸ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.