Skip to content

Commit

Permalink
GitHub action on PR: markdownlint (#76)
Browse files Browse the repository at this point in the history
Based on Swant's suggestion at #69 (comment)

Co-authored-by: Joseph Price <[email protected]>
Co-authored-by: Svante Bengtson <[email protected]>
  • Loading branch information
3 people authored Jun 9, 2021
1 parent f917def commit 2b26835
Show file tree
Hide file tree
Showing 26 changed files with 345 additions and 164 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint

on: [push, pull_request]

jobs:
markdownlint:
name: Check markdown for style issues
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- name: Cache
uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/setup-node@v2
with:
node-version: 12
- run: npm i --prefer-offline

- uses: xt0rted/markdownlint-problem-matcher@v1
- run: npm run lint:md
- uses: xt0rted/markdownlint-problem-matcher@v1
if: success() || failure()
with:
action: remove
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ _site
.jekyll-cache
.jekyll-metadata
vendor
node_modules
67 changes: 67 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
default: true

# MD003/heading-style/header-style - Heading style
MD003:
# Heading style
style: atx

# MD004/ul-style - Unordered list style
MD004:
# List style
style: dash

# MD009/no-trailing-spaces - Trailing spaces
MD009:
# Spaces for line break
br_spaces: 0
# Allow spaces for empty lines in list items
list_item_empty_lines: false
# Include unnecessary breaks
strict: false

# MD013/line-length - Line length
MD013:
line_length: 78
code_blocks: false

# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
MD024:
# Only check sibling headings
siblings_only: false

# MD033/no-inline-html - Inline HTML
MD033:
# Allowed elements
allowed_elements:
- sup
- sub
- br
- kbd

# MD035/hr-style - Horizontal rule style
MD035:
# Horizontal rule style
style: "---"

# MD042/no-empty-links - No empty links
# This is checked by check-md instead
MD042: false

# MD044/proper-names - Proper names should have the correct capitalization
MD044:
# List of proper names
names:
- Libera.Chat
- Libera Chat
# Include code blocks
code_blocks: false

# MD046/code-block-style - Code block style
MD046:
# Block style
style: fenced

# MD048/code-fence-style - Code fence style
MD048:
# Code fence syle
style: backtick
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
1 change: 1 addition & 0 deletions _includes/modetable.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- markdownlint-disable MD033 MD041 -->
{::nomarkdown}<div class="table">{:/}

<table>
Expand Down
5 changes: 2 additions & 3 deletions chanreg.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ before registering, so we can already check whether your project is likely to
be considered eligible to a registration. Once done, we will need the
following information from you:

```
```markdown
# About your project
Your project name(s):
Your project description:
Expand Down Expand Up @@ -173,7 +173,7 @@ before registering, so we can already check whether your community is likely
to be considered eligible to a registration. Once done, we will need the
following information from you:

```
```markdown
# About your community
Your community name(s):
Your community description:
Expand Down Expand Up @@ -214,7 +214,6 @@ Registered communities can profit from the following benefits:
These replace the hostname part with `@about/yourcommunity/username`,
and can be requested on `#libera-communities`.


## The Projects & Community Team

The Projects & Community Team comprises, among others, e, Fuchs, kline, glguy
Expand Down
54 changes: 36 additions & 18 deletions content/_guides/certfp.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ you are using Windows and do not have a copy, you might consider using Cygwin.

You can generate a certificate with the following command:

openssl req -x509 -new -newkey rsa:4096 -sha256 -days 1096 -nodes -out libera.pem -keyout libera.pem
```sh
openssl req -x509 -new -newkey rsa:4096 -sha256 -days 1096 -nodes -out libera.pem -keyout libera.pem
```

You will be prompted for various pieces of information about the certificate.
The contents do not matter for our purposes, but `openssl` needs at least one
Expand All @@ -31,11 +33,15 @@ password does, so take appropriate care in securing it.

The expiration date can be checked with the following command:

openssl x509 -in libera.pem -noout -enddate
```sh
openssl x509 -in libera.pem -noout -enddate
```

The fingerprint can be checked with the following command:

openssl x509 -in libera.pem -outform der | sha512sum -b | cut -d' ' -f1
```sh
openssl x509 -in libera.pem -outform der | sha512sum -b | cut -d' ' -f1
```

## Connecting to Libera.Chat with your certificate

Expand All @@ -48,31 +54,39 @@ elsewhere on the web.

Move the certificates you created above to ~/.irssi/certs

mkdir ~/.irssi/certs
mv libera.pem ~/.irssi/certs
```sh
mkdir ~/.irssi/certs
mv libera.pem ~/.irssi/certs
```

Now configure your `/server` entry for Libera.Chat to use this certificate. You
may need to adapt this example for your existing configuration (the network
and hostname should match what you already use).

/server add -auto -ssl -ssl_cert ~/.irssi/certs/libera.pem -network libera irc.libera.chat 6697
```irc
/server add -auto -ssl -ssl_cert ~/.irssi/certs/libera.pem -network libera irc.libera.chat 6697
```

### weechat

Move the certificates you created above to ~/.weechat/certs

mkdir ~/.weechat/certs
mv libera.pem ~/.weechat/certs
```sh
mkdir ~/.weechat/certs
mv libera.pem ~/.weechat/certs
```

Now disconnect and remove the current Libera.Chat server(s). Re-add it with
the SSL flag, using your newly generated certificate. Note that these commands
are just examples, you have to adapt them to your current servers.

/set irc.server.libera.addresses irc.libera.chat/6697
/set irc.server.libera.ssl on
/set irc.server.libera.ssl_verify on
/set irc.server.libera.ssl_cert %h/certs/libera.pem
/set irc.server.libera.sasl_mechanism external
```irc
/set irc.server.libera.addresses irc.libera.chat/6697
/set irc.server.libera.ssl on
/set irc.server.libera.ssl_verify on
/set irc.server.libera.ssl_cert %h/certs/libera.pem
/set irc.server.libera.sasl_mechanism external
```

and then reconnect to Libera.Chat.

Expand Down Expand Up @@ -129,18 +143,22 @@ right of the screen to save.

You can then check whether you have a fingerprint by using `whois` on yourself:

/whois YourOwnNick
...
YourOwnNick has client certificate fingerprint 959c0bdfa9877d3466c5848f55264f72f132c657b002b79fda65dbe36c67f4bb3d2a3e2e9925cb5896a53c76169c5bb71b7853bd90192068dc77f4b20159a1d8
...
```irc
/whois YourOwnNick
...
YourOwnNick has client certificate fingerprint 959c0bdfa9877d3466c5848f55264f72f132c657b002b79fda65dbe36c67f4bb3d2a3e2e9925cb5896a53c76169c5bb71b7853bd90192068dc77f4b20159a1d8
...
```

To allow NickServ to recognise you based on your certificate, you need to add
the **sha512** fingerprint to your account (you will need to log in by other
means in order to do so).

You can then authorise your current certificate fingerprint:

/msg NickServ CERT ADD
```irc
/msg NickServ CERT ADD
```

In the future, any connections you make to Libera.Chat with your certificate
will be logged into your account automatically. Optionally, or if you wish to
Expand Down
4 changes: 4 additions & 0 deletions content/_guides/channelmodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ that corresponds to the mode. To unset a mode, use `/mode #channel -(mode)`

## Available channel modes

<!-- markdownlint-disable MD013 -->
{% assign channel_modes = site.data.channelmodes | where_exp:"item","item.restricted != true" %}
<!-- markdownlint-enable MD013 -->

{%- include modetable.md modes=channel_modes -%}

## Restricted channel modes

The following channel modes can only be added by Libera.Chat staff.

<!-- markdownlint-disable MD013 -->
{% assign restricted_modes = site.data.channelmodes | where: 'restricted', true %}
<!-- markdownlint-enable MD013 -->

{%- include modetable.md modes=restricted_modes -%}
12 changes: 8 additions & 4 deletions content/_guides/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ appear in WHOIS (a 276 numeric).

Libera.Chat is also reachable via
[Tor](https://www.torproject.org/), bound to some restrictions. You can't
directly connect to irc.libera.chat via Tor; use the following hidden service
directly connect to `irc.libera.chat` via Tor; use the following hidden service
as the server address instead:

libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion
```hostname
libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion
```

The hidden service requires SASL authentication. In addition, due to abuse
we have seen across other networks in the past, we have unfortunately had to
Expand Down Expand Up @@ -93,8 +95,10 @@ configuration file and configure your client to connect to
`palladium.libera.chat` via Tor. The TLS server certificate used by the hidden
service will validate using this hostname.

# torrc snippet:
MapAddress palladium.libera.chat libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion
```config
# torrc snippet:
MapAddress palladium.libera.chat libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion
```

Older clients that don't support SOCKS4a or later will need to use `MapAddress`
with an IP address, and the certificate will not validate successfully.
Expand Down
1 change: 0 additions & 1 deletion content/_guides/extbans.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ accepted. These entries have the general format `$X` or `$X:data`. Optionally,
they can be negated with a tilde (`~`) before the character: for example,
`$~a` matches every user that is *not* identified to services.


## Available extban types

{%- include modetable.md modes=site.data.extbans -%}
70 changes: 36 additions & 34 deletions content/_guides/findingchannels.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,46 +23,48 @@ channels in the Libera.Chat namespace with at least 10 users.
For full details on how to use alis, `/msg alis HELP LIST` will send you back
the following help text:

***** alis Help *****
Help for LIST:
```irc
***** alis Help *****
Help for LIST:
LIST gives a list of channels matching the
pattern, modified by the other options.
LIST gives a list of channels matching the
pattern, modified by the other options.
Syntax: LIST <pattern> [options]
Syntax: LIST <pattern> [options]
Options are:
-min <n>: show only channels with at least <n> users
-max <n>: show only channels with at most <n> users
-skip <n>: skip first <n> matches
-show [m][t]: show modes/topicsetter
-mode <+|-|=><modes>: modes set/unset/equal
-topic <pattern>: topic matches pattern
-showsecret: show secret channels (requires chan:auspex)
Options are:
-min <n>: show only channels with at least <n> users
-max <n>: show only channels with at most <n> users
-skip <n>: skip first <n> matches
-show [m][t]: show modes/topicsetter
-mode <+|-|=><modes>: modes set/unset/equal
-topic <pattern>: topic matches pattern
-showsecret: show secret channels (requires chan:auspex)
The pattern can contain * and ? wildcards. The pattern has to
match the full channel name or a full topic, depending on where it
is used; the wildcards are important. The pattern is also
automatically surrounded by * wildcards if
a channel name pattern does not start with a wildcard or a #, or
a topic pattern contains no * wildcards.
The pattern can contain * and ? wildcards. The pattern has to
match the full channel name or a full topic, depending on where it
is used; the wildcards are important. The pattern is also
automatically surrounded by * wildcards if
a channel name pattern does not start with a wildcard or a #, or
a topic pattern contains no * wildcards.
For example, for channel names, from most to least specific:
?bar - any character followed by "bar" with no other characters
#bar* - anything starting with "#bar"
##*bar* - anything starting with ## and containing "bar"
*cows*moo* - anything containing "cows", 0 or more characters, and "moo"
*bar* - anything containing "bar" (equivalent to "bar")
For example, for channel names, from most to least specific:
?bar - any character followed by "bar" with no other characters
#bar* - anything starting with "#bar"
##*bar* - anything starting with ## and containing "bar"
*cows*moo* - anything containing "cows", 0 or more characters, and "moo"
*bar* - anything containing "bar" (equivalent to "bar")
Examples:
/msg alis LIST searchterm
/msg alis LIST * -topic multiple*ordered*search*terms
/msg alis LIST * -min 50
/msg alis LIST #foo*
/msg alis LIST #foo* -mode =n
/msg alis LIST *freetopic* -mode -t -show mt
/msg alis LIST ##nocolors* -mode +c -show t
***** End of Help *****
Examples:
/msg alis LIST searchterm
/msg alis LIST * -topic multiple*ordered*search*terms
/msg alis LIST * -min 50
/msg alis LIST #foo*
/msg alis LIST #foo* -mode =n
/msg alis LIST *freetopic* -mode -t -show mt
/msg alis LIST ##nocolors* -mode +c -show t
***** End of Help *****
```

An alternative method to search is to do so via the web, using
[netsplit.de](https://netsplit.de/channels/?net=libera.chat).
Loading

0 comments on commit 2b26835

Please sign in to comment.