Skip to content

Commit 9b17325

Browse files
committed
feat: doc add pwa
1 parent a32e373 commit 9b17325

File tree

6 files changed

+66
-42
lines changed

6 files changed

+66
-42
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cache/
1+
docs/.vitepress/cache/
22

33
# Created by https://www.gitignore.io/api/osx,python,pycharm,windows,visualstudio,visualstudiocode
44
# Edit at https://www.gitignore.io/?templates=osx,python,pycharm,windows,visualstudio,visualstudiocode

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
55

66
[tool.poetry]
77
name = "p3g"
8-
version = "1.5.4"
8+
version = "1.5.5"
99
description = "Python Packages Project Generator"
1010
readme = "README.md"
1111
authors = ["Zeeland <zeeland4work@gmail.com>"]

{{ cookiecutter.project_name.lower().replace(' ', '_').replace('-', '_') }}/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
docs/.vitepress/cache/
12
node_modules/
23

34
# Created by https://www.gitignore.io/api/osx,python,pycharm,windows,visualstudio,visualstudiocode
Lines changed: 63 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,70 @@
11
import { defineConfig } from "vitepress";
2+
import { withPwa } from "@vite-pwa/vitepress";
23

34
// https://vitepress.dev/reference/site-config
4-
export default defineConfig({
5-
title: "{{ cookiecutter.project_name }}",
6-
description: "{{ cookiecutter.project_description }}",
7-
themeConfig: {
8-
// https://vitepress.dev/reference/default-theme-config
9-
logo: "/logo.png",
10-
nav: [
11-
{ text: "Home", link: "/" },
12-
{ text: "Guide", link: "/guide/" },
13-
{ text: "API", link: "/api/" },
14-
{
15-
text: "GitHub",
16-
link: "https://github.com/{{ cookiecutter.github_name }}/{{ cookiecutter.project_name }}",
5+
export default withPwa(
6+
defineConfig({
7+
title: "{{ cookiecutter.project_name }}",
8+
description: "{{ cookiecutter.project_description }}",
9+
themeConfig: {
10+
// https://vitepress.dev/reference/default-theme-config
11+
logo: "/logo.png",
12+
nav: [
13+
{ text: "Home", link: "/" },
14+
{ text: "Guide", link: "/guide/" },
15+
{ text: "API", link: "/api/" },
16+
{
17+
text: "GitHub",
18+
link: "https://github.com/{{ cookiecutter.github_name }}/{{ cookiecutter.project_name }}",
19+
},
20+
],
21+
sidebar: [
22+
{
23+
text: "Introduction",
24+
items: [
25+
{ text: "Getting Started", link: "/guide/" },
26+
{ text: "Installation", link: "/guide/installation" },
27+
],
28+
},
29+
{
30+
text: "API Reference",
31+
items: [
32+
{ text: "Overview", link: "/api/" },
33+
{ text: "Examples", link: "/api/examples" },
34+
],
35+
},
36+
],
37+
socialLinks: [
38+
{
39+
icon: "github",
40+
link: "https://github.com/{{ cookiecutter.github_name }}/{{ cookiecutter.project_name }}",
41+
},
42+
],
43+
footer: {
44+
message: "Released under the {{ cookiecutter.license }} License.",
45+
copyright:
46+
'Copyright © {% now "utc", "%Y" %} {{ cookiecutter.organization }}',
1747
},
18-
],
19-
sidebar: [
20-
{
21-
text: "Introduction",
22-
items: [
23-
{ text: "Getting Started", link: "/guide/" },
24-
{ text: "Installation", link: "/guide/installation" },
25-
],
26-
},
27-
{
28-
text: "API Reference",
29-
items: [
30-
{ text: "Overview", link: "/api/" },
31-
{ text: "Examples", link: "/api/examples" },
48+
},
49+
pwa: {
50+
manifest: {
51+
name: "{{ cookiecutter.project_name }}",
52+
short_name: "{{ cookiecutter.project_name }}",
53+
theme_color: "#2b2a27",
54+
background_color: "#ffffff",
55+
display: "standalone",
56+
orientation: "portrait",
57+
scope: "/",
58+
start_url: "/",
59+
icons: [
60+
{
61+
src: "/logo.png",
62+
sizes: "192x192",
63+
type: "image/png",
64+
purpose: "maskable any",
65+
},
3266
],
3367
},
34-
],
35-
socialLinks: [
36-
{
37-
icon: "github",
38-
link: "https://github.com/{{ cookiecutter.github_name }}/{{ cookiecutter.project_name }}",
39-
},
40-
],
41-
footer: {
42-
message: "Released under the {{ cookiecutter.license }} License.",
43-
copyright:
44-
'Copyright © {% now "utc", "%Y" %} {{ cookiecutter.organization }}',
4568
},
46-
},
47-
});
69+
})
70+
);
Binary file not shown.
19.3 KB
Loading

0 commit comments

Comments
 (0)