Comments (12)
👍 Definitely something I want to add, along with #6. Those will probably go together.
from wordpress-github-sync.
Awesome 👍
from wordpress-github-sync.
How would you mark that the file is a draft on the git side? In the Jekyll world, there are two options:
- a
_drafts
folder, treated just like the_posts
folder, which I'm not a big fan of because publishing means you often lose history. published: false
in the YAML front matter (which I think has greater applicability outside of Jekyll).
from wordpress-github-sync.
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.
As a Jekyll user
FWIW, the published: false
pattern works with Jekyll as well.
from wordpress-github-sync.
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.
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.
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.
No, git will track the rename.
from wordpress-github-sync.
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.
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.
Closing, as this is implemented. If people start using this and have issues, we can revisit this.
from wordpress-github-sync.
Related Issues (20)
- Post editing not possible anymore HOT 5
- Document `wpghs_whitelisted_post_types` HOT 6
- Any way to restore content back to Wordpress? HOT 6
- Import from github doesn't update but creates a new page HOT 5
- php error: allowed memory size exhausted HOT 6
- Unable to backup Private Posts? HOT 4
- Permalink url has strange tag HOT 3
- Can't be used in WordPress 4.9.6 HOT 9
- Private Repo? HOT 3
- Can not enable this plugin.
- Auto deletes images
- Class not found? HOT 1
- Export only posts from selected category or sub-categories HOT 1
- Which page on WiKi exactly? HOT 1
- More info
- Semantic linebreaks not working while converting markdown to html HOT 1
- "master" becoming "main" in GitHub causes Not Found error in Github-Sync HOT 3
- No sync
- Documentation on configurations for private repos in organizations (no enterprise) HOT 1
- Export to GitHub not working HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-github-sync.