Skip to content

Commit

Permalink
Merge pull request #1 from mziyut/rename-package-from-gitbook-plugin-…
Browse files Browse the repository at this point in the history
…prism-to-honkit-plugin-prism

Rename package from gitbook-plugin-prism to honkit-plugin-prism
  • Loading branch information
mziyut authored Nov 6, 2022
2 parents 34f434c + 3452d7d commit f834cdc
Show file tree
Hide file tree
Showing 5 changed files with 1,578 additions and 13 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog
All notable changes to this project will be documented in this file.

## [Unreleased]

### Added

### Changed
- Rename package from gitbook-plugin-prism to honkit-plugin-prism [#1](https://github.com/mziyut/honkit-plugin-prism/pull/1)

### Removed

9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Gitbook Plugin for [Prism](http://prismjs.com/)
==============
# Honkit Plugin for [Prism](http://prismjs.com/)

[![NPM](http://img.shields.io/npm/v/gitbook-plugin-prism.svg?style=flat-square&label=npm)](https://www.npmjs.com/package/gitbook-plugin-prism)
[![NPM](http://img.shields.io/npm/v/honkit-plugin-prism.svg?style=flat-square&label=npm)](https://www.npmjs.com/package/honkit-plugin-prism)

This repository was forked from [gaearon/gitbook-plugin-prism](https://github.com/gaearon/gitbook-plugin-prism) for the reason that the latest version of Honkit is not supported. [issue](https://github.com/gaearon/gitbook-plugin-prism/issues/42)

##### Before
<img src='http://i.imgur.com/cbk6O52.png'>
Expand All @@ -11,7 +12,7 @@ Gitbook Plugin for [Prism](http://prismjs.com/)

## Usage

Add the plugin to your `book.json`, and disable default GitBook code highlighting:
Add the plugin to your `book.json`, and disable default Honkit code highlighting:

```json
{
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module.exports = {
book: getAssets,
ebook: function() {

// Adding prism-ebook.css to the CSS collection forces Gitbook
// Adding prism-ebook.css to the CSS collection forces Honkit
// reference to it in the html markup that is converted into a PDF.
var assets = getAssets.call(this);
assets.css.push('prism-ebook.css');
Expand Down Expand Up @@ -129,7 +129,7 @@ module.exports = {
},
hooks: {

// Manually copy prism-ebook.css into the temporary directory that Gitbook uses for inlining
// Manually copy prism-ebook.css into the temporary directory that Honkit uses for inlining
// styles from this plugin. The getAssets() (above) function can't be leveraged because
// ebook-prism.css lives outside the folder referenced by this plugin's config.
//
Expand All @@ -142,7 +142,7 @@ module.exports = {
return;
}

var outputDirectory = path.join(book.output.root(), '/gitbook/gitbook-plugin-prism');
var outputDirectory = path.join(book.output.root(), '/gitbook/honkit-plugin-prism');
var outputFile = path.resolve(outputDirectory, 'prism-ebook.css');
var inputFile = path.resolve(__dirname, './prism-ebook.css');
mkdirp.sync(outputDirectory);
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gitbook-plugin-prism",
"description": "Prism highlighting for gitbook",
"name": "honkit-plugin-prism",
"description": "Prism highlighting for honkit",
"main": "index.js",
"version": "2.4.0",
"scripts": {
Expand All @@ -10,14 +10,14 @@
"engines": {
"gitbook": ">=2.4.1 <4.0.0"
},
"homepage": "https://github.com/gaearon/gitbook-plugin-prism",
"homepage": "https://github.com/mziyut/honkit-plugin-prism",
"repository": {
"type": "git",
"url": "https://github.com/gaearon/gitbook-plugin-prism.git"
"url": "https://github.com/mziyut/honkit-plugin-prism.git"
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/gaearon/gitbook-plugin-prism/issues"
"url": "https://github.com/mziyut/honkit-plugin-prism/issues"
},
"dependencies": {
"cheerio": "0.22.0",
Expand All @@ -31,7 +31,6 @@
"eslint-plugin-promise": "3.4.0",
"eslint-plugin-react": "6.7.1",
"eslint-plugin-standard": "2.0.1",
"gitbook-tester": "1.4.3",
"tape": "^4.9.1"
}
}
Loading

0 comments on commit f834cdc

Please sign in to comment.