Site logo

Archived topic

Highlight Code?

5 replies · Started by Paul Fowler on February 2, 2017

Viewing posts 1–6 of 6

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.

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;
}

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.

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.

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.

Glad I could help :)

This archived topic is closed to new replies.