LPL Resource library build using Vitepress
Download the repo and run yarn install
.
Requirements: node v16
(preffered) or node v14
. To check node version run node -v
command.
To open local dev server use yarn run site:dev
command.
You can edit any file directly from the edit on github link
at the bottom of the resource.
To edit home page
or resources
just edit the corresponding .md
files.
.
ββ π site
β ββ π .vitepress
β β
β ββ π resources <--- βΉοΈ Organize your files here
β β ββ π guides <--- βΉοΈ Folders structure generates paths eg: resources/guides/your-file-name
β β ββ π ...
β β
β ββ index.md <--- βΉοΈ The Home Page
β
ββ package.json
ββ README.md
.
You can links to internal or external items in the config-sidebar.js
file or config-nav.js
.
Always include the full file path for any resources that are nested in folders eg:
{
text: "Learning Guides",
link: "/resources/guides/wallet/wallet-setup",
}
The config files are located in .vitpress
directory:
.
ββ π site
β ββ π .vitepress
β β ββ π theme
β β ββ config.js
β β ββ config-sidebar.js <--- βΉοΈ Site sidebar links
β β ββ config-nav.js <--- βΉοΈ Top Navigation links
.
Warning Any modification, new file, file name or folder structure change must be manually added to the
config-sidebar.js
file orconfig-nav.js
. If you forget to update the files it will result in 404 pages.
Images and files can be added in two ways
- in public directory
- always published when the site is build.
- in other directories (private)
- only published if there are direct links from one of the articles.
If you have a lot of image or file resources for a guide consider making a dedicated folder for your article and name the article file as index.md
.
To Paste Image VS Code When you edit a file and paste an image into markdown it will automatically be saved in root folder of the file.
Vitepress is modular and most features can be modified or disables in the config.js
file.
Consult Vitepress docs for more information.
.
ββ π site
β ββ π .vitepress
β β ββ π theme
β β β ββcustom.css <--- βΉοΈ Custom css goes here
β β ββ config.js <--- βΉοΈ Social icons, footer, site title, description, any head links
.