• Stars
    star
    682
  • Rank 66,258 (Top 2 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Github markdown previewing straight from your shell.

:octocat: octodown

GemVersion Build Status

Ever wanted to easily preview what your markdown would look like exactly on Github? Ever wanted to do that from inside of a Terminal?

Octodown uses the same parsers and CSS that Github uses for their markdown rendering. Github markdown styling looks beautiful, so it is Octodown's primary goal to reproduce it as faithfully as possible.

Octodown GIF


Features

  • 🆕 Edit your markdown like a boss with LiveReload.

    • octodown README.md
  • Uses the same markdown parsers and CSS as Github for true duplication.

    • Yes emojis are included. 😈
  • Fast. octodown uses native parsers to ensure performance.

  • Multiple CSS styles.

    • octodown --style atom README.md
    • The github markdown (default)
    • The atom text editor markdown
  • Properly parses STDIN.

    • cat README.md | octodown --stdin

Installation

Requirements: Ruby >= 2.0

  1. Install icu4c and cmake:
  • Mac: brew install icu4c cmake pkg-config
  • Apt: sudo apt-get install -y libicu-dev cmake pkg-config ruby-dev
  1. Install octodown:
  • If you have a non-system Ruby (highly recommended): gem install octodown
  • Else: sudo gem install octodown

Usage in VIM (optional):

  • Use asyncrun.vim:

    " Plug 'skywind3000/asyncrun.vim' in your vimrc or init.nvim
    
    :AsyncRun octodown %
    
    " or, run whenever a mardown document is opened
    
    autocmd FileType markdown :AsyncRun octodown %
  • Use Dispatch and add this to your ~/.vimrc:

    " Use octodown as default build command for Markdown files
    autocmd FileType markdown let b:dispatch = 'octodown %'
  • Caveat: make sure you follow the directions on the Dispatch README.md and make sure that the correct version of Ruby (the one which as Octodown install as a Gem), is used.

Usage

  1. Keeping it simple (choose your files from a menu):
  • octodown
  1. Markdown preview styling:
  • octodown --style atom README.md
  1. Unix lovers:
  • echo '# Hello world!' | octodown --raw --stdin > index.html

Notes

  1. With --stdin, octodown will read STDIN until EOF is reached.
  • In order to work with this mode, type what you want into the input, then press Ctrl-D when finished.

Contributing

  1. Fork it ( https://github.com/ianks/octodown/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Run the test suite (bundle exec rake)
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

More Repositories

1

mini_phone

A fast phone number parser, validator and formatter for Ruby. This gem binds to Google's C++ libphonenumber for spec-compliance and performance.
C++
148
star
2

vim-tsx

Vim Script
83
star
3

attr-gather

Hit a million different APIs and combine the results in one simple hash (without pulling your hair out). A simple workflow system to gather aggregate attributes for something.
Ruby
39
star
4

yagni_json_encoder

~2x Faster JSON encoding for Rails
Ruby
23
star
5

dry-graphql

Integrate dry-types/dry-struct with graphql-ruby
Ruby
17
star
6

fast_woothee

Ruby
10
star
7

yabeda-gc

Ruby
9
star
8

simplest-typescript-webpack-boilerplate

JavaScript
9
star
9

syshare

Ruby
3
star
10

dotfiles-old

Vim Script
3
star
11

fuse-encrypted-filesystem

An encrypted filesystem using FUSE.
C
3
star
12

dry-schema-extensions

Extensions for dry-schema
Ruby
3
star
13

BufferOverflow_Lab

Buffer overflow exploitation on the C stack.
Assembly
2
star
14

2022-09-09-ruby-on-rust-intro

Makefile
2
star
15

yars

A server for your (Rack) apps.
Ruby
2
star
16

dotfiles-repo

Where yadm syncs my dotfiles
Shell
2
star
17

concurrent_programming

Java
2
star
18

dotfiles-2018

Vim Script
2
star
19

mmalloc

Circular linked-list memory allocator.
C
2
star
20

moment-transit

JavaScript
2
star
21

tty-logger-raven

Ruby
1
star
22

awqlinator

Isomorphic AWQL query generator
TypeScript
1
star
23

bitcoin-presentation

1
star
24

early_hints_header

An early hints Ruby / Rack middleware which just sets Link headers (i.e. for nginx http2_push_preload)
Ruby
1
star
25

hidden-markov-model

Python
1
star
26

PrimeFactors

Using C++ to find prime factors for: n = p * q. An attempt at cracking very small RSA private keys.
C++
1
star
27

performance_lab

C++
1
star