Giter VIP home page Giter VIP logo

gitbook-plugin-tags's Introduction

gitbook-plugin-tags

npm npm npm

Tags for GitBook

Since GitBook do not support this feature native, currently I create this plugin to create tags if tags: xxx in markdown page or YAML header.

Usage

create tags.md file and put it into SUMMARY.md

Create a file named tags.md at the root dir and put it at the last entry of SUMMARY.md. A valid SUMMARY.md is:

# Summary

* [Introduction](README.md)
* [First Chapter](chapter1.md)
* [Tags](tags.md)

You can keep the file tags.md empty or add header such as

# Tags

add plugin in book.json

{
  "plugins": [
    "tags"
  ],
}

add tags in page

Just drop one line such as

tags: tag1, tag2, tag3 is here

tags are separated by comma.

config placement

Tags will show after the title by default, you can config the placement in the bottom.

    "pluginsConfig": {
        "tags": {
            "placement": "bottom"
        }
    }

Demo website ==> https://yuanbin.gitbooks.io/test/content/

Enjoy!

gitbook-plugin-tags's People

Contributors

billryan avatar pajtai avatar

Stargazers

 avatar  avatar  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

gitbook-plugin-tags's Issues

Bug with H2

This plugin is exactly what I looked for. Thanks a lot for developing this!

I found this bug: My article start with a h2 because the title of the article is already a h1. The plugin changes my h2 to a h1 and puts a # in front of it.

document_ist_nicht_tag_auf_oberster_ebene_ _barrierefreies_pdf

It doesn't work

I follow the instructions but it doesn't work. How to add dependency into a file? Thanks.

option for placement

Hi,

This plugin is really neat!
One request: could you please implement an option for putting the tags at the bottom of the page? Currently it's placed before the first paragraph, it would be great if we could place it after the last paragraph.

Thanks a lot!

Cheers,
Imre

asciidoc support

Hi,

Does the current version supports AsciiDoc syntax, or only Markdown?
If it does not, could you please implement AsciiDoc support?

Thanks,
Imre

lacking github-slugid causing gitbook build failure

book.json
{
"title": "juniway",
"author": "",
"description": "
",
"extension": null,
"generator": "website",
"isbn": "",
"links": {
"sharing": {
"all": null
},
},
"output": null,
"styles": {
"website": "styles/website.css"
},
"plugins": ["disqus","codeblock-filename", "multipart", "tags"],
"pluginsConfig": {
"disqus": {
"shortName": "juniway"
}
},
"variables": {}
}

目前为了编译通过,我已经把 tags 插件去掉。

本地已经执行下列命令安装 tags 相关 plugin 和依赖
npm install gitbook-plugin-tags --save-dev
gitbook install
npm install github-slugid -g

并且本地gitbook 编译成功, gitbook server 成功

源码 push 到远程 gitbook repo 之后, gitbook 如邮件截图所示编译失败。

请帮忙解决,十分感谢。

Incorrect links generated in tags.html

Hi, thank you for your work.

I followed the README to use this plugin, However, I found the generated links in tags.html don't work. So I checked the console and found the href are end with .md rather than .html.

here's the screenshot
image

Am I missing something or misused it?

No book.json file

The recent Gitbook doesn't have any file with the name book.json is this plugin still valid?
And please how can I ,configure it now?

Tags.md not always processed last

I found that linking to tags.md will make it not be processed last. This made tags.html content incomplete after a gitbook build.

# Table of Contents

* [item1](/tags.md#item1)
* [item2](/item2.md)
* [tags](tags.md)

In the above example, any tags in item2 will not show after a gitbook build.

There is a workaround, but I thought I'd post it here, since it took me a while to track down.

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.