bcc-code / bcc-documentation-base

A base VuePress theme that can be used to render documentation for other BCC projects
https://developer.bcc.no/bcc-documentation-base
Apache License 2.0
0 stars 0 forks source link

Improve shortcomings of current setup #2

Open laurensgroeneveld opened 1 year ago

laurensgroeneveld commented 1 year ago

The current setup is fairly simple:

This works quite well for basic documentation that is attached to a repo. To add a VuePress site is only three steps. However there are several shortcomings with this approach:

I'm curious how we can improve on this setup. I think we should keep in mind the following goals for this setup:

I would rather not include VuePress as a dependency in all the other repositories, as it rather defeats the "frictionless" goal (especially when your code isn't Javascript and doesn't have a package.json already).

One final thing to consider is that some of this sprang forth from a discussion on the developer.bcc.no repository: https://github.com/bcc-code/bcc-code.github.io/issues/57 - this repository is a special case as it's intended as a website with generic documentation, without any attached code. Perhaps this repository should not use the same setup as the other repositories. Still, other repositories would benefit from us solving the problems with local running and including Vue components.

Ghostbird commented 1 year ago

We could use git submodules in the main documentation repository to store a reference to an actual git commit in the other repositories.

Disadvantages:

Advantages:

That's quite a different set-up than this template mechanism though.

laurensgroeneveld commented 1 year ago

Thanks, good suggestion!

Doesn't auto-update when the submodule documentation is updated (I'm not sure the current set-up does that either)

The current setup also doesn't do this, but when a build is triggered in a repository it will automatically pick up any changes to the VuePress setup.

I do like the idea of pointing to a branch with a git submodule, I actually didn't know that was possible. Still, we'd have to take into account that a push to a repository needs to trigger a rebuild of the site.

In a way this feels pretty close to the current setup, while not solving the two pain points of running a doc site locally and importing Vue components with dependencies, so not sure if it's worth the effort.

Ghostbird commented 1 year ago

Yeah, I agree. I though it pertinent to mention git submodules, as they're a good fit for some of the things we do here. However, it doesn't solve the the issue of being able to run a doc site locally. However, it does allow you to run the main docs locally, with an updated git submodule reference to your branch. Then you can make local changes, push to your branch, run the full docs build and see your changes relatively easily. No need to perform any actions that permanently change anything to any deployed environment. Maybe that's a slight improvement over the current set-up. You won't have to copy files over manually multiple times, only change the git submodule reference once.

leo-schick commented 5 months ago

I have another idea to solve this:

Why not add a docker-compose file into repo developer.bcc.no which clones bcc-documentation-base into the container and mapps the local data (e.g. developer.bcc.no) into the pace where you need it? @laurensgroeneveld

laurensgroeneveld commented 5 months ago

Why not add a docker-compose file into repo developer.bcc.no which clones bcc-documentation-base into the container and mapps the local data (e.g. developer.bcc.no) into the pace where you need it?

Doesn't sound like a bad idea 👍