celenity/Phoenix
8
198
Fork
You've already forked Phoenix
19

feat(docs): Wiki overhaul #340

Open
Exponent64 wants to merge 3 commits from Exponent64/Phoenix:dev into dev
pull from: Exponent64/Phoenix:dev
merge into: celenity:dev
celenity:dev
celenity:pages
Contributor
Copy link

This PR introduces a workflow that keeps the repository’s wiki synchronized with the docs/ directory. This change simplifies contributions, as users only need to fork the main repository and modify the docs/ directory, which is a significant improvement over the previous setup, where wiki updates couldn’t be made directly via PRs, causing the wiki to lag behind the more current docs/ content.

What the added workflow does is very simple:

  1. Sets environment variables, with the most critical being WIKI_KEY, which grants the workflow permission to push changes from docs/ to the wiki.
  2. Pulls the current wiki content.
  3. Compares the contents of docs/ with the wiki.
  4. Pushes updates from docs/ to the wiki using the WIKI_KEY environment variable.

Something important to note is that this workflow will only run when changes are pushed to any file inside the docs/ directory on the dev branch.

Additionally, I reorganized the wiki's content because there were a lot of blank pages.
Here you can find an example of how the new wiki will look like.

Important

Before merging, the repository owner (@celenity) must complete the following steps:

  1. Create a personal access token in Account settings -> Applications -> Access Tokens with full public repository access. Name it smth like Wiki token. (Since Codeberg treats the wiki as a separate repository, a token restricted to the main repo may not work.)
  2. Enable Forgejo actions for the Phoenix repository in Repo settings -> Units -> Overview by checking the Actions box.
  3. Create a repository secret using the new access token in Repo settings -> Actions -> Secrets named EXACTLY as follows: WIKI_SECRET
This PR introduces a workflow that keeps the repository’s wiki synchronized with the `docs/` directory. This change simplifies contributions, as users only need to fork the main repository and modify the `docs/` directory, which is a significant improvement over the previous setup, where wiki updates couldn’t be made directly via PRs, causing the wiki to lag behind the more current `docs/` content. What the added workflow does is very simple: 1. Sets environment variables, with the most critical being `WIKI_KEY,` which grants the workflow permission to push changes from `docs/` to the wiki. 2. Pulls the current wiki content. 3. Compares the contents of `docs/` with the wiki. 4. Pushes updates from `docs/` to the wiki using the `WIKI_KEY` environment variable. Something important to note is that this workflow will **only** run when changes are pushed to any file inside the `docs/` directory on the `dev` branch. Additionally, I reorganized the wiki's content because there were a lot of blank pages. [Here](https://codeberg.org/Exponent64/Phoenix/wiki) you can find an example of how the new wiki will look like. > [!IMPORTANT] > **Before merging, the repository owner (@celenity) must complete the following steps:** 1. Create a personal access token in `Account settings -> Applications -> Access Tokens` with full public repository access. Name it smth like `Wiki token`. (Since Codeberg treats the wiki as a separate repository, a token restricted to the main repo may not work.) 2. Enable Forgejo actions for the Phoenix repository in `Repo settings -> Units -> Overview` by checking the `Actions` box. 3. Create a repository secret using the new access token in `Repo settings -> Actions -> Secrets` **named _EXACTLY_ as follows**: `WIKI_SECRET`
@ -0,0 +40,4 @@
Now, you'll want to get the Phoenix repository.
With `git`, you can use:
```sh
Contributor
Copy link

We don't use sh.

  • bash - Linux.
  • zsh - macOS.
  • powershell - Windows.
We don't use `sh`. - `bash` - Linux. - `zsh` - macOS. - `powershell` - Windows.
Author
Contributor
Copy link

sh is used as a middle ground between all three platforms in this case because this section is meant to provide universal instructions for all platforms AFAICT. The instructions that are already platform-specific use their corresponding shell in the build guide.

`sh` is used as a middle ground between all three platforms in this case because this section is meant to provide universal instructions for all platforms AFAICT. The instructions that are already platform-specific use their corresponding shell in the build guide.
Contributor
Copy link

Agree, it's useful in plain markdown editing. @celenity, any thoughts?

Agree, it's useful in plain markdown editing. @celenity, any thoughts?
@ -0,0 +10,4 @@
These overrides apply to **both** Android **and** Desktop.
___
Contributor
Copy link

Do not use --- 'cause # already separate text.

Do not use `---` 'cause `#` already separate text.
Exponent64 marked this conversation as resolved
@ -0,0 +24,4 @@
**Otherwise, add the following**:
```sh
Contributor
Copy link

javascript fits better here instead of sh.

`javascript` fits better here instead of `sh`.
Exponent64 marked this conversation as resolved
Contributor
Copy link

In addition, it’s good to organize files as follows:

  • /docs/ - current files.
  • /docs/wiki/ - wiki files.

And, in my opinion, it’s preferable to use "kebab-case" for filenames.

In addition, it’s good to organize files as follows: - `/docs/` - current files. - `/docs/wiki/` - wiki files. And, in my opinion, it’s preferable to use "kebab-case" for filenames.
Author
Contributor
Copy link

In addition, it’s good to organize files as follows:

/docs/ - current files.
/docs/wiki/ - wiki files.

What would be the benefit of doing this?

> In addition, it’s good to organize files as follows: > > /docs/ - current files. > /docs/wiki/ - wiki files. What would be the benefit of doing this?
Contributor
Copy link

@Exponent64 wrote in #340 (comment):

In addition, it’s good to organize files as follows:
/docs/ - current files.
/docs/wiki/ - wiki files.

What would be the benefit of doing this?

I think this separation makes sense until we merge the old documentation with the new wiki.

If you still want to use /docs/ as the root directory for all files (I don’t see the point in adding folder, it’s easier to use a prefix, such as ux-page.md or post-page.md, etc.), then we need to streamline the duplicate information, update the formatting, and generally tidy up the documentation (if you don’t want to handle this, I’ll take care of it in another PR after the merge).

@Exponent64 wrote in https://codeberg.org/celenity/Phoenix/pulls/340#issuecomment-19131812: > > In addition, it’s good to organize files as follows: > > /docs/ - current files. > > /docs/wiki/ - wiki files. > > What would be the benefit of doing this? I think this separation makes sense until we merge the old documentation with the new wiki. If you still want to use `/docs/` as the root directory for all files (I don’t see the point in adding folder, it’s easier to use a prefix, such as `ux-page.md` or `post-page.md`, etc.), then we need to streamline the duplicate information, update the formatting, and generally tidy up the documentation (if you don’t want to handle this, I’ll take care of it in another PR after the merge).
Author
Contributor
Copy link

@koru

I think this separation makes sense until we merge the old documentation with the new wiki.

What exactly is the "old documentation" in this context?

This PR already replaces the old documentation from the current wiki page with the more up-to-date documentation found in the docs/ directory. So, I'm not sure which of these you're referring to: the documentation in docs/, the one in the wiki page, or something completely different.

then we need to streamline the duplicate information

There shouldn't be any duplicates after this PR is merged and the workflow runs. For example, there are currently two sets of instructions for building Phoenix, one in docs/ and one in the wiki. Since the instructions in docs/ are more up-to-date, this leaves only the docs/build.md file, which then I renamed to docs/Building.md. After the workflow runs, there should only be one set of building instructions, sourced from docs/Building.md, which is then added thanks to the workflow.

update the formatting and generally tidy up the documentation (if you don’t want to handle this, I’ll take care of it in another PR after the merge).

That would be great! I think updating the wiki's content would be out of scope for this PR (beyond replacing old wiki pages with the files found in docs/), as this PR is more focused on improving how contributors work with the documentation and ensuring it gets constantly updated.

@koru > I think this separation makes sense until we merge the old documentation with the new wiki. What exactly is the "old documentation" in this context? This PR already replaces the old documentation from the current wiki page with the more up-to-date documentation found in the `docs/` directory. So, I'm not sure which of these you're referring to: the documentation in `docs/`, the one in the wiki page, or something completely different. > then we need to streamline the duplicate information There shouldn't be any duplicates after this PR is merged and the workflow runs. For example, there are currently two sets of instructions for building Phoenix, one in `docs/` and one in the wiki. Since the instructions in `docs/` are more up-to-date, this leaves only the `docs/build.md` file, which then I renamed to `docs/Building.md`. After the workflow runs, there should only be one set of building instructions, sourced from `docs/Building.md`, which is then added thanks to the workflow. > update the formatting and generally tidy up the documentation (if you don’t want to handle this, I’ll take care of it in another PR after the merge). That would be great! I think updating the wiki's content would be out of scope for this PR (beyond replacing old wiki pages with the files found in `docs/`), as this PR is more focused on improving how contributors work with the documentation and ensuring it gets constantly updated.
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u dev:Exponent64-dev
git switch Exponent64-dev
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 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
celenity/Phoenix!340
Reference in a new issue
celenity/Phoenix
No description provided.
Delete branch "Exponent64/Phoenix:dev"

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?