GithubHelp home page GithubHelp logo

Comments (12)

mAAdhaTTah avatar mAAdhaTTah commented on June 8, 2024

👍 Definitely something I want to add, along with #6. Those will probably go together.

from wordpress-github-sync.

drallgood avatar drallgood commented on June 8, 2024

Awesome 👍

from wordpress-github-sync.

benbalter avatar benbalter commented on June 8, 2024

How would you mark that the file is a draft on the git side? In the Jekyll world, there are two options:

  1. a _drafts folder, treated just like the _posts folder, which I'm not a big fan of because publishing means you often lose history.
  2. published: false in the YAML front matter (which I think has greater applicability outside of Jekyll).

from wordpress-github-sync.

drallgood avatar drallgood commented on June 8, 2024

As a Jekyll user, I'd say 1) because that's the default, but 2) seems to be easier/better for everyone.
Most people outside of the Jekyll camp might not understand, that they have to move files to publish them

from wordpress-github-sync.

benbalter avatar benbalter commented on June 8, 2024

As a Jekyll user

FWIW, the published: false pattern works with Jekyll as well.

from wordpress-github-sync.

mAAdhaTTah avatar mAAdhaTTah commented on June 8, 2024

My first inclination was 1, but we could actually do both if we wanted. I also want to mention that exporting drafts should be toggle-able in case the user doesn't want their works-in-progress made public.

from wordpress-github-sync.

mAAdhaTTah avatar mAAdhaTTah commented on June 8, 2024

Btw, now that we're using the Git Data API, I think we won't the history if we move the file from _drafts to _posts, so that shouldn't be an issue.

from wordpress-github-sync.

benbalter avatar benbalter commented on June 8, 2024

I think we won't the history if we move the file from _drafts to _posts, so that shouldn't be an issue.

Within Git, yes, but if you look at a file's history by path (e.g., on GitHub) you lose the previous edits, IIRC.

from wordpress-github-sync.

mAAdhaTTah avatar mAAdhaTTah commented on June 8, 2024

No, git will track the rename.

from wordpress-github-sync.

mAAdhaTTah avatar mAAdhaTTah commented on June 8, 2024

This actually might be a GitHub bug; the file doesn't see all of its history on GitHub, but a local git install does.

from wordpress-github-sync.

mAAdhaTTah avatar mAAdhaTTah commented on June 8, 2024

Reopening because it doesn't quite track the rename. Sometimes it does, if the changes are minimal, but there's a bunch of changes in the file here and git isn't tracking the rename. I just want to reask what we think about the _drafts folder vs. just the published:false part.

The other issue is the dates aren't even really going to be consistent for draft post -> published post, so the filename will change daily until the post is published. For longer posts, this may not be an issue, as the file content will match more closely than this short post will, but I do just want to bring it up for discussion, as I'm not entirely sure how people will want to export their drafts.

FWIW, I need to make some customizations based on the way I use my site, but did make me think some changes may need to be made to our current implementation.

from wordpress-github-sync.

mAAdhaTTah avatar mAAdhaTTah commented on June 8, 2024

Closing, as this is implemented. If people start using this and have issues, we can revisit this.

from wordpress-github-sync.

Related Issues (20)

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.