Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lorenzoh/pollenjl-frontend
The Svelte frontend for Pollen.jl
https://github.com/lorenzoh/pollenjl-frontend
Last synced: 2 months ago
JSON representation
The Svelte frontend for Pollen.jl
- Host: GitHub
- URL: https://github.com/lorenzoh/pollenjl-frontend
- Owner: lorenzoh
- Created: 2021-10-17T17:16:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-27T10:13:37.000Z (about 2 years ago)
- Last Synced: 2023-03-03T23:10:10.332Z (almost 2 years ago)
- Language: Svelte
- Homepage:
- Size: 7.02 MB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pollen.jl frontend
This is the SvelteKit frontend for building rich documentation websites using Pollen.jl.
## Installing
Clone the repository and install the npm dependencies:
```julia
git clone https://github.com/lorenzoh/pollenjl-frontend
cd pollenjl-frontend
npm install
```## Developing
To develop this frontend, first start the Pollen.jl dev server for your project, without serving a frontend:
```julia
using Pollen
Pollen.servedocs(@__MODULE__, MyPackage; frontend=false)
```This will be running on localhost:8000.
Then run the Svelte dev server in this repo:
```sh
npm run dev
```Navigate to localhost:3000 to see your page.
## Building
This frontend can be prerendered to static pages for deployment on GitHub Pages.
First we build the Pollen.jl project as JSON files to the frontend's static assets directory:
```julia
Pollen.rewritesources!(project)
Pollen.build(FileBuilder(JSONFormat(), "path/to/pollenjl-frontend/static"), project)
```And then we can run SvelteKit's build step to prerender:
```sh
npm run build
```