you might be looking for The Dev Center
devcenter is a command line tool that makes it possible to easily pull and edit a Heroku Dev Center article locally and then push that article to the Dev Center
once the article has been downloaded (or written from scratch) you can import subfiles
until we have a better way
$ gem source -a http://anything:[email protected]
$ gem install devcenter
compile an article to STDOUT from a top file and imported subfiles
$ devcenter compile article.txt
compile an article and send and it to the devcenter
$ devcenter push article.txt --article.title='My Title'
$ DEVCENTER_URL=http://localhost:3000 devcenter push article.txt
use the open flag to open the article in your browser
$ devcenter push article.txt --open
write an article to STDOUT from the devcenter
$ devcenter pull article.txt --article.title='My Title'
push and pull will prompt for your devcenter login
- google apps auth not supported yet
push and pull will also write the article metadata to article.yml and use that info for subsequent requests
command line arguments --article.attribute will override and replace what is in article.yml
compile uses the !import
call to import other files
push compiles the article on the fly
Given 'filename' is a file that contains "hello, world"
a file with
!import(filename)
becomes
hello, world
a file with
!import(filename.rb)
becomes
:::ruby
hello, world
and a file with
!import(filename, syntax)
becomes
:::syntax
hello, world
- file locations are relative
- indentation is preserved
- syntax highlighting is detected by filename
- better authentication
- have devcenter be a real API