Git Product home page Git Product logo

docgist's Introduction

DocGist

DocGist is a URL proxy tool that converts AsciiDoc documents fetched from Gists (http://gist.github.com), GitHub repositories, Dropbox folders and other sources to HTML. The conversion to HTML is performed in the browser (client-side) using the Asciidoctor.js JavaScript library

Note
DocGist is a hosted alternative to the Asciidoctor.js Live Preview extension for Chrome.

Hosted Demo

See it live at http://gist.asciidoctor.org.

Run Locally

To run DocGist locally, make it available somewhere on localhost. First, check out the code:

git clone [email protected]:asciidoctor/docgist.git
cd docgist

With Ruby, you can then do something like this:

ruby -run -e httpd . -p 9090

With Python, there’s this:

python -m SimpleHTTPServer

If you have Apache httpd running on your machine, you can for example add a symlink along the lines of the following to make it serve DocGist:

sudo ln -s /home/anders/git/docgist /var/www/docgist

The above makes DocGist available at http://localhost/docgist/.

History

The original idea and code for DocGist came from GraphGist. GraphGist is an interactive documentation tool for the Neo4j database and Cypher query language. Both tools were created by Anders Nawroth, an engineer at Neo Technology.

Copyright © 2013-2014 Anders Nawroth and the Asciidoctor Project. Free use of this software is granted under the terms of the Apache License, Version 2.0.

docgist's People

Contributors

mojavelinux avatar nawroth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docgist's Issues

Use HTML5 Appcache

See for example: http://appcachefacts.info/peterlubbers-owc4/index.html

The best part of using Appcache is -- IMHO -- that either all resource files are refreshed or none.
I've noticed a few times when pushing to gh-pages, that for example loading DocGist or GraphGist will end up with a mix of old and new files. Which usually means some things are broken.

The bad part is that the manifest has to be maintained somhow (or generated, I hope).
Also, changes to the resource files won't be picked up (ever!) unless the manifest gets changed (it might just be a change in a comment).

Set attributes that provide runtime environment hints

We've been using the convention of setting implicit attributes that identify the runtime environment to allow other settings, such as imagesdir, to be setup properly.

I recommend setting the following implicit attributes for gist.asciidoctor.org:

  • env=docgist
  • env-docgist
  • platform=opal
  • platform-opal

This might be used to setup the imagesdir as follows:

:imagesdir: images
ifdef::env-docgist[]
:imagesdir: https://github.com/asciidoctor/asciidoctor/raw/master/images
endif::[]

In contrast, when the document is converted on the GitHub servers, the attributes env=github and env-github are set.

Allow organizing maintained docs

We're using DocGist to collaboratively edit a couple of team documents but other than the recently edited list of documents we need to keep track of URIs to those documents. Would be cool if there was a DocGist-native way of doing so.

Link to included document not working.

I am not sure what the safe mode used by gist.asciidoctor.org is.

I am trying to render this document:

The includes are replaced by links, maybe because we the safe mode is set to secure. This is Ok for me.

It would be great to have the links working and pointing to the corresponding page in the gist.asciidoctor.org preview.

For example the first link ../../../../adoc/CreateNewProject.adoc should point to the preview page adoc/CreateNewProject.adoc.

Where are fp- links documents stored?

Pretty amazing tool. I have to say I'm impressed! Real-time collaboration is a big plus that should be highlighted more I think.

Anyway, those interactive documents (with links that start with fp-...) are hosted in firebase, correct?

Where is that data stored? If I don't pay for that storage, what's the catch? Is it an API key shared with all docgist users or a free distributed database service? It's not documented.

I would like to store sensitive documents in my docgist install. Can it be self-hosted?

Thanks,

PROJECT_REQUIRES_IMPORT

Apparently the Firebase project needs to be imported somewhere on Google Cloud otherwise it will be shut down mid-May.

capture d ecran 2018-04-22 a 18 10 48

This error happens when I try to create a new document/copy of GitHub Asciidoc file.

Support interactive checkbox

If an interactive checkbox is checked in the preview, then the item should also be checked in the source. This feature helps with collaborative editing. It's possible to use the AST to find the item in the source that was checked and modify the text.

Edit feature is not working

When clicked the edit button

image

it gives following error

image

then the editor loads but left are is empty while the rendered content is available on the right.

image

Footnote syntax doesn't work according to Asciidoctor documentation?

Hey everyone! Was testing DocGist to render some random documents I had written on an etherpad instance. It looks like that the asciidoctor version of the footnotes syntax doesn't work on DocGist. Here's the data I tested with.

Input text:: https://notes.typo3.org/p/YPlWzvj6IP
Result:: https://gist.asciidoctor.org/?epsp-notes.typo3.org-YPlWzvj6IP#_footnote_2

Asciidoctor documentation:: https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#section-footnotes

Asciidoc documentation:: http://asciidoc.org/userguide.html#X92

Read attributes from the URL

This would be useful for sharing documents with different settings without having to alter the document itself. This would also come in very handy in testing the rendering of for example the AsciiDoc User Guide.

Google will discontinue the goo.gl on March 30, 2019

According to the homepage

Starting March 30, 2018, we will be turning down support for goo.gl URL shortener. From April 13, 2018 only existing users will be able to create short links on the goo.gl console. You will be able to view your analytics data and download your short link information in csv format for up to one year, until March 30, 2019, when we will discontinue goo.gl. Previously created links will continue to redirect to their intended destination. Please see this blog post for more details.

It is necessary to choose another URL shortener.

Enable includes

In theory, includes should be able to work in DocGist. First, set the safe option to 'server'. Then, set the base_dir option to the base URL of the file being rendered. Some content-origin stuff might need to be set to make this work...however docgist is pulling the original content, the include mechanism needs the same access.

Convert problem in Safari

I have received reports of this error and similar when using Safari:

Error
Exception:
asciidoctor: FAILED: : Failed to parse source, undefined is not an object (evaluating 'a.$chr')

I have set up older versions of DocGist, but that doesn't seem to help.
Loading minimal documents usually works, but I haven't been able to track down the actual problem.
The front page of DocGist fails every time (it's a rather complex page).

As I don't have any OSX hardware, it's really hard for me to dig any deeper into this.

NOTE: If window.console doesn't exist when the page is loaded, it's replaced by a fake one that silently does nothing.

@mojavelinux Does the above error message point you in any direction?

Make boolean attributes a toggle button in the Attributes menu

Under the Attributes menu, attribute entries which act as booleans should be represented as a toggle button instead of multiple entries. This may either be a two-state toggle or a three-state toggle. We can use a glyph or icon to represent the state.

Ideally, the menu would stay open after a click, though it wouldn't be a showstopper if the first implementation required the menu to be opened each time.

Upgrade to Asciidoctor.js 1.5.3

Could you please test that everything is working fine with version 1.5.3-preview.2 ? If this is the case I will release a final version.

Thanks 😄

Images support for GitHub File

I try to render the example-manual.adoc page from the maven example repository with gist.asciidoctor.org.

Url of the file:

https://github.com/asciidoctor/asciidoctor-maven-examples/blob/master/asciidoc-to-html-example/src/docs/asciidoc/example-manual.adoc

Links:

In the Images section, the image is broken. It looks like this:

Images section screenshot

The src attribute of the img tag is wrong:

<h2 id="_images"><a class="anchor" href="#_images"></a>Images</h2>
<div class="sectionbody">
<div class="imageblock thumb">
<div class="content">
<img src="images/sunset.jpg" alt="sunset.jpg">
</div>
</div>
</div>
</div>

It should be:

<img src="https://raw.githubusercontent.com/asciidoctor/asciidoctor-maven-examples/master/asciidoc-to-html-example/src/docs/asciidoc/images/sunset.jpg" alt="sunset.jpg">

Absolute image paths on GitHub

I think that an absolute image path in a document rendered from GitHub should refer to the root of the repository. Currently, it doesn't work.

You can see an example here: http://gist.asciidoctor.org/?github-powerman%2Fasciidoc-cheatsheet%2F%2FREADME.adoc (look for the screenshot)

This is definitely an edge case and I'm wondering if it should work. Really, a document shouldn't be relying on absolute paths because then it won't work when used locally (only on a web server). But I'm filing this issue for reference in case people come across the use case and are curious about it...regardless of what we decide to do.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.