-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Integrated CMS #24
Comments
Will this require a standard login function to be shipped with all CMS sites? |
The high level concept I have is that if you're editing a site on a local URL, no login should be required and it would write to the local JSON files of your project. That way you can choose whether to commit and deploy content updates or discard them for testing. For deployed sites, the build would look to your site-wide I also want to add config options to build sites without the CMS for people who just want a static website that has to be edited locally to make changes. Does that make sense @sanderjson? Curious to hear your thoughts. Thanks! |
Local in-page editing with a binding to the JSON sounds fine. This type of editor would likely be equally effective just creating markdown files for the content, but I understand the end goal of on page editing. And it does make sense to just tie this to JSON files instead of markdown. However most content editors would likely need a very simple approach - and live on-page editing sounds great. My question as about the site visitors UX experience... So an editor would visit their own site and either click an At this point the user is logged in and has access to edit all text inside some svelte component. Based on a config file we could allow/disallow certain editable blocks based on user permissions. For example perhaps a basic editor could change content in p tags within article on certain pages, but superuser could edit more -> like foots and header copy. If I were to use live inpage editing I would want access to basic rich tect actions -> perhaps a floating toolbar. I would also like to save drafts. Would the JSON hold the content as an HTML string? If not how would an editor embed bold, and italics, and links within a paragrpah block? Also are there any security conerns with letting users enter content that is essentially stored as a string that will be passed to the svelte compiler as @html? |
You're exactly right, the content editor would hit a route like Regarding drafts, I'd like to eventually create something like NetlifyCMS's editorial workflow where it creates a PR instead of committing directly to a build branch: https://www.netlifycms.org/docs/configuration-options/#publish-mode. This too would likely be part of a later phase after the fundamentals are worked out a bit more though. Even the WYSIWYG (rich text) editor that you mentioned would probably be a later phase, although I recognize the need. I typically only allow very limited elements (b, em, a) in editors for my own projects to ensure things stay within the design specifications. You do have to be careful if letting users save html that is then rendered with Ultimately I'd like to implement what you're proposing, it aligns with my long-term vision for the project, it just depends on when. I definitely appreciate the brainstorming and welcome any ideas you want to put forth. Thanks for contributing to the conversation! |
Writing to the local filesystem will be tricky, the closest we may get is providing a download of content changes: https://stackoverflow.com/questions/21012580/is-it-possible-to-write-data-to-file-using-only-javascript Or the Filesystem API:
For local dev, we could use Go as a helper to actually write to the filesystem. |
Could possibly learn some lessons from the git-backed cms in https://github.com/primo-app/primo From https://primo.af/faq.html:
|
We should probably use PKCE instead of Implicit Grant. It looks like GitLab supports this: https://docs.gitlab.com/ee/api/oauth2.html#supported-oauth2-flows
|
This will need to be converted into an epic with individual tasks, but for now just jotting down some ideas:
_blueprint.json
file should define the type of widget that is used by the CMSserve
command, something like:--ignore-edits
--cms=false
Down the road:
Action items:
_blueprint.json
, then wrap the field value in a custom component?The text was updated successfully, but these errors were encountered: