Skip to content

Feature request: Import/export file in GitHub repository #218

Open
@max-mapper

Description

@max-mapper

Hi, I'm a fan of hackmd. I was wondering what you think of the idea of import/export to a file in a GitHub repository. I store all my markdown files on GitHub and would love a seamless way to edit them in HackMD but make sure they are saved back into the repository afterwards.

A user story would be something like:

  • When a user clicks the Menu button, they should see a GitHub under both Import and Export.
  • When clicking on Import, they should get a file selector that lets them choose the repository and file they want to import into the current editor
  • If importing a file into an existing document, it would warn them before overwriting anything
  • If they have never authenticated a github account before they should be asked to do the OAuth login with GitHub in a popup window the first time they import or export
  • When clicking on export, they should see the same file selector as Import. Note they can also Export without having Importing from GitHub. They should be able to choose a commit message and branch
  • They should be notified when their export has saved to GitHub successfully. If there are conflicts in the GitHub repository they should be ignored and the file they chose to export to should be overwritten with the contents of the hackmd
  • If they export again later, their choice of file from the first export should be cached in the file selector so they don't have to search for the file again

Another idea might be a markdown button like 'Edit on HackMD' that you could put in markdown files on GItHub. When you click the button it would take you to a HackMD that contains the markdown files contents. In this case maybe the HackMD could be 'linked' to that file so you could avoid the need for the 'file selector' UI described above, as the file would be set at the time you create the HackMD and wouldn't need to be changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureWants to add a new featureimport/exportRelated to importing or exporting from or to HackMD in some format

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions