-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
about.page
executable file
·110 lines (82 loc) · 2.05 KB
/
about.page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
title: User
description: User feature.
icon: 'M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z'
color: '#4a8a90'
image: /lot/x/user/index.png
images:
- /lot/x/user/index.png
- /lot/x/user/index/1.png
- /lot/x/user/index/2.png
author: Taufik Nurrohman
type: Markdown
version: 2.0.2
...
### File
All you need to do after installing this extension is to create a page file in the `.\lot\user` folder. Name the page
after the user name you want. For example, here I will create a user with the name `@john-doe`:
~~~ .txt
.\
└── lot\
└── user\
└── john-doe.page ✔
~~~
And this will be what it contains:
~~~ .yaml
---
author: John Doe
type: Markdown
status: 1
...
I am the main author of [this site](http://127.0.0.1).
~~~
### Page
The user’s profile page can be accessed through the `http://127.0.0.1/user/john-doe` link. To go to the log-in page,
remove the user name from the link:
~~~ .txt
http://127.0.0.1/user
~~~
Please note that if the `.\lot\user\john-doe\pass.data` file does not exist, the password field will work as a password
generator. You can enter any password and `pass.data` file will be created automatically. This is how you would reset a
user password. Simply delete the `pass.data` file.
### Result
#### Without User Extension
The page in `.\lot\page\lorem-ipsum.page`:
~~~ .yaml
---
title: Page Title
author: John Doe
...
Page content.
~~~
To get the author data:
~~~ .php
<?= $page->author; ?>
~~~
#### With User Extension
The page in `.\lot\page\lorem-ipsum.page`:
~~~ .yaml
---
title: Page Title
author: '@john-doe'
...
Page content.
~~~
The user file in `.\lot\user\john-doe.page`:
~~~ .yaml
---
author: John Doe
link: 'http://example.com'
...
Page content.
~~~
To get the author data:
~~~ .html.php
<a href="<?= $page->author->link; ?>">
<?= $page->author; ?>
</a>
~~~
Or:
~~~ .php
<?= $page->author; ?>
~~~