Coder Social home page Coder Social logo

Comments (5)

maxchendt avatar maxchendt commented on July 17, 2024

打扰了,搞定了, iissnan/hexo-theme-next#1112

from hugo-theme-next.

xtfly avatar xtfly commented on July 17, 2024

@maxchendt 多谢您的关注。在您提供解决办法基础之上,我也在侧边的TOC列表上自动加上序列了。

https://github.com/xtfly/hugo-theme-next/blob/master/static/js/toc.js

 function toc(parent, prefex) {
    parent.children("ul").each(function () {
      $ul = $(this);
      $ul.children("li").each(function () {
        $li = $(this);
        listStr = prefex
        if ($li.children("a").length > 0) {
          if (listStr != "") { listStr += "."}
          listStr += ($li.index() + 1);
          $li.html(listStr + " " + $li.html());
          toc($li, listStr)
        } else {
          toc($li, listStr)
        }
      });
    });
  }

var $t = $("#TableOfContents");
toc($t, "");

from hugo-theme-next.

maxchendt avatar maxchendt commented on July 17, 2024

再打扰下, iissnan/hexo-theme-next#680 (comment) 里面让部分段落不缩进,有什么想法否?

from hugo-theme-next.

maxchendt avatar maxchendt commented on July 17, 2024

搞定!特定段落不缩进,在该段落进行标记

<script type="text/javascript">
$('p:contains("ooNoIndent00")').each(function() {
    var text = $(this).html();
    $(this).css('text-indent', '0em');
    $(this).html(text.replace('ooNoIndent00', '')); 

});
</script>

from hugo-theme-next.

github-young avatar github-young commented on July 17, 2024

awsl,发现我的标题都被双重标号了,原来是这个issue...应该有个选项可以选择是否自动标号。我现在的做法就是把theme/next/static/js/toc.js删了

from hugo-theme-next.

Related Issues (16)

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.