-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Initial import from localai-website
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
- Loading branch information
Showing
67 changed files
with
6,112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "docs/themes/hugo-theme-relearn"] | ||
path = docs/themes/hugo-theme-relearn | ||
url = https://github.com/McShelby/hugo-theme-relearn.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM klakegg/hugo:ext-alpine | ||
|
||
RUN apk add git && \ | ||
git config --global --add safe.directory /src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# LocalAI website | ||
|
||
LocalAI documentation website | ||
|
||
## Requirement | ||
In this project, the Docsy theme component is pulled in as a Hugo module, together with other module dependencies: | ||
|
||
```bash | ||
$ hugo mod graph | ||
hugo: collected modules in 566 ms | ||
hugo: collected modules in 578 ms | ||
github.com/google/docsy-example github.com/google/docsy@v0.5.1-0.20221017155306-99eacb09ffb0 | ||
github.com/google/docsy-example github.com/google/docsy/dependencies@v0.5.1-0.20221014161617-be5da07ecff1 | ||
github.com/google/docsy/dependencies@v0.5.1-0.20221014161617-be5da07ecff1 github.com/twbs/bootstrap@v4.6.2+incompatible | ||
github.com/google/docsy/dependencies@v0.5.1-0.20221014161617-be5da07ecff1 github.com/FortAwesome/Font-Awesome@v0.0.0-20220831210243-d3a7818c253f | ||
``` | ||
|
||
If you want to do SCSS edits and want to publish these, you need to install `PostCSS` | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
## Running the website locally | ||
|
||
Building and running the site locally requires a recent `extended` version of [Hugo](https://gohugo.io). | ||
You can find out more about how to install Hugo for your environment in our | ||
[Getting started](https://www.docsy.dev/docs/getting-started/#prerequisites-and-installation) guide. | ||
|
||
Once you've made your working copy of the site repo, from the repo root folder, run: | ||
|
||
``` | ||
hugo server | ||
``` | ||
|
||
## Running a container locally | ||
|
||
You can run docsy-example inside a [Docker](https://docs.docker.com/) | ||
container, the container runs with a volume bound to the `docsy-example` | ||
folder. This approach doesn't require you to install any dependencies other | ||
than [Docker Desktop](https://www.docker.com/products/docker-desktop) on | ||
Windows and Mac, and [Docker Compose](https://docs.docker.com/compose/install/) | ||
on Linux. | ||
|
||
1. Build the docker image | ||
|
||
```bash | ||
docker-compose build | ||
``` | ||
|
||
1. Run the built image | ||
|
||
```bash | ||
docker-compose up | ||
``` | ||
|
||
> NOTE: You can run both commands at once with `docker-compose up --build`. | ||
|
||
1. Verify that the service is working. | ||
|
||
Open your web browser and type `http://localhost:1313` in your navigation bar, | ||
This opens a local instance of the docsy-example homepage. You can now make | ||
changes to the docsy example and those changes will immediately show up in your | ||
browser after you save. | ||
|
||
### Cleanup | ||
|
||
To stop Docker Compose, on your terminal window, press **Ctrl + C**. | ||
|
||
To remove the produced images run: | ||
|
||
```console | ||
docker-compose rm | ||
``` | ||
For more information see the [Docker Compose | ||
documentation](https://docs.docker.com/compose/gettingstarted/). | ||
|
||
## Troubleshooting | ||
|
||
As you run the website locally, you may run into the following error: | ||
|
||
``` | ||
➜ hugo server | ||
|
||
INFO 2021/01/21 21:07:55 Using config file: | ||
Building sites … INFO 2021/01/21 21:07:55 syncing static files to / | ||
Built in 288 ms | ||
Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): resource "scss/scss/main.scss_9fadf33d895a46083cdd64396b57ef68" not found in file cache | ||
``` | ||
This error occurs if you have not installed the extended version of Hugo. | ||
See this [section](https://www.docsy.dev/docs/get-started/docsy-as-module/installation-prerequisites/#install-hugo) of the user guide for instructions on how to install Hugo. | ||
Or you may encounter the following error: | ||
``` | ||
➜ hugo server | ||
|
||
Error: failed to download modules: binary with name "go" not found | ||
``` | ||
This error occurs if you have not installed the `go` programming language on your system. | ||
See this [section](https://www.docsy.dev/docs/get-started/docsy-as-module/installation-prerequisites/#install-go-language) of the user guide for instructions on how to install `go`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
# this is a required setting for this theme to appear on https://themes.gohugo.io/ | ||
# change this to a value appropriate for you; if your site is served from a subdirectory | ||
# set it like "https://example.com/mysite/" | ||
baseURL = "https://localai.io/" | ||
|
||
# canonicalization will only be used for the sitemap.xml and index.xml files; | ||
# if set to false, a site served from a subdirectory will generate wrong links | ||
# inside of the above mentioned files; if you serve the page from the servers root | ||
# you are free to set the value to false as recommended by the official Hugo documentation | ||
canonifyURLs = true # true -> all relative URLs would instead be canonicalized using baseURL | ||
# required value to serve this page from a webserver AND the file system; | ||
# if you don't want to serve your page from the file system, you can also set this value | ||
# to false | ||
relativeURLs = true # true -> rewrite all relative URLs to be relative to the current content | ||
# if you set uglyURLs to false, this theme will append 'index.html' to any branch bundle link | ||
# so your page can be also served from the file system; if you don't want that, | ||
# set disableExplicitIndexURLs=true in the [params] section | ||
uglyURLs = false # true -> basic/index.html -> basic.html | ||
|
||
# the directory where Hugo reads the themes from; this is specific to your | ||
# installation and most certainly needs be deleted or changed | ||
#themesdir = "../.." | ||
# yeah, well, obviously a mandatory setting for your site, if you want to | ||
# use this theme ;-) | ||
theme = "hugo-theme-relearn" | ||
|
||
# the main language of this site; also an automatic pirrrate translation is | ||
# available in this showcase | ||
languageCode = "en" | ||
|
||
# make sure your defaultContentLanguage is the first one in the [languages] | ||
# array below, as the theme needs to make assumptions on it | ||
defaultContentLanguage = "en" | ||
|
||
# the site's title of this showcase; you should change this ;-) | ||
title = "LocalAI Documentation" | ||
|
||
# We disable this for testing the exampleSite; you must do so too | ||
# if you want to use the themes parameter disableGeneratorVersion=true; | ||
# otherwise Hugo will create a generator tag on your home page | ||
disableHugoGeneratorInject = true | ||
|
||
[outputs] | ||
# add JSON to the home to support Lunr search; This is a mandatory setting | ||
# for the search functionality | ||
# add PRINT to home, section and page to activate the feature to print whole | ||
# chapters | ||
home = ["HTML", "RSS", "PRINT", "SEARCH", "SEARCHPAGE"] | ||
section = ["HTML", "RSS", "PRINT"] | ||
page = ["HTML", "RSS", "PRINT"] | ||
|
||
[markup] | ||
[markup.highlight] | ||
# if `guessSyntax = true`, there will be no unstyled code even if no language | ||
# was given BUT Mermaid and Math codefences will not work anymore! So this is a | ||
# mandatory setting for your site if you want to use Mermaid or Math codefences | ||
guessSyntax = true | ||
|
||
# here in this showcase we use our own modified chroma syntax highlightning style | ||
# which is imported in theme-relearn-light.css / theme-relearn-dark.css; | ||
# if you want to use a predefined style instead: | ||
# - remove the following `noClasses` | ||
# - set the following `style` to a predefined style name | ||
# - remove the `@import` of the self-defined chroma stylesheet from your CSS files | ||
# (here eg.: theme-relearn-light.css / theme-relearn-dark.css) | ||
noClasses = false | ||
style = "tango" | ||
|
||
[markup.goldmark.renderer] | ||
# activated for this showcase to use HTML and JavaScript; decide on your own needs; | ||
# if in doubt, remove this line | ||
unsafe = true | ||
|
||
# allows `hugo server` to display this showcase in IE11; this is used for testing, as we | ||
# are still supporting IE11 - although with degraded experience; if you don't care about | ||
# `hugo server` or browsers of ancient times, fell free to remove this whole block | ||
[server] | ||
[[server.headers]] | ||
for = "**.html" | ||
[server.headers.values] | ||
X-UA-Compatible = "IE=edge" | ||
|
||
# showcase of the menu shortcuts; you can use relative URLs linking | ||
# to your content or use fully-quallified URLs to link outside of | ||
# your project | ||
[languages] | ||
[languages.en] | ||
title = "LocalAI documentation" | ||
weight = 1 | ||
languageName = "English" | ||
[languages.en.params] | ||
landingPageName = "<i class='fas fa-home'></i> Home" | ||
[[languages.en.menu.shortcuts]] | ||
name = "<i class='fas fa-home'></i> Home" | ||
url = "/" | ||
weight = 1 | ||
[[languages.en.menu.shortcuts]] | ||
name = "<i class='fab fa-fw fa-github'></i> GitHub repo" | ||
identifier = "ds" | ||
url = "https://github.com/go-skynet/LocalAI" | ||
weight = 10 | ||
|
||
[[languages.en.menu.shortcuts]] | ||
name = "<i class='fas fa-fw fa-camera'></i> Examples" | ||
url = "https://github.com/go-skynet/LocalAI/tree/master/examples/" | ||
weight = 11 | ||
|
||
[[languages.en.menu.shortcuts]] | ||
name = "<i class='fas fa-fw fa-images'></i> Model Gallery" | ||
url = "https://github.com/go-skynet/model-gallery" | ||
weight = 12 | ||
|
||
[[languages.en.menu.shortcuts]] | ||
name = "<i class='fas fa-fw fa-download'></i> Container images" | ||
url = "https://quay.io/repository/go-skynet/local-ai" | ||
weight = 20 | ||
#[[languages.en.menu.shortcuts]] | ||
# name = "<i class='fas fa-fw fa-bullhorn'></i> Credits" | ||
# url = "more/credits/" | ||
# weight = 30 | ||
|
||
[[languages.en.menu.shortcuts]] | ||
name = "<i class='fas fa-fw fa-tags'></i> Releases" | ||
url = "https://github.com/go-skynet/LocalAI/releases" | ||
weight = 40 | ||
|
||
|
||
# mounts are only needed in this showcase to access the publicly available screenshots; | ||
# remove this section if you don't need further mounts | ||
[module] | ||
[[module.mounts]] | ||
source = 'archetypes' | ||
target = 'archetypes' | ||
[[module.mounts]] | ||
source = 'assets' | ||
target = 'assets' | ||
[[module.mounts]] | ||
source = 'content' | ||
target = 'content' | ||
[[module.mounts]] | ||
source = 'data' | ||
target = 'data' | ||
[[module.mounts]] | ||
source = 'i18n' | ||
target = 'i18n' | ||
[[module.mounts]] | ||
source = '../images' | ||
target = 'static/images' | ||
[[module.mounts]] | ||
source = 'layouts' | ||
target = 'layouts' | ||
[[module.mounts]] | ||
source = 'static' | ||
target = 'static' | ||
|
||
|
||
# settings specific to this theme's features; choose to your likings and | ||
# consult this documentation for explaination | ||
[params] | ||
editURL = "https://github.com/mudler/LocalAI/edit/master/docs/content/" | ||
description = "Documentation for LocalAI" | ||
author = "Ettore Di Giacinto" | ||
showVisitedLinks = true | ||
collapsibleMenu = true | ||
disableBreadcrumb = false | ||
disableInlineCopyToClipBoard = true | ||
disableNextPrev = false | ||
disableLandingPageButton = true | ||
breadcrumbSeparator = ">" | ||
titleSeparator = "::" | ||
themeVariant = [ "auto", "relearn-bright", "relearn-light", "relearn-dark", "learn", "neon", "blue", "green", "red" ] | ||
themeVariantAuto = [ "relearn-light", "relearn-dark" ] | ||
disableSeoHiddenPages = true | ||
# this is to index search for your native language in other languages, too (eg. | ||
# pir in this showcase) | ||
additionalContentLanguage = [ "en" ] | ||
# this is for the stylesheet generator to allow for interactivity in Mermaid | ||
# graphs; you usually will not need it and you should remove this for | ||
# security reasons | ||
mermaidInitialize = "{ \"securityLevel\": \"loose\" }" | ||
mermaidZoom = true |
Oops, something went wrong.