Giter Club home page Giter Club logo

gitbook-plugin-etoc's People

Contributors

aldanor avatar billryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aldanor

gitbook-plugin-etoc's Issues

[Bug] Content is placed inside table of contents

Hey, I I've recently discovered unexpected behavior of your plugin.

Expected behavior:
No toc is shown, and the content is not inside the toc.

Actual behavior:
line

Workaround
There seems to be a problem with the headings behavior. Using a single level 3 title or setting mindepth to 2 fixes the problem. So I think there is something wrong with the headline detection. It will insert a empty toc that get filled with the actual site content.

Setup:
Node Docker Image 7.7.3
Gitbook 3.2.2
etoc 1.1.9

Custom css for dark theme:

.book.color-theme-2 #toc, .book.color-theme-2.toc {
  background-color: rgba(255,255,255,.15);
}

Plugin is only activated - no configuration is used

Used markdown file:
test.md.txt
(Renamed it because Github doesn't accept markdown files as an attachment)

Fix TOC on the right side

The purpose of TOC is to help readers navigate different sections conveniently, TOC is in the top of page currently, which is not friendly for readers. But fix TOC on the right may break the original page layout, any ideas?

make numbering optional

In some cases I would prefer a toc without numbering, because it may confuse readers when these numbers are not reflected in the actual headers throughout the text.

Nils

it does not work.

it does not work.
my md is like :

# mock测试指南
*by 李@测试部*
- - - - -
<!-- toc -->

#aaaaaaaaaaaaaaaaaaaaa1
对于分层系统来说,为了测试充分,需要针对每一层进行测试

maxdepth

it looks like the latest version doesn't take into account the maxdepth setting anymore. For example, if I set it to 3, it still shows h4 headers.

add toc automatically if the markdown has so many ## header2

it is a NICE feature that TOCs are generated automatically when the depth of headers is a greater than 3 by default.

while this markdown, has no level-3 headers, but so many level-2 headers that readers always 'get lost' in some section.

i guess depending on the amount of level-2 headers will also be an additional nice feature. setting mindepth=2 can meet this case, but Zero Configuration will be much more greater ?

Cannot read property 'name'

When l build the gitbook I have :

TypeError: Cannot read property 'name' of undefined (In file 'file.md')

My book.json config :

{ 
	"gitbook": "2.x.x",
	"language": "en",
	"title": "My Title",
	"author": "My Name",
	"plugins": ["heading-anchors", "etoc"],
	"pluginsConfig": {
		"etoc": {
		"h2lb": 3,
		"mindepth": 3,
		"maxdepth": 4,
		"notoc": false
		}
	},
	"structure": { 
		"readme": "readme.md",
		"summary": "summary.md"
	}
}

Thanks

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.