32
41
Fork
You've already forked website
53

URL strategy for documentation #154

Closed
opened 2023年03月07日 14:02:15 +01:00 by Ryuno-Ki · 8 comments
Contributor
Copy link

This is something I brought up in the governance meeting at forgejo/meta#166 while we had time.

As it currently stands, the https://codeberg.org/forgejo-contrib/docs appears to be moved into the website (my understanding. Haven't compared in detail yet).

I can see some issues with the current structure.

For one, the version is part of the URL. This means, once v1.20 is released, v1.19 is to be EOLed (assuming forgejo/meta#156 will be reflected). To me, this means, that the documentation for v1.19 is also deprecated.

Then, because the URL is part of the URL, the files have to be copied over to v1.20. That means, we have duplicated content which might cause its own set of problems.

I'd rather use tags (like in https://www.11ty.dev/docs/data-eleventy-supplied/#fileslug ) to indicate when a change was introduced and remove the version from the URL.
This way, we only have one living documentation that can be updated without the copying overhead.

Also, there's a lot of documentation to maintain on the website. Given that those files are basically Markdown with some Frontmatter that is important to Astro we might as well use git submodules to pull in the changes.

This is something I brought up in the governance meeting at https://codeberg.org/forgejo/meta/issues/166 while we had time. As it currently stands, the https://codeberg.org/forgejo-contrib/docs appears to be moved into the website (my understanding. Haven't compared in detail yet). I can see some issues with the current structure. For one, the version is part of the URL. This means, once v1.20 is released, v1.19 is to be EOLed (assuming https://codeberg.org/forgejo/meta/issues/156 will be reflected). To me, this means, that the documentation for v1.19 is also deprecated. Then, because the URL is part of the URL, the files have to be copied over to v1.20. That means, we have duplicated content which [might cause its own set of problems](https://moz.com/learn/seo/duplicate-content). I'd rather use tags (like in https://www.11ty.dev/docs/data-eleventy-supplied/#fileslug ) to indicate when a change was introduced and remove the version from the URL. This way, we only have one living documentation that can be updated without the copying overhead. Also, there's a lot of documentation to maintain on the website. Given that those files are basically Markdown with some Frontmatter that is important to Astro we might as well use git submodules to pull in the changes.

Please propose a PR with these changes, I'm in favor.

Please propose a PR with these changes, I'm in favor.
Author
Contributor
Copy link

I'd like to get the opinion on @crystal and @earl-warren first before moving forward on this. They have contributed PRs to the website as well in recent times.

I'd like to get the opinion on @crystal and @earl-warren first before moving forward on this. They have contributed PRs to the website as well in recent times.

I'm confused about what exactly is being proposed in the OP, but I am in favor of moving the docs to a different repo and pulling them in as a submodule. Different versions of the documentation can be pulled in as multiple submodules so we can support the docs for the latest version as well as any LTS versions or other versions we decide to continue supporting.

I'm confused about what exactly is being proposed in the OP, but I am in favor of moving the docs to a different repo and pulling them in as a submodule. Different versions of the documentation can be pulled in as multiple submodules so we can support the docs for the latest version as well as any LTS versions or other versions we decide to continue supporting.
Author
Contributor
Copy link

Okay, that works for me.

I might get back to you for work on woodpecker (never touched it, but have interest in learning about it, because it would help me with other projects I have).

Okay, that works for me. I might get back to you for work on woodpecker (never touched it, but have interest in learning about it, because it would help me with other projects I have).
Contributor
Copy link

I'm in favor.

I'm in favor.
Author
Contributor
Copy link

Okay, as I feared, it won't be straight forward anymore 😨

cd src/pages
git submodule add https://codeberg.org/forgejo-contrib/docs.git

fails with

fatal: 'src/pages/docs' already exists in the index

What would be needed is to remove this directory from git before it can be added as submodule. https://stackoverflow.com/a/12902857

Given that we already have PRs merged, I feel it's not worth the effort.


What can be done is defining an alias:

cd src/pages
git submodule add https://codeberg.org/forgejo-contrib/docs.git documentation

If not present, the project root needs to have a (possibly empty) .gitmodules file for this to succeed.

Then the changes could be moved into the contrib repository. I don't see a native rename subcommand, but according to https://stackoverflow.com/a/18712756 a git mv should work (appears to be on my machine).

How do we want to proceed?

Okay, as I feared, it won't be straight forward anymore 😨 ```sh cd src/pages git submodule add https://codeberg.org/forgejo-contrib/docs.git ``` fails with > fatal: 'src/pages/docs' already exists in the index What would be needed is to remove this directory from git before it can be added as submodule. https://stackoverflow.com/a/12902857 Given that we already have PRs merged, I feel it's not worth the effort. --- What can be done is defining an alias: ```sh cd src/pages git submodule add https://codeberg.org/forgejo-contrib/docs.git documentation ``` If not present, the project root needs to have a (possibly empty) `.gitmodules` file for this to succeed. Then the changes could be moved into the contrib repository. I don't see a native rename subcommand, but according to https://stackoverflow.com/a/18712756 a `git mv` should work (appears to be on my machine). How do we want to proceed?

If you're not comfortable working with submodules maybe this should be dealt with by someone else? It's not difficult but (as often with git) it is not straightforward either 😄

If you're not comfortable working with submodules maybe this should be dealt with by someone else? It's not difficult but (as often with git) it is not straightforward either 😄
Author
Contributor
Copy link

I'd welcome that.

I only had contact with git submodules once or twice. The last time is years ago.
It's not easy to recall how I did things back in the day.

I'd welcome that. I only had contact with git submodules once or twice. The last time is years ago. It's not easy to recall how I did things back in the day.
Sign in to join this conversation.
No Branch/Tag specified
main
renovate/linters
renovate/sanitize-html-2.x
monthly-2026-05
mahlzahn-eslint-js
preview-link-status
nightfire
2022年12月14日-main
No results found.
Labels
Clear labels
404
Broken links or missing content
Accessibility
Accessibility
Blog post
Documentation
Forgejo Documentation
Internationalisation
i18n and l10n
User research - Accessibility
Requires input about accessibility features, likely involves user testing.
User research - Blocked
Do not pick as-is! We are happy if you can help, but please coordinate with ongoing redesign in this area.
User research - Community
Community features, such as discovering other people's work or otherwise feeling welcome on a Forgejo instance.
User research - Config (instance)
Instance-wide configuration, authentication and other admin-only needs.
User research - Errors
How to deal with errors in the application and write helpful error messages.
User research - Filters
How filter and search is being worked with.
User research - Future backlog
The issue might be inspiring for future design work.
User research - Git workflow
AGit, fork-based and new Git workflow, PR creation etc
User research - Labels
Active research about Labels
User research - Moderation
Moderation Featuers for Admins are undergoing active User Research
User research - Needs input
Use this label to let the User Research team know their input is requested.
User research - Notifications/Dashboard
Research on how users should know what to do next.
User research - Rendering
Text rendering, markup languages etc
User research - Repo creation
Active research about the New Repo dialog.
User research - Repo units
The repo sections, disabling them and the "Add more" button.
User research - Security
User research - Settings (in-app)
How to structure in-app settings in the future?
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/website#154
Reference in a new issue
forgejo/website
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?