-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Netlify CMS on Bitbucket #234
Comments
Hugo is trying to build the files in the admin folder - obviously this is going to cause problems since those files aren't designed to be fed into a site generator. I doubt there's anything that could be done to fix it in Netlify CMS - you'd need to either make hugo ignore the contents of the admin directory or add it to the site after it's been built. |
Just a status update: As of 2017, BitBucket currently has no public API to modify files or create commits in a repository, although they said they were working on it as of 2014 (it seems to have stalled out). API Reference: https://developer.atlassian.com/bitbucket/api/2/reference/ |
Bitbucket marked the PR as resolved on the 2017-06-12 and presented a new endpoint for commits. Not sure though if it's enough to make it work with Netlify CMS. |
Great news! |
@tech4him1 Bitbucket actually has a public API kind of thing that I am using to modify files or create commits. Also, you can checkout Forestry.io CMS for Hugo and Jekyll that have already been doing this. |
@InderdeepBajwa Do you happen to have a link to docs or an example? |
@netlify team is bitbucket integration coming? how difficult would it be to add it since they appear to have the commit bitbucket api now? |
@zanedev it's not in active development, but we'd love to see it happen! If you're up for taking a crack at it let us know! |
@erquhart actually I have an immediate need for it now so I'd be happy to kick it off. I'll join the planning meeting tomorrow to hash it out |
thanks @tech4him1 will check it out. |
@zanedev that's great news! A good number of folks have been interested in this, so it'll be good to see it get some traction. |
Quick status update below. I will push up the cms code to my branch when it's a bit more solid on the editing experience.
Any thoughts/feedback on this approach? |
We can do that. |
@zanedev looks like this is already in place on Netlify for anyone who uses it. |
@erquhart ok good to know, I'll try to use it instead of the custom auth after I finish the editor api integration. |
wrong button not done yet :) |
I've put some time into pushing a commit and it appears the preferred way is through a form post multipart data. This isn't ideal as github blobs, for obvious reasons but most importantly there might be some limitations like chunking up the post size for large files. Also I am not sure if it supports the base64 encoding yet. If anybody has a better idea for commits/pushing to the bitbucket api let me know... So far I've spent some time crafting my multipart form but no dice with the api. I'll keep trying and report back. |
Hmm...looks like that's our only option. Guess we'll find out how well it works! |
Would it be worth uploading each media file as a separate commit, so that we wouldn't have a giant request if someone had lots of media files in a single post? Each media file would be uploaded/committed first, then, if they all were successful, the main file could be committed. The only inconsistent state you would risk would be having extra media files uploaded, which in most situations should not affect anything. |
@tech4him1 good suggestion I believe that's how it works now but will double check.. |
Update:
So at this point I am going to post for some help in the bitbucket forums on these issues. I'm also going to keep trying to push image files there has to be a way. I'll clean up my branch and push it soon up in case anybody else wants to take a stab at it. |
Thanks for killing it on this @zanedev! Let's see what the Bitbucket community comes back with. |
Ok bitbucket question posted here hopefully someone helps it feels like a dead end in their forums. I'll keep hacking on it and post my branch soon regardless. Determined to get to the final goal (eventually).. |
@zanedev thanks so much! It's great to have some movement on this issue. |
@zanedev Thanks for looking into bitbucket integration! Very much appreciated. I will check out your repo and take it for a spin :) |
@zanedev Just tested out a few different things - seems to work pretty well. I might have resolved the image problem. First time opening the netlify cms code so i'm not sure if there's smarter ways of doing it. Just sent a pull request :) |
@taussoe that's great news thanks for doing that I'll try it out later tonight! |
@taussoe thanks again that was the trick! I merged it into my branch and I'll continue on to the next road bump now that we are over that one. |
@zanedev Yay! Glad i could help :) |
Okay we are in good shape! I'm doing some cleanup and writing some tests and it should be good enough to use without workflow. I'll push it up and do a PR when it's ready soon. I'll also take a look at the PRs for gitlab integration and github unit tests to make sure I'm not missing anything. |
I removed all editorial workflow support for now and all simple paths are working except delete file. I can't find anywhere in the api documentation for deleting a file, the src endpoint only accepts get and post. Maybe someone can help me find how to delete? I put a comment here hoping to get an answer soon. |
Ah thanks to @tech4him I now see the API docs say to send empty file will try that out thanks. From the API docs: |
@zanedev Wow, I couldn't even find that in the docs, it was just a guess! Glad it worked. |
@tech4him1 yeah the joys of rest api's they all seem to do whatever they feel like :) Okay delete is now working, writing some tests and will do my PR soon. |
Hey, any chance for an update and possible target date for Bitbucket support? |
cc/ @Benaiah |
Hey, just wanted to leave an update here for anyone following this issue - this is being actively worked on, in concert with the GitLab backend. Expect to see more updates on both of these PRs as that work progresses - notably, I'll be wrapping up a large design document describing plans and options for the new API shortly. |
For my platform shortlisting process, Netlify CMS is just behind forestry.io at the moment because of the GitHub only support. I would be so delighted if the GitLab and BitBucket support was implemented soon. I have to say that the workflow management features in Netlify CMS has me gunning for the other VCS support. It's really beautiful. |
Any update on this one? |
Very very very soon. Like this week soon. |
I will never ever ever ever ever promise a date again. Here's the PR to track: #1504 |
While trying to use Netlify CMS on a website that uses Bitbucket to host it's coding, I received the following error while deploying. Chris suggested me to open an issue in this repo that will even help to develop this CMS. So, here's the first issue I faced while deploying the CMS:
CMD - Hugo Server
Started building sites ...
ERROR: 2017/02/10 14:52:37 shortcode.go:288: Unable to locate template for shortcode 's' in page extending
ERROR: 2017/02/10 14:52:37 shortcode.go:288: Unable to locate template for shortcode 's' in page index
Which is basically same as on Netlify's Deployment logs but with more specified error.
2:36:24 PM: ERROR: 2017/02/10 09:06:24 shortcode.go:288: Unable to locate template for shortcode 's' in page extending
2:36:24 PM: ERROR: 2017/02/10 09:06:24 shortcode.go:288: Unable to locate template for shortcode 's' in page index
2:36:24 PM: ERROR: 2017/02/10 09:06:24 general.go:212: Error while rendering page admin/example/index.html: html/template:__admin/example/index.html: ends in a non-text context: {stateJSRegexp delimNone urlPartNone jsCtxRegexp attrNone elementScript }
What can be done for this error?
Just as prior information, I installed Netlify CMS yesterday but the timestamp on local files is 2017/02/10. Moreover, deleting the /admin folder does removes this error.
The text was updated successfully, but these errors were encountered: