Skip to content

Commit

Permalink
ci: add vimdoc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Jan 18, 2025
1 parent d4619e3 commit a859c61
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 32 deletions.
12 changes: 6 additions & 6 deletions .github/wiki/Configuration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ⚑ Cord Configuration
# ⚑ Configuration

A comprehensive guide to configuring the Cord plugin to your liking. All options are set through the `setup()` function:

Expand Down Expand Up @@ -185,11 +185,11 @@ require('cord').setup {

## πŸ”Œ Plugins

| Option | Type | Description |
| --------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `plugins` | `string[] \| table<string, table>` | Extend Cord with plugins. See the [Wiki](https://github.com/vyfor/cord.nvim/wiki/Plugins) for more info |
| Option | Type | Description |
| --------- | ---------------------------------- | -------------------------------------------------------------------- |
| `plugins` | `string[] \| table<string, table>` | Extend Cord with plugins. See the [Wiki](./Plugins.md) for more info |

> If you want to develop your own plugin, check out Cord's [Plugin System](https://github.com/vyfor/cord.nvim/wiki/Plugin-System)
> If you want to develop your own plugin, check out Cord's [Plugin System](./Plugin-System.md)
## βš™οΈ Advanced

Expand Down Expand Up @@ -298,7 +298,7 @@ assets = {
```

> [!TIP]
> A detailed guide can be found in the [Wiki](https://github.com/vyfor/cord.nvim/wiki/File-Icons).
> A detailed guide can be found in the [Wiki](./File-Icons.md).
Some languages cannot be identified solely by their filename or extension. In such cases, we can utilize the `vim.filetype.add` function to add extra patterns for filetype detection:

Expand Down
2 changes: 1 addition & 1 deletion .github/wiki/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ First off, thank you for your interest in contributing to cord.nvim! We welcome

### Reporting Bugs

- Before submitting a bug report, make sure to go through the [**πŸ”§ Troubleshooting**](https://github.com/vyfor/cord.nvim/wiki/Troubleshooting) section of the wiki, and check for [existing issues](https://github.com/vyfor/cord.nvim/issues) to see if the problem has already been reported.
- Before submitting a bug report, make sure to go through the [**πŸ”§ Troubleshooting**](./Troubleshooting.md) section of the wiki, and check for [existing issues](https://github.com/vyfor/cord.nvim/issues) to see if the problem has already been reported.
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/vyfor/cord.nvim/issues/new). Be sure to include a clear title and description, along with as much relevant information as possible.

### Suggesting Enhancements
Expand Down
2 changes: 2 additions & 0 deletions .github/wiki/File-Icons.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# πŸ“‚ Assets and File Icons

## Configuration Structure

Cord allows the customization of the appearance of a file icon. To do so, you need to modify the `assets` table in the setup configuration of the plugin:
Expand Down
16 changes: 8 additions & 8 deletions .github/wiki/Home.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Welcome to the **cord.nvim** wiki!

- [Migrating from v1](https://github.com/vyfor/cord.nvim/wiki/Migration)
- [Configuration](https://github.com/vyfor/cord.nvim/wiki/Configuration)
- [Examples](https://github.com/vyfor/cord.nvim/wiki/Examples)
- [Available Plugins](https://github.com/vyfor/cord.nvim/wiki/Plugins)
- [Add or Change File Icons](https://github.com/vyfor/cord.nvim/wiki/File-Icons)
- [Troubleshooting](https://github.com/vyfor/cord.nvim/wiki/Troubleshooting)
- [Contributing](https://github.com/vyfor/cord.nvim/wiki/Contributing)
- [Plugin System](https://github.com/vyfor/cord.nvim/wiki/Plugin-System)
- [Migrating from v1](./Migration.md)
- [Configuration](./Configuration.md)
- [Examples](./Examples.md)
- [Available Plugins](./Plugins.md)
- [Add or Change File Icons](./File-Icons.md)
- [Troubleshooting](./Troubleshooting.md)
- [Contributing](./Contributing.md)
- [Plugin System](./Plugin-System.md)

<p>πŸ’¬ Questions? Post in <a href="https://github.com/vyfor/cord.nvim/discussions">Discussions</a> or reach me out on Discord: <a href="https://discord.com/users/446729269872427018"><strong>vyfor</strong></a></p>
<div><a href="https://discord.gg/q9rC4bjCHv"><img src="https://discord.com/api/guilds/1322899307925602366/widget.png?style=banner3" alt="cord.nvim"/></a></div>
6 changes: 3 additions & 3 deletions .github/wiki/Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The plugin in question, **cord.nvim**, has been rewritten from scratch with a ne
The config structure has been updated to be more flexible. Most notably, the majority of string options now support functions, giving you full control over the Rich Presence display. Additionally, a new `variables` option has been introduced to allow custom dynamic values in text templates.

> [!NOTE]
> Full configuration options can be found [here](https://github.com/vyfor/cord.nvim/wiki/Configuration).
> Full configuration options can be found [here](./Configuration.md).
### Changed Options
```lua
Expand Down Expand Up @@ -71,7 +71,7 @@ Several built-in features have been removed in favor of customization through fu
- Problem count
- ToggleTerm handling

These can now be implemented using hooks and custom functions. See [examples](https://github.com/vyfor/cord.nvim/wiki/Examples).
These can now be implemented using hooks and custom functions. See [examples](./Examples.md).

## 🎨 Function-Based Customization

Expand Down Expand Up @@ -115,4 +115,4 @@ assets = {
}
```

More information can be found in the [Configuration Guide](https://github.com/vyfor/cord.nvim/wiki/Configuration).
More information can be found in the [Configuration Guide](./Configuration.md).
8 changes: 4 additions & 4 deletions .github/wiki/Plugin-System.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ return M
- **`description`**:
An optional description of the plugin.

- [**`variables`**](https://github.com/vyfor/cord.nvim/wiki/Configuration#custom-variables):
- [**`variables`**](./Configuration.md#custom-variables):
An optional table of variables that will be merged with the default options. Do note that overriding existing variables is only allowed for built-in variables.

- [**`hooks`**](https://github.com/vyfor/cord.nvim/wiki/Configuration#-hooks):
- [**`hooks`**](./Configuration.md#-hooks):
An optional table of hooks that will be added to the existing list of hooks. Hooks can optionally define a priority that will be used to determine the order of execution. User-defined hooks are prioritized by default.

- [**`assets`**](https://github.com/vyfor/cord.nvim/wiki/Configuration#assets):
- [**`assets`**](./Configuration.md#assets):
An optional table of assets that will be merged with the default assets.

- [**`config`**](https://github.com/vyfor/cord.nvim/wiki/Configuration#default-config):
- [**`config`**](./Configuration.md#default-config):
An optional table of configuration options that will be merged with other plugins' configuration options, and then with the user's configuration which takes precedence.

## 🎯 Best Practices
Expand Down
2 changes: 1 addition & 1 deletion .github/wiki/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Rich Presence is not shown in Discord
1. Ensure that `cord.nvim` is loaded (try running a user command, e.g. `:Cord status`)
2. Confirm that your Activity Privacy settings are [enabled](https://github.com/vyfor/cord.nvim/assets/92883017/c0c8c410-e90e-425e-bf10-8b59f04f15ce)
3. Set [`advanced.plugin.log_level`](https://github.com/vyfor/cord.nvim/wiki/Configuration#️-advanced) to `vim.log.levels.TRACE` and check `:messages` for logs
3. Set [`advanced.plugin.log_level`](./Configuration.md#️-advanced) to `vim.log.levels.TRACE` and check `:messages` for logs
4. Verify that the Discord IPC pipe exists:

**Windows:**
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/lua.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ jobs:
- name: Apply changes
if: github.event_name == 'push'
run: |
git config --global user.name "vyfor"
git config --global user.email "[email protected]"
git pull
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "style(stylua): format Lua code" || echo "No changes to commit"
git commit -m "style(lua): reformat code" || echo "No changes to commit"
git push
37 changes: 37 additions & 0 deletions .github/workflows/panvimdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Panvimdoc

on:
workflow_dispatch:
push:
branches: [master, client-server]
paths:
- README.md
- .github/wiki/**
- .github/workflows/panvimdoc.yml

permissions:
contents: write

jobs:
docs:
name: Generate Panvimdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- run: |
INCLUDES="\`\`\`{.include}\n.github/wiki/Configuration.md\n\`\`\`\n\n\`\`\`{.include}\n.github/wiki/File-Icons.md\n\`\`\`\n\n\`\`\`{.include}\n.github/wiki/Plugins.md\n\`\`\`\n\n\`\`\`{.include}\n.github/wiki/Examples.md\n\`\`\`\n\n"
echo -e "$INCLUDES$(cat README.md)" > _README.md
- uses: kdheepak/panvimdoc@main
with:
vimdoc: cord
pandoc: _README.md
demojify: true

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore(docs): update vimdoc [skip ci]"
branch: ${{ github.head_ref }}
skip_dirty_check: true
file_pattern: doc/cord.txt
3 changes: 2 additions & 1 deletion .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Andrew-Chen-Wang/github-wiki-action@v4
# TODO: Switch to v5 once it's released
- uses: Andrew-Chen-Wang/github-wiki-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: .github/wiki
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ Cord features over 120 beautifully designed icons for languages and components w
πŸ‘‰ [**Explore the Showcase**](https://github.com/vyfor/icons#showcase)

## πŸ“– Documentation
- [**Configuration Guide**](https://github.com/vyfor/cord.nvim/wiki/Configuration): Everything you need to customize Cord.
- [**Examples**](https://github.com/vyfor/cord.nvim/wiki/Examples): Creative ways to customize your Discord presence.
- [**Migration Guide**](https://github.com/vyfor/cord.nvim/wiki/Migration): Smooth migration from Cord v1.
- [**Configuration Guide**](./.github/wiki/Configuration.md): Everything you need to customize Cord.
- [**Examples**](./.github/wiki/Examples.md): Creative ways to customize your Discord presence.
- [**Migration Guide**](./.github/wiki/Migration.md): Smooth migration from Cord v1.
- [**Wiki**](https://github.com/vyfor/cord.nvim/wiki): Examples, best practices, and FAQs.

## 🀝 Contributing
Expand All @@ -146,8 +146,7 @@ We welcome contributions to make Cord even better!

## ❓ FAQ
Have questions or issues?
- [**FAQ**](https://github.com/vyfor/cord.nvim/wiki/FAQ)
- [**Troubleshooting Guide**](https://github.com/vyfor/cord.nvim/wiki/Troubleshooting)
- [**Troubleshooting Guide**](./.github/wiki/Troubleshooting)

## πŸ› οΈ Build From Source
>[!NOTE]
Expand Down
Empty file added doc/.keep
Empty file.

0 comments on commit a859c61

Please sign in to comment.