Giter Site home page Giter Site logo

[FEATURE] Admonition for Code about doit HOT 5 CLOSED

unklnik avatar unklnik commented on June 14, 2024
[FEATURE] Admonition for Code

from doit.

Comments (5)

HEIGE-PCloud avatar HEIGE-PCloud commented on June 14, 2024

I don't quite understand your question, this is the source code for your screenshot. Can you show me an example where ``` method does not work?

```markdown
{{</* admonition type=tip title="This is a tip" open=false */>}}
A **tip** banner
{{</* /admonition */>}}
Or
{{</* admonition tip "This is a tip" false */>}}
A **tip** banner
{{</* /admonition */>}}
```

from doit.

unklnik avatar unklnik commented on June 14, 2024

Apologies, haven't used this theme before and I am probably doing something wrong however if you view this page https://unklnik.com/posts/2d-vector2-border-collisions/

You will see that when I copy and paste that code exactly as you typed above into the markdown file I get what you see in the image , which looks completely wrong. Black background, no header or copy icon. I have added this in the TOML file so not really sure what is going on. I have not altered or added any custom CSS it is default Hugo Extended & DoIt install.

  [params.page.code]
  # whether to show the copy button of the code block
  copy = true
  # the maximum number of lines of displayed code by default
  maxShownLines = 10

THIS IS WHAT DISPLAYS USING THE CODE YOU SUPPLIED?
image

from doit.

HEIGE-PCloud avatar HEIGE-PCloud commented on June 14, 2024

Remove pygmentsUseClassic=true in your config file.

from doit.

unklnik avatar unklnik commented on June 14, 2024

Config file? It is not in hugo.toml so where should I look?

from doit.

unklnik avatar unklnik commented on June 14, 2024

OK, so this was my mistake a newbie. So, basically I had copied the code below:

[markup]
  [markup.highlight]
    anchorLineNos = false
    codeFences = true
    guessSyntax = false
    hl_Lines = ''
    hl_inline = false
    lineAnchors = ''
    lineNoStart = 1
    lineNos = false
    lineNumbersInTable = true
    noClasses = true
    noHl = false
    style = 'monokai'
    tabWidth = 4

over the code below:

# Markup related configuration in Hugo
[markup]
  # Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting)
  [markup.highlight]
    # false is a necessary configuration (https://github.com/dillonzq/LoveIt/issues/158)
    noClasses = false

Once I had replaced the Basic Configuration code it suddenly works. Thanks

from doit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.