Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deeplink GitHub #629

Closed
wants to merge 2 commits into from
Closed

Deeplink GitHub #629

wants to merge 2 commits into from

Conversation

D4ryus
Copy link

@D4ryus D4ryus commented Dec 1, 2014

adds the possibility to create deeplinks to stackedit to "pull" a file from github, also attaches a publisher to that file.
see commit messages for more info.

d4ryus added 2 commits December 1, 2014 12:09
adds 2 function to enable reading files from github Repositorys.
adds the opportunity to start stackedit with a injected publisher
(+downloader) so that it starts and loads a given file. This is enabled
by appending json formated text to the link. here is a example:

http:https://stackedit.io/editor#{"type":"github","publishAttributes":{"username": ... }}

example json string after the #:
{
        "type"              : "github",
        "publishAttributes" :
        {
                "username"   : "pete",
                "title"      : "myAwesomeMarkdownFile.md",
                "repository" : "myDocs",
                "branch"     : "master",
                "format"     : "markdown",
                "path"       : "path/to/my/text.md"
        }
}

"type" is the given provider type u want to access, someone could add
other providers if they like. if type "github" is given a fileDesc with
the given "publishAttributes" will be created and the file content will
be directly downloaded from github.
if the user has no github token (not logged in) he will be redirected to
the github auth page on editor start, and the download will proceed
after login.

if a file with the same title is already present inside stackedit, it's
content will be replaced with the content of the github file,
publishAttributes will also be overwritten (repo, branch, path, etc). so
be shure to not open a file where u have unpublished changes, because
these will be lost.

if a file which does not exists is given, an empty file will be opened, which
can be published to the given location.

- username   : github repository username (can differ from your username)
- title      : the file Title
- repository : github repository
- branch     : github branch
- format     : file format
- path       : github file path
- imgPath    : folder for image uploads (optional, see pull request benweet#620)
- imgBranch  : branch for image uploads (optional, see pull request benweet#620)
@getaaron
Copy link

👍

@RoyiAvital
Copy link

Hi,
Does this allows full integration with GitHub?
Namely editing MD file in repository within GitHub and pushing the changes as commits?

Thank You.

@D4ryus
Copy link
Author

D4ryus commented Nov 30, 2015 via email

@RoyiAvital
Copy link

I see.
Anyhow, I hope it will be integrated into the Online Version of StackEdit.
Once it is, hopefully people will make it Fully Integrated with GitHub.

@benweet benweet closed this Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants