docuapi icon indicating copy to clipboard operation
docuapi copied to clipboard

Syntax highlighted code on the left side

Open lukasmalkmus opened this issue 7 years ago • 4 comments

Is it possible to have highlighted code in the left section of the site? Some way of preventing Hugo from moving it to the "code area" on the right side.

If there is no way already, I might dig into Hugo and this template and submit a PR.

lukasmalkmus avatar Sep 11 '17 12:09 lukasmalkmus

This would be great if anyone has some pointers on how to pull it off.

cwarner818 avatar Feb 17 '18 00:02 cwarner818

Second that, would be great to have the ability to add code blocks into the main content.

metachris avatar Jul 10 '20 09:07 metachris

I agree that it would be useful, and I would welcome a fix -- but it needs to be a config flag that enables it (so we don't break existing sites).

bep avatar Jul 10 '20 17:07 bep

For you can use these styles as a way to force it to be normal:

.content pre, .content blockquote {
  width: initial !important;
  float: none !important;
  clear: none !important;
}

.content > h1, .content > h2, .content > h3, .content > h4, .content > h5, .content > h6, .content > p, .content > table, .content > ul, .content > ol, .content > aside, .content > dl {
  margin-right: initial !important;
}

.dark-box {
  display: none !important;
}

hoshsadiq avatar Mar 07 '22 00:03 hoshsadiq