Hey, I am currently open to new work opportunities, you can find my resume here
- What is this?
- Features
- Examples
- Requirements
- Installation
- Installing
package using npm
globally - Configuration
- Contributing
- License
Ghore is an open-source, offline command-line interface (CLI) tool specifically designed for developers and writers working with GitHub. Its primary function is to render Markdown files into HTML, closely emulating the GitHub Markdown style. This enables users to preview how their Markdown documents will look on GitHub before committing them to a repository.
- Offline Conversion: Convert Markdown files to HTML offline without the need for an internet connection.
- Watch for Changes: Automatically update the HTML output when changes are made to the input Markdown file.
- GitHub Styling: HTML output mirrors the GitHub Markdown style for consistency.
- Code Block Highlighting: Integrated Starry Night ensures beautiful and syntax-highlighted code blocks.
- Flowchart Support: It also supports live preview of mermaid code blocks (Github's API doesn't process mermaid codeblocks).
Highlights the below code block function using integrated Starry Night
```sh
// Highlight code blocks function
const highlightCode = async (lang, str) => {
if (!starryNight || !toHtml) {
await initializeStarryNight();
}
```
const highlightCode = async (lang, str) => {
if (!starryNight || !toHtml) {
await initializeStarryNight();
}
Below mermaid block will be displayed
```mermaid
gitGraph:
commit "test"
branch newbranch
checkout newbranch
commit id:"1111"
commit tag:"test"
checkout main
commit type: HIGHLIGHT
commit
merge newbranch
commit
branch b2
commit
```
gitGraph:
commit "changes"
branch newbranch
checkout newbranch
commit id:"1111"
commit tag:"test"
checkout main
commit type: HIGHLIGHT
commit
merge newbranch
commit
branch b2
commit
Requires the latest version of nodejs 20.10.0 or above.
# Clone the repository
git clone https://github.com/p-balu/ghore.git
# Navigate to the project directory
cd ghore
# Install dependencies
npm install
#To start the application locally
npm start `your/filepath/README.md`
Install the package globally
npm i ghore -g
If you are already inside the directory where README.md file exists then run
ghore preview
ghore preview /path/toyour/README.md
You can customize the appearance of the HTML output by modifying the included CSS file (styles.css
).
Contributions are welcome! Feel free to open issues, submit pull requests, or provide feedback.
This project is licensed under the MIT License.