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

VitePress compatibility? #133

Open
sqmch opened this issue Apr 13, 2024 · 3 comments
Open

VitePress compatibility? #133

sqmch opened this issue Apr 13, 2024 · 3 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@sqmch
Copy link

sqmch commented Apr 13, 2024

Hello,

Can django-vite be used with VitePress? The output static files when deployed are a bit different, there is no js file to point to as the main asset to get injected into the template and the hashmap.json, which is a manifest.json equivalent of sorts, is differently structured. In some sense it all seems to have to be possible, but does anyone have experience or ideas on if and how it can be pulled off?

Thank you

@MrBin99
Copy link
Owner

MrBin99 commented Apr 14, 2024

Hi, I don't understand why you need to combine VitePress which is a static site generator to a Django project ?

If your datas of your static site is in Django, I think you mean you use Django as a "headless CMS" and I think you don't need to combine the two projects.

One is your backend (Django) that provide APIs and the other your frontend and you can host them pretty much in different places or strategies.

So you do not have to combine the two.

@sqmch
Copy link
Author

sqmch commented Apr 14, 2024

Hey, thanks for the reply.

The reason is I want to combine the two is due to an existing project being already built in django. Parts of it have been built or rebuilt using django-vite to inject vue into a django template. Recently the idea of adding docs built with VitePress has arisen and I'm exploring the idea of not having to host the static files separately but rather include them in the existing way of doing things, however I am getting the sense that it's not really doable with django-vite, but figured my understanding of how to use it could be limited and thus the question.

@MrBin99
Copy link
Owner

MrBin99 commented Apr 15, 2024

I understand.

For now, I think django-vite do not support VitePress and I think will not in the near future as the need to combine VitePress and Django is not very common I think, maybe I'm wrong.

You may write your own parser for the VitePress manifest or as I said maybe completely separate the two projects.

Feel free to submit a PR if you think your parser needs to be part of VitePress.

Thank you for your message !

@MrBin99 MrBin99 added enhancement New feature or request wontfix This will not be worked on labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants