-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
feat(default-theme): native support for carbon ads #86
Conversation
I kinda like the idea of having Google Analytics option, since usually everybody wants that. But not sure about the ads... Because while Vue's official docs uses Carbon, it really depends on locales what the primary ads formats are. I think for now, ads should be configured for each repo (Router/Vuex/etc.) using slots 🤔 What do you think? (Again, I'm all for Google Analytics though). |
I think we should still add the slots to the default theme and then add configs for ads to the vue theme since we use it in every official vue lib documentation. We could also handle something per locale, and it could also be a plugin instead. Adding analytics should also be in a plugin like in vuepress. But I don't think we have the plugin architecture yet |
Ah, that make sense. If we were to implement plugins feature (and I think we kinda need it), it make sense now to include these and pull it out once we have the plugin feature 👍 |
yeah, let's hold on to this for the moment. I will refactor it once there is some kind of plugin architecture in place |
@posva I think at the moment, VitePress doesn't look like to have any strong plugin feature implemented in future. I think we should have this merged in to the core directly. |
@kiaking I think it's fine to wait for the moment! Better have a plugin architecture built that allows adding such things. |
No I mean the discussion we are having right now, there might be no plugin feature for VitePress at all. So we might be waiting for nothing... 🤔
This is another story but yes I would love to. And for that, I can of course wait! |
I will give this a go and refactor next week and make it look like the current version on vue router next docs: https://next.router.vuejs.org/guide/essentials/navigation.html#navigate-to-a-different-location which was inspired by vuejs.org |
Yeah great idea! Looking forward to it! I might be modifying the components a lot for stylings and refactoring. So don't worry so much about conflicts, I think I can resolve those. |
5861633
to
81f2d49
Compare
I think we should add by default the algolia search too, but I will do that in a separat PR. What do you think @kiaking ? |
Yes we should definitely have algolia integration too, the issue #40 🙌 |
ah yeah, that's a different thing though 😆 : simple search out of the box based on titles. Algolia still needs you to request ids at https://docsearch.algolia.com/ |
I'm pretty sure the 19 was a typo on my end (1 and 9 are next to each other on my keyboard layout)
7ebba89
to
42c9f5f
Compare
This should be ready for review! |
Here we go! |
I also added the existing slots sidebar-top/bottom and page-top/bottom because I used them to add the ads components. To make them work and test them, you need to add this config to the
themeConfig
: