mirror of
https://github.com/actix/actix-website
synced 2024-11-27 10:02:57 +01:00
Update: deps, markdown syntax, docuCtx. Change default edit branch to 'main'. (#339)
* Update: deps, markdown syntax, docuCtx * Update node version in actions
This commit is contained in:
parent
838dbe5d49
commit
f5e9e93b67
2
.github/workflows/website.yml
vendored
2
.github/workflows/website.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v4.0.0
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
|
@ -70,7 +70,7 @@ and:
|
||||
/{foo}/bar/baz
|
||||
```
|
||||
|
||||
A _variable part_ (replacement marker) is specified in the form _{identifier}_, where this means "accept any characters up to the next slash character and use this as the name in the `HttpRequest.match_info()` object".
|
||||
A _variable part_ (replacement marker) is specified in the form _\{identifier}_, where this means "accept any characters up to the next slash character and use this as the name in the `HttpRequest.match_info()` object".
|
||||
|
||||
A replacement marker in a pattern matches the regular expression `[^{}/]+`.
|
||||
|
||||
@ -170,7 +170,7 @@ Suppose that you want to organize paths to endpoints used to view "Users". Such
|
||||
|
||||
- /users
|
||||
- /users/show
|
||||
- /users/show/{id}
|
||||
- /users/show/\{id}
|
||||
|
||||
A scoped layout of these paths would appear as follows
|
||||
|
||||
@ -202,7 +202,7 @@ It also possible to extract path pattern information to a struct. In this case,
|
||||
|
||||
## Generating resource URLs
|
||||
|
||||
Use the [_HttpRequest.url_for()_][urlfor] method to generate URLs based on resource patterns. For example, if you've configured a resource with the name "foo" and the pattern "{a}/{b}/{c}", you might do this:
|
||||
Use the [_HttpRequest.url_for()_][urlfor] method to generate URLs based on resource patterns. For example, if you've configured a resource with the name "foo" and the pattern "\{a}/\{b}/\{c}", you might do this:
|
||||
|
||||
<CodeBlock example="url-dispatch" file="urls.rs" section="url" />
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
const path = require("path");
|
||||
|
||||
const {
|
||||
themes: { dracula: draculaTheme },
|
||||
} = require("prism-react-renderer");
|
||||
module.exports = {
|
||||
title: "Actix",
|
||||
tagline:
|
||||
@ -46,7 +48,7 @@ module.exports = {
|
||||
},
|
||||
prism: {
|
||||
// dracula is closest to docs.rs, where keywords are highlighted
|
||||
theme: require("prism-react-renderer/themes/dracula"),
|
||||
theme: draculaTheme,
|
||||
additionalLanguages: ["rust", "toml"],
|
||||
defaultLanguage: "rust",
|
||||
},
|
||||
@ -61,7 +63,7 @@ module.exports = {
|
||||
{
|
||||
docs: {
|
||||
sidebarPath: require.resolve("./sidebars.js"),
|
||||
editUrl: "https://github.com/actix/actix-website/edit/master/",
|
||||
editUrl: "https://github.com/actix/actix-website/edit/main/",
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve("./src/css/custom.css"),
|
||||
|
5613
package-lock.json
generated
5613
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
@ -14,18 +14,24 @@
|
||||
"write-heading-ids": "docusaurus write-heading-ids"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "^2.0.0-beta",
|
||||
"@docusaurus/preset-classic": "^2.0.0-beta",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.35",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
||||
"@fortawesome/react-fontawesome": "^0.1.14",
|
||||
"@mdx-js/react": "^1.6.21",
|
||||
"clsx": "^1.1.1",
|
||||
"docusaurus-plugin-sass": "^0.2.2",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"@docusaurus/core": "3.0.0",
|
||||
"@docusaurus/preset-classic": "3.0.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.4.2",
|
||||
"@fortawesome/react-fontawesome": "^0.2",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
"docusaurus-plugin-sass": "~0.2.5",
|
||||
"prism-react-renderer": "^2.1.0",
|
||||
"react": "^18.0.2",
|
||||
"react-dom": "^18.0.2",
|
||||
"sass": "^1.53.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "3.0.0",
|
||||
"@docusaurus/types": "3.0.0",
|
||||
"raw-loader": "^4.0.2"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.5%",
|
||||
@ -38,7 +44,7 @@
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"raw-loader": "^4.0.2"
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
@ -15,8 +15,7 @@ import {
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
const Home = () => {
|
||||
const context = useDocusaurusContext();
|
||||
const siteConfig = context;
|
||||
const {siteConfig} = useDocusaurusContext();
|
||||
|
||||
return (
|
||||
<Layout description={siteConfig.tagline}>
|
||||
@ -73,8 +72,7 @@ const highlights = [
|
||||
];
|
||||
|
||||
const Hero = () => {
|
||||
const context = useDocusaurusContext();
|
||||
const { siteConfig } = context;
|
||||
const { siteConfig } = useDocusaurusContext();
|
||||
|
||||
return (
|
||||
<header id="hero" className={clsx("hero", styles.banner)}>
|
||||
|
Loading…
Reference in New Issue
Block a user