Skip to content
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

[Question/Request] Custom Page On Admin Panel #180

Open
kjellherzke opened this issue Jul 28, 2024 · 13 comments
Open

[Question/Request] Custom Page On Admin Panel #180

kjellherzke opened this issue Jul 28, 2024 · 13 comments
Labels
enhancement New feature or request

Comments

@kjellherzke
Copy link

kjellherzke commented Jul 28, 2024

Hi! I recently came across sveltia-cms when searching for a better alternative to decap cms and I am very satisfied with this decision.

Nevertheless, one main reason for me to switch was the difficulty of developing an extension, mainly to the cms's ui. More specifically, my objective is to be able to add custom pages to the sveltia-cms's admin dashboard/ui, but I am wondering about which way of implementation.

I could fork this repository and modify the source code directly, but I would like to know if there is any other way of doing so that you would suggest me instead? Furthermore, I would be interested in knowing whether or not you are (natively) supporting custom pages?

For instance, I noticed that static-cms does offer that by default: Demo.

@kjellherzke kjellherzke changed the title [Question/Request] Custom Page [Question/Request] Custom Page on Admin Panel Jul 28, 2024
@kjellherzke kjellherzke changed the title [Question/Request] Custom Page on Admin Panel [Question/Request] Custom Page On Admin Panel Jul 28, 2024
@kyoshino
Copy link
Member

Hey @kjellherzke, thanks for checking out Sveltia CMS! It’s a good idea to have handy custom pages on the CMS. But I think I can work on it soonish, as Static CMS compatibility is planned after the 1.0 release, hopefully early next year.

Technically speaking, I need to figure out how to integrate React with Svelte-based Sveltia CMS, which is also required for custom widgets. Alternatively, I could just add support for pages inside iframes.

Anyway, I’ll put this on my todo list!

@kyoshino kyoshino added the enhancement New feature or request label Jul 29, 2024
@kjellherzke
Copy link
Author

kjellherzke commented Jul 29, 2024

Hey @kyoshino, I do understand that. Nevertheless I am questioning why you wouldn't want to primarily focus on Svelte-based extensions (mainly due to a more uniform code, and as this might be easier to implement), though I looked at this static cms documentation, showcasing the React component extension of static-cms.

This ability to extend the cms would be essential and crucial for my current projects. I would be pleased to see progress on this in the feature and I would like to participate in its development, if you would acknowledge.

Personally, the final idea for me is that the cms shall actually rather be part of an admin dashboard, then all of its content, if you understand me correctly. Although the cms is of course the actual provider of the admin ui, it should be extendible.

Another question (regarding the local development of sveltia-cms, not the deployment/production): Could you provide information on how to contribute/setting up a clone? Because when I clone, install dependencies and run the development build, I receive an error during the "Site configuration is loading" process:

Error: The configuration file could not be retrieved.
    fetchSiteConfig config.js:58
Caused by: TypeError: NetworkError when attempting to fetch resource.
 TypeError: NetworkError when attempting to fetch resource. config.js:168:12
    initSiteConfig config.js:168

I suppose I have to create a config.yml but do not really see where to place it...

Cheers!

@kyoshino
Copy link
Member

kyoshino commented Jul 29, 2024

Integrating Svelte is rather hard, because the code has to be compiled. Compiling Svelte code on the fly is possible, but it’s a heavy process. I’m instead thinking about supporting Preact+HTM as I said somewhere else, which is easier to develop and run without a build process. And for backward compatibility with Netlify/Decap CMS, I need to implement React integration anyway.

I’ll prepare developer docs after 1.0, because Sveltia CMS currently does not accept pull requests and I haven’t implemented the Test backend yet. That said, here’s what I’m doing to develop Sveltia CMS:

  1. Run Sveltia CMS with pnpm dev on localhost:5173.
  2. Run a SvelteKit site project with a Sveltia CMS configuration on localhost:5174.
  3. Open localhost:5173 in your browser.
  4. Work with a local repository.

If you’re using a framework other than SvelteKit, you need to specify the site URL with the VITE_SITE_URL environment variable. You may also need to set up CORS. Here is an example for e11y.

@kyoshino
Copy link
Member

And I forgot to say: at this time, it’s possible to embed Sveltia CMS within your project using a custom mount element instead of embedding a custom page in the CMS.

@kjellherzke
Copy link
Author

kjellherzke commented Jul 29, 2024

Great to hear, thank you very much for your replies.

Personally, I guess I am going to try out and develop an extendable version of sveltia-cms, that fits my 'vision'. And if it works and looks good, I may inform you, if you insist.

@kyoshino
Copy link
Member

By the way, Sveltia CMS is currently migrating to Svelte 5. It’s a massive rewrite with over 2,500 lines of changes. If you want to extend the CMS, you might want to wait until it’s done next month.

@kyoshino
Copy link
Member

kyoshino commented Sep 9, 2024

Static CMS is dead as of today 😢 The documentation is archived at https://staticjscms.netlify.app/docs/additional-links

@CarloBu
Copy link

CarloBu commented Sep 9, 2024

Static CMS is dead as of today 😢 The documentation is archived at https://staticjscms.netlify.app/docs/additional-links

yeah, I saw in the discord the message. I didn't use it personally, but it's sad that there are one less git-based cms.

@kyoshino
Copy link
Member

kyoshino commented Sep 9, 2024

I’ve also never used it for my projects, but they did great job IMO. I like their documentation.

BTW do you want me to create a Discord server? Here we go: https://discord.gg/6zC5eTCw 🦀

@CarloBu
Copy link

CarloBu commented Sep 9, 2024

I’ve also never used it for my projects, but they did great job IMO. I like their documentation.

BTW do you want me to create a Discord server? Here we go: https://discord.gg/6zC5eTCw 🦀

yeah, it's sad... now you can steal their documentation 🫣

new discord. noice!

@RDjarbeng
Copy link
Contributor

Is the discord limited to those invited only?

@kyoshino
Copy link
Member

kyoshino commented Oct 7, 2024

It has expired by mistake. A new invitation link is https://discord.gg/5hwCGqup5b

@RDjarbeng
Copy link
Contributor

Thanks, joined now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants