Attempting embed of Algolia Search

This commit is contained in:
Zachary Klosko 2020-11-11 22:41:53 -05:00
parent 55258882c9
commit 578e58ccff
10 changed files with 134 additions and 10 deletions

View File

@ -1,7 +1,7 @@
title: LibreTime
description: An open source radio automation server made for (and by) low-power FM stations and the rest of us.
logo: 144px.png
baseurl: "zklosko.github.io/libretime/" # The subpath of your site, e.g. /blog
baseurl: "" # The subpath of your site, e.g. /blog
url: "https://libretime.org" # The base hostname & protocol for your site, e.g. http://example.com
layouts_dir: _layouts

View File

@ -46,17 +46,17 @@ your desktop, open up a favorite editor and make some changes, and then commit,
Knowledge on how to use [Github](https://guides.github.com/activities/hello-world/) and [Git](https://git-scm.com/docs/gittutorial)
will suit you well, use the links for a quick 101.
### Testing LibreTime in Vagrant
## Testing LibreTime
Before submitting code to the project, it's a good idea to test it first. To do this, it's easiest to install
LibreTime in a virtural machine on your local system or in a cloud VM. Instructions on how to set up a virtural
instance of LibreTime with Vagrant are located [here](/docs/vagrant).
LibreTime in a virtural machine on your local system or in a cloud VM. We have instructions for setting up a virtural
instance of LibreTime with [Vagrant](/docs/vagrant) and [Multipass](/docs/multipass).
If you would like to try LibreTime in a Docker image,
Odclive has instructions [here](https://github.com/kessibi/libretime-docker) for setting up a test image
and a more persistant install.
### Modifying the Database
## Modifying the Database
LibreTime is designed to work with a [PostgreSQL](https://www.postgresql.org/) database server running locally.
LibreTime uses [PropelORM](http://propelorm.org) to interact with the ZendPHP components and create the database.

View File

@ -267,11 +267,11 @@ If the server time zone is not appropriate for integration with your station's o
This command opens a menu in which you can select the continent that you require, by pressing the Enter key.
![](img/Screenshot15-Configuring_tzdata.png)
![](/img/Screenshot15-Configuring_tzdata.png)
The next step is to select your nearest city, again by pressing the Enter key. The appropriate time zone is selected according to the information that you have entered.
![](img/Screenshot16-Configure_city.png)
![](/img/Screenshot16-Configure_city.png)
The console output from the **dpkg-reconfigure tzdata** command will confirm the new setting:

43
docs/_docs/multipass.md Normal file
View File

@ -0,0 +1,43 @@
---
title: Multipass
layout: article
category: dev
---
[Multipass](https://multipass.run) is a tool for easily setting up Ubuntu VMs on Windows, Mac, and Linux.
Similar to Docker, Multipass works through a CLI. To use, clone this repo and then open a Terminal (or Command Prompt) inside the created folder and run
```
multipass launch bionic -n ltTEST --cloud-init multipass.yaml
multipass shell ltTEST
```
Multipass isn't currently able to do an automated install from the cloud-init script.
After you enter the shell for the first time, you will still need to run the install script for LibreTime.
```
sudo ./libretime/install -fiap
```
The IP address of your new VM can be found by running `multipass list`. Copy and paste it into your web browser to access the LibreTime interface and complete the setup wizard.
You can stop the VM with `multipass stop ltTEST` and restart with `multipass start ltTEST`.
If you want to delete the image and start again, run `multipass delete ltTEST && multipass purge`.
---
### Cloud-init options in libretimeTest.yaml
You may wish to change the below fields as per your location.
```
timezone: America/New York # change as needed
ntp:
pools: ['north-america.pool.ntp.org']
servers: ['0.north-america.pool.ntp.org', '0.pool.ntp.org']
```
If you are running your forked repo of LibreTime for testing purposes,
modify the URL on this line:
```
- cd / && git clone https://github.com/LibreTime/libretime.git
```

View File

@ -7,8 +7,26 @@ category: manager
## How to
### 1. Prepare your studio
### 2. Install Ubuntu 18.04 LTS
The server or desktop you plan to run Libretime on should have a built-in soundcard
and ethernet port. A wired approach is strongly recommended over a wireless one.
### 2. Install Ubuntu Server 18.04 LTS
Download Ubuntu Server [here](https://ubuntu.com/download/server) (look under Option 3).
A standard install is recommended, on a RAID 1 array if possible (not required, but recommended).
Installation checklist:
- Set correct timezone
- Sync system with national time servers
- Open firewall ports 80 and 8000
- Enable the SSH server for easier remote access (optional)
### 3. Install Libretime
See the [install page](/install).
### 4. Configure soundcard
### 5. Set up SSH tunneling (optional)

View File

@ -2,7 +2,7 @@
<div class="container ">
<div class="row justify-content-md-between">
<div class="col-md-12 col-lg-4 mb-4 mr-lg-auto">
<img class="mb-3" src="/img/logo.png" alt="Docs UI Kit" style="width: 170px;">
<img class="mb-3" src="/img/logo.png" alt="Libretime" style="width: 170px;">
<p class="small font-weight-light mb-3">LibreTime is an open source radio automation and broadcasting solution helping communities broadcast with ease.</p>
</div>

View File

@ -13,6 +13,11 @@
<!-- Plugin CSS -->
<link href="/vendor/magnific-popup/magnific-popup.css" rel="stylesheet">
<!-- Algolia -->
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.4/dist/instantsearch.min.css">
<script src="https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.4"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.4/dist/instantsearch-theme-algolia.min.css">
<!-- Custom styles for this template -->
<link href="/css/creative.min.css" rel="stylesheet">

View File

@ -16,6 +16,11 @@
<li class="nav-item ml-lg-4 mb-2 mb-lg-0">
<a class="nav-link px-0" href="https://github.com/libretime/libretime" target="_blank"><i class="fab fa-github mr-1"></i> Star on Github</a>
</li>
<li class="nav-item ml-lg-4 mb-2 mb-lg-0">
<div id="search-searchbar">
<!-- SearchBox widget will appear here -->
</div>
</li>
</ul>
</div>
</div>

View File

@ -41,3 +41,36 @@
scrollToTop();
}
</script>
<!-- Algolia Search -->
<script>
const search = instantsearch({
appId: 'latency',
apiKey: '6be0576ff61c053d5f9a3225e2a90f76',
indexName: 'instant_search',
routing: true
});
search.start();
</script>
<script>
const search = instantsearch(options);
// initialize SearchBox
search.addWidget(
instantsearch.widgets.searchBox({
container: '#search-searchbox',
placeholder: 'Search the docs'
})
);
// initialize hits widget
search.addWidget(
instantsearch.widgets.hits({
container: '#hits'
})
);
search.start();
</script>

20
multipass.yml Normal file
View File

@ -0,0 +1,20 @@
# Maintainer: Zachary Klosko (kloskoz@vcu.edu)
hostname: libretimeTest
timezone: America/New York # change as needed
ntp:
pools: ['north-america.pool.ntp.org']
servers: ['0.north-america.pool.ntp.org', '0.pool.ntp.org']
password: hackme
chpasswd: { expire: False }
packages:
- git
apt_update: true
apt_upgrade: true
# Clone repo on init (Change repo url if needed)
# If you need to clone a branch, use git clone --branch branchname repourl
runcmd:
- git clone https://github.com/LibreTime/libretime.git