Skip to content

TheMR-777/githubify-md

Repository files navigation

GitHubify-MD

.NET C# License

🚀 Modern and elegant Markdown to GitHub-styled HTML converter

GitHubify transforms your Markdown files into beautifully rendered GitHub-styled HTML pages with just a few keystrokes. Built with modern C# 13 and .NET 9, it offers a seamless conversion experience through an intuitive command-line interface.

✨ Features

  • 📄 Convert Markdown files to GitHub-styled HTML with perfect rendering
  • 🌓 Support for both Light and Dark themes
  • 🔌 Flexible CSS delivery via CDN links or embedded directly in the HTML
  • ⚙️ Configurable through command-line options or JSON config file
  • 🖥️ Beautiful interactive CLI interface built with Spectre.Console
  • ⚡ AOT (Ahead-of-Time) compilation support for lightning-fast startup
  • 📦 Self-contained, single executable deployment option

🚀 Installation

Via .NET CLI

dotnet tool install --global GitHubify

Manual Installation

  1. Download the latest release from the Releases page (available soon...)
  2. Extract the archive to a location of your choice
  3. Add the directory to your PATH (optional)

🔧 Usage

Basic Usage

Convert a Markdown file with default settings (Light theme, CDN CSS):

githubify --input README.md

This will generate README.html in the same directory.

Interactive Mode

Run GitHubify without arguments for an interactive experience:

githubify

The tool will guide you through selecting:

  • Input file path
  • Theme preference
  • CSS delivery method
  • Output file location

Command-line Options

# Specify both input and output files
githubify --input README.md --output docs/index.html

# Use dark theme
githubify --input README.md --theme Dark

# Embed CSS for offline viewing
githubify --input README.md --css-mode Embed

# Non-interactive mode with default settings
githubify --input README.md --yes

Full Options Reference

Option Alias Description
--input -i Path to the input Markdown (.md) file
--output -o Path for the output HTML file (defaults to <input_name>.html)
--theme Specify the color theme (Light or Dark)
--css-mode CSS delivery method (CDN or Embed)
--yes Skip interactive prompts and use defaults
--help -h Display help information

⚙️ Configuration

GitHubify can use a config.json file in the current directory for default settings:

{
  "input_file": "path/to/default.md",
  "theme": "Dark",
  "css_mode": "Embed",
  "output_file": "path/to/output.html"
}

Command-line options will override settings from the config file.

📋 Examples

Generate an offline-viewable HTML with dark theme

githubify --input documentation.md --theme Dark --css-mode Embed

Batch convert multiple files (using shell features)

# Bash example
for file in docs/*.md; do
  githubify --input "$file" --theme Light --yes
done
# PowerShell example
Get-ChildItem -Path docs -Filter *.md | ForEach-Object {
  githubify --input $_.FullName --theme Light --yes
}

🔍 How It Works

  1. GitHubify reads your Markdown file
  2. Sends the content to GitHub's Markdown API for rendering
  3. Applies the GitHub CSS styling (via CDN or embedded)
  4. Generates a standalone HTML file with responsive layout
  5. The resulting HTML looks exactly like GitHub's rendered Markdown

🛠️ Building from Source

Prerequisites:

  • .NET 9 SDK
git clone https://github.com/yourusername/githubify.git
cd githubify
dotnet build
dotnet run

AOT Compilation

GitHubify supports AOT compilation for improved startup performance:

dotnet publish -c Release -r win-x64 --self-contained -p:PublishAot=true

🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments


Made with ❤️ by TheMR-777 :)

About

Simple yet Sophisticated Markdown to GitHub styled HTML converter

Resources

License

Stars

Watchers

Forks

Packages

No packages published