feat: support home navigation

This commit is contained in:
DIYgod 2022-10-12 16:20:48 +01:00
parent 170034eb7a
commit d71a2c53a4
No known key found for this signature in database
GPG Key ID: D159328F47A80DCA
1 changed files with 7 additions and 1 deletions

View File

@ -50,7 +50,7 @@ const SortableNavigationItem: React.FC<{
id={`${item.id}-url`}
type="text"
value={item.url}
pattern="(https?://|/).+"
pattern="(https?://|/)(.*)?"
title="URL must start with / or http:// or https://"
onChange={(e: ChangeEvent<HTMLInputElement>) =>
updateItem(item.id, { url: e.target.value })
@ -134,6 +134,12 @@ export default function SiteSettingsNavigationPage() {
<p className="text-zinc-800 text-sm font-bold">
Tips: built-in pages
</p>
<p>
<span className="text-zinc-800">
Home page (use your own Label to replace the default Label):
</span>{" "}
<span className="bg-zinc-200 rounded-lg px-2">/</span>
</p>
<p>
<span className="text-zinc-800">Archives page:</span>{" "}
<span className="bg-zinc-200 rounded-lg px-2">/archives</span>