mirror of
https://github.com/actix/actix-website
synced 2024-11-23 16:31:08 +01:00
docs: enable shell-session syntax
This commit is contained in:
parent
2aacdf2f70
commit
a0a2da114d
@ -62,8 +62,8 @@ See the [API documentation for actix-web's `error` module][actixerror] for a ful
|
||||
|
||||
Actix logs all errors at the `WARN` log level. If an application's log level is set to `DEBUG` and `RUST_BACKTRACE` is enabled, the backtrace is also logged. These are configurable with environmental variables:
|
||||
|
||||
```sh
|
||||
>> RUST_BACKTRACE=1 RUST_LOG=actix_web=debug cargo run
|
||||
```shell-session
|
||||
$ RUST_BACKTRACE=1 RUST_LOG=actix_web=debug cargo run
|
||||
```
|
||||
|
||||
The `Error` type uses the cause's error backtrace if available. If the underlying failure does not provide a backtrace, a new backtrace is constructed pointing to the point where the conversion occurred (rather than the origin of the error).
|
||||
|
@ -69,13 +69,14 @@ openssl = { version = "0.10" }
|
||||
|
||||
To create the key.pem and cert.pem use the command. **Fill in your own subject**
|
||||
|
||||
```bash
|
||||
$ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -sha256 -subj "/C=CN/ST=Fujian/L=Xiamen/O=TVlinux/OU=Org/CN=muro.lxd"
|
||||
```shell-session
|
||||
$ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem \
|
||||
-days 365 -sha256 -subj "/C=CN/ST=Fujian/L=Xiamen/O=TVlinux/OU=Org/CN=muro.lxd"
|
||||
```
|
||||
|
||||
To remove the password, then copy nopass.pem to key.pem
|
||||
|
||||
```bash
|
||||
```shell-session
|
||||
$ openssl rsa -in key.pem -out nopass.pem
|
||||
```
|
||||
|
||||
|
@ -2,6 +2,7 @@ const path = require("path");
|
||||
const {
|
||||
themes: { dracula: draculaTheme },
|
||||
} = require("prism-react-renderer");
|
||||
|
||||
module.exports = {
|
||||
title: "Actix",
|
||||
tagline:
|
||||
@ -49,7 +50,7 @@ module.exports = {
|
||||
prism: {
|
||||
// dracula is closest to docs.rs, where keywords are highlighted
|
||||
theme: draculaTheme,
|
||||
additionalLanguages: ["rust", "toml"],
|
||||
additionalLanguages: ["rust", "toml", "shell-session"],
|
||||
defaultLanguage: "rust",
|
||||
},
|
||||
colorMode: {
|
||||
|
11
src/components/shell_block.jsx
Normal file
11
src/components/shell_block.jsx
Normal file
@ -0,0 +1,11 @@
|
||||
import RenderCodeBlock from "@theme/CodeBlock";
|
||||
|
||||
const ShellBlock = ({ children }) => {
|
||||
return (
|
||||
<RenderCodeBlock className={`language-console`}>
|
||||
{children}
|
||||
</RenderCodeBlock>
|
||||
);
|
||||
};
|
||||
|
||||
export default ShellBlock;
|
Loading…
Reference in New Issue
Block a user