0
0
Fork
You've already forked website
0
forked from bookstack/website
The code for the main site, Includes BookStack docs.
SCSS 46.3%
HTML 42.5%
JavaScript 5.8%
Perl 5.3%
2024年11月19日 17:08:52 +00:00
.github Create FUNDING.yml 2021年09月15日 22:22:40 +01:00
content Added new secruity release to updates page 2024年11月13日 12:11:38 +00:00
data/authors Added 500 stars blogpost and improved post meta 2017年03月05日 18:12:15 +00:00
hacks @1c29608918 Updated hacks 2024年11月19日 17:08:52 +00:00
search Updated npm deps, removed old searchbar content 2024年01月28日 17:55:01 +00:00
static Added v24.10.2 post 2024年11月13日 12:00:51 +00:00
themes/bookstack Removed twitter links, added extra Codeberg links, updated hacks 2024年08月14日 16:01:21 +01:00
.gitattributes Prepared 10k stars blogpost 2022年09月13日 14:01:36 +01:00
.gitignore Added compression guidance for search DB file 2024年01月28日 18:59:16 +00:00
.gitmodules Updated hacks submodule url 2024年07月27日 12:02:22 +01:00
config.toml Organised blogposts into per-year folders 2023年08月04日 22:06:11 +01:00
LICENSE Updated post date, added more directories to license 2024年05月21日 10:53:51 +01:00
package-lock.json Started php-updates page, updated sass packages, added post image 2024年05月08日 23:46:08 +01:00
package.json Fixed build/deploy ordering 2024年02月02日 12:38:32 +00:00
readme.md Updated GitHub references to new Codeberg locations 2024年07月27日 11:54:35 +01:00

BookStack Site, Documentation & Blog

This project holds all the data for the https://www.bookstackapp.com/

This site is built using Hugo. Images are stored using git-lfs. The "extended" version of hugo must be used (Has support for certain features like WebP resize).

Data Locations

  • Blog Posts - content/posts
  • Docs - content/docs
  • Theme - themes/bookstack

Hacks

The website also contains a repository of customization hacks which can be found at the /hacks part of the site. These are managed via a separate "Hacks" repo which is part of this repository as a git submodule. A symlink is then used to point the content/hacks directory to the hacks/content directory, where hacks is the submodule location.

Theme

The theme is custom made with snippets taken from the hugo capser theme.

SCSS is used for the styling. Install NPM dependencies via npm install or yarn then you can use npm run build to build the css and site once or npm run dev to watch for changes.

Search is performed using webidx, which essentially builds a sqlite database search index, that is then loaded to browser upon search then queried locally in-browser via sql.js.

This files required are all in this repo, and hacked to suit our use-case. The script to build the index is located at search/webidx.pl, and can be ran via the npm script

npm run build:search

Note: you may need to install some dependencies to run the script see the search/webidx.pl for more information.

The above command will build the sqlite index database to static/search.db, intended to be deployed to production. There is also a npm run build:search:compress command to compress the database file using brotli and gzip (requires both to be installed). In production use, these compressed files should be deployed then served from their compressed state where possible. Here's relevant config for nginx:

location ~* \.(db)$ {
 brotli_static on;
 gzip_static on;
}

Much of the search UI handling logic can be found in our themes/bookstack/static/js/scripts.js file.