Fixing toc for github pages
This commit is contained in:
parent
92a9e21e7c
commit
48fb647c16
|
@ -6,6 +6,7 @@ url: "" # The base hostname & protocol for your site, e.g. http://example.com
|
|||
|
||||
layouts_dir: _layouts
|
||||
data_dir: _data
|
||||
includes_dir: _includes
|
||||
|
||||
favicon: favicon.ico
|
||||
|
||||
|
@ -19,4 +20,4 @@ headbuttontext: Get LibreTime
|
|||
|
||||
# Build settings
|
||||
plugins:
|
||||
- jekyll-toc
|
||||
- kramdown
|
|
@ -1,8 +1,6 @@
|
|||
topnav:
|
||||
- page: Introduction
|
||||
url: index
|
||||
- page: Docs
|
||||
url: scheduling-shows
|
||||
url: quickstart
|
||||
- page: Github
|
||||
url: https://github.com/LibreTime/libretime
|
||||
- page: <svg class="bi bi-heart-fill" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M8 1.314C12.438-3.248 23.534 4.735 8 15-7.534 4.736 3.562-3.248 8 1.314z"/></svg> Sponsor
|
||||
|
@ -13,6 +11,8 @@ docsnav:
|
|||
contents:
|
||||
- page: 1. Quick Install
|
||||
url: quickstart
|
||||
- page: 1.1 Reverse Proxy
|
||||
url: reverse-proxy
|
||||
- page: 2. Host Configuration
|
||||
url: host-configuration
|
||||
- page: 3. Setting the Server Time
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
{% capture tocWorkspace %}
|
||||
{% comment %}
|
||||
Version 1.0.12
|
||||
https://github.com/allejo/jekyll-toc
|
||||
|
||||
"...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
|
||||
|
||||
Usage:
|
||||
{% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
|
||||
|
||||
Parameters:
|
||||
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
|
||||
|
||||
Optional Parameters:
|
||||
* sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
|
||||
* class (string) : '' - a CSS class assigned to the TOC
|
||||
* id (string) : '' - an ID to assigned to the TOC
|
||||
* h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
|
||||
* h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
|
||||
* ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
|
||||
* item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
|
||||
* baseurl (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
|
||||
* anchor_class (string) : '' - add custom class(es) for each anchor element
|
||||
* skipNoIDs (bool) : false - skip headers that do not have an `id` attribute
|
||||
|
||||
Output:
|
||||
An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
|
||||
generate the table of contents and will NOT output the markdown given to it
|
||||
{% endcomment %}
|
||||
|
||||
{% capture my_toc %}{% endcapture %}
|
||||
{% assign orderedList = include.ordered | default: false %}
|
||||
{% assign skipNoIDs = include.skipNoIDs | default: false %}
|
||||
{% assign minHeader = include.h_min | default: 1 %}
|
||||
{% assign maxHeader = include.h_max | default: 6 %}
|
||||
{% assign nodes = include.html | split: '<h' %}
|
||||
{% assign firstHeader = true %}
|
||||
|
||||
{% capture listModifier %}{% if orderedList %}1.{% else %}-{% endif %}{% endcapture %}
|
||||
|
||||
{% for node in nodes %}
|
||||
{% if node == "" %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% if skipNoIDs == true %}
|
||||
{% unless node contains "id=" %}
|
||||
{% continue %}
|
||||
{% endunless %}
|
||||
{% endif %}
|
||||
|
||||
{% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
|
||||
|
||||
{% if headerLevel < minHeader or headerLevel > maxHeader %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% assign _workspace = node | split: '</h' %}
|
||||
|
||||
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
|
||||
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
|
||||
{% assign html_id = _idWorkspace[0] %}
|
||||
|
||||
{% assign _classWorkspace = _workspace[0] | split: 'class="' %}
|
||||
{% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
|
||||
{% assign html_class = _classWorkspace[0] %}
|
||||
|
||||
{% if html_class contains "no_toc" %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% if firstHeader %}
|
||||
{% assign firstHeader = false %}
|
||||
{% assign minHeader = headerLevel %}
|
||||
{% endif %}
|
||||
|
||||
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
|
||||
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
|
||||
|
||||
{% assign indentAmount = headerLevel | minus: minHeader %}
|
||||
{% assign space = '' %}
|
||||
{% for i in (1..indentAmount) %}
|
||||
{% assign space = space | prepend: ' ' %}
|
||||
{% endfor %}
|
||||
|
||||
{% if include.item_class and include.item_class != blank %}
|
||||
{% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% capture anchor_body %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
|
||||
{% capture anchor_body %}{{ anchor_body | replace: "|", "\|" }}{% endcapture %}
|
||||
|
||||
{% if html_id %}
|
||||
{% capture list_item %}[{{ anchor_body }}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% endcapture %}
|
||||
{% else %}
|
||||
{% capture list_item %}{{ anchor_body }}{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% capture my_toc %}{{ my_toc }}
|
||||
{{ space }}{{ listModifier }} {{ listItemClass }} {{ list_item }}{% if include.anchor_class %}{:.{{ include.anchor_class }}}{% endif %}{% endcapture %}
|
||||
{% endfor %}
|
||||
|
||||
{% if include.class and include.class != blank %}
|
||||
{% capture my_toc %}{:.{{ include.class }}}
|
||||
{{ my_toc | lstrip }}{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% if include.id %}
|
||||
{% capture my_toc %}{: #{{ include.id }}}
|
||||
{{ my_toc | lstrip }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}
|
|
@ -83,12 +83,10 @@ layout: default
|
|||
<h2 class="allcaps navbar-brand section-heading"> {{ page.title }} </h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toc">
|
||||
{% toc %}
|
||||
<hr class="my-4">
|
||||
</div>
|
||||
<!-- This is the main content of the page getting pulled from the MDs -->
|
||||
<div class="content">
|
||||
<div class="toc" >{% include toc.html html=content class=toc ordered=true %}</div>
|
||||
<hr class="my-4">
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
section{padding:4rem 0}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<section class="bg-primary">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 mx-auto text-center">
|
||||
<h2 class="section-heading text-white"> {{ page.title }} </h2>
|
||||
<hr class="light my-4">
|
||||
<p class="text-faded mb-4">
|
||||
{{ page.blurb }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ content }}
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -79,7 +79,6 @@
|
|||
{{ site.headsubtext}}
|
||||
</p>
|
||||
<a class="btn btn-primary btn-xl js-scroll-trigger" href="{{ site.headbuttonurl }}">{{ site.headbuttontext }}</a>
|
||||
<a class="btn btn-primary btn-xl js-scroll-trigger" href="scheduling-shows">Read the Docs</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Contributing to LibreTime
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
> LibreTime is a fork of AirTime due to stalled development of the FLOSS version. For background on this,
|
||||
|
|
|
@ -320,10 +320,10 @@ padding: 10px 20px;
|
|||
}
|
||||
|
||||
/* TOC */
|
||||
.section-nav {
|
||||
.toc {
|
||||
background-color: #fff;
|
||||
margin: 5px 0;
|
||||
padding: 10px 30px;
|
||||
margin: 0px 0;
|
||||
padding: 10px 0px;
|
||||
border: 1px solid #212529;
|
||||
border-radius: 0px;
|
||||
border-left: 10px solid #212529;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: FreeIPA Configuration
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
You can configure LibreTime to delegate all authentication to a FreeIPA server.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Host configuration
|
||||
toc: true
|
||||
---
|
||||
|
||||
The streaming host configuration for LibreTime is shown in the file */etc/airtime/liquidsoap.cfg* which is automatically generated by the **Streams** page, found on the **System** menu of the LibreTime administration interface. For this reason, you would not normally edit the streaming configuration manually, as any changes are likely to be overwritten by the administration interface.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Icecast and Shoutcast Stream Configuration
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
LibreTime supports direct connection to two popular streaming media servers, the open source **Icecast** (<http://www.icecast.org>) and the proprietary **SHOUTcast** (<http://www.shoutcast.com>). Apart from the software license, the main difference between these two servers is that Icecast supports simultaneous MP3, AAC, Ogg Vorbis or Ogg Opus streaming from LibreTime, whereas SHOUTcast supports MP3 and AAC streams but not Ogg Vorbis or Opus. The royalty-free Ogg Vorbis format has the advantage of better sound quality than MP3 at lower bitrates, which has a direct impact on the amount of bandwidth that your station will require to serve the same number of listeners. Ogg Opus also benefits from good sound quality at low bitrates, with the added advantage of lower latency than other streaming formats. Opus is now an IETF standard (<http://tools.ietf.org/html/rfc6716>) and requires Icecast 2.4 or later to be installed on the streaming server.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Modifying the LibreTime interface
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Dashboard and Calendar
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
# Dashboard {#dashboard}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Broadcasting live with MIXXX or B.U.T.T.
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
This how to is intended for DJs using BUTT or MIXXX to stream to their LibreTime
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Playlists and Smartblocks
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
# Playlists {#playlists}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Playout History
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
# History {#history}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Podcasts and Webstreams
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
<html>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Preparing Media for LibreTime
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
Before uploading media to an LibreTime server, there are a number of factors which should be considered. Getting your ingest workflow right will save you a lot of time later.
|
||||
|
@ -92,6 +92,6 @@ In the output from vorbisgain, *Peak* is the maximum sample value of the file be
|
|||
|
||||
Before importing media, it is good practice to check for any silent sections in the media files. While LibreTime compensates for leading and trailing silence with the use of automatic cue-in and cue-out points****, it may be preferable to trim these files to the intended length before upload. This is because media in the LibreTime library could potentially be re-used in many different systems. **Audacity** is a cross-platform editor suitable for the task of trimming audio files, available from [http://audacity.sourceforge.net/](http://audacity.sourceforge.net "http://sourceforge.net/projects/dr14tmeter/")
|
||||
|
||||
Very quiet introductions or over-long fades can also lead to apparent gaps in your broadcast playout. Some audio CDs feature a 'hidden track' at the end, which in fact uses a long period of silence within the final track, rather than an actual separate track on the disc. This means that CD encoding programs will often encode both the hidden material and the silence in the media file. For example, the track *Debra* from the CD *Midnite Vultures* by *Beck* includes hidden material preceded by seven minutes of silence, as shown in the screen shot from Audacity below.
|
||||
Very quiet introductions or over-long fades can also lead to apparent gaps in your broadcast playout. Some audio CDs feature a 'hidden track' at the end, which in fact uses a long period of silence within the final track, rather than an actual separate track on the disc. This means that CD encoding programs will often encode both the hidden material and the silence in the media file. For example, the track "Debra" from the CD *Midnite Vultures* by Beck includes hidden material preceded by seven minutes of silence, as shown in the screen shot from Audacity below.
|
||||
|
||||

|
||||
|
|
|
@ -137,7 +137,7 @@ ensure that your RabbitMQ configuration and user permissions are safe.
|
|||
### RabbitMQ hostname
|
||||
|
||||
RabbitMQ requires a fixed and resolvable hostname (see
|
||||
[the docs](http://www.rabbitmq.com/ec2.html#issues-hostname)), which is normal
|
||||
[the docs](http://www.rabbitmq.com/ec2.html#issues-hostname), which is normal
|
||||
for a server. For a desktop or laptop machine where the hostname changes
|
||||
frequently or is not resolvable, this issue may prevent RabbitMQ from starting.
|
||||
When using a desktop or laptop computer with a dynamic IP address, such as an
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Quick Install
|
||||
layout: docs
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
> Note: this guide is assuming you are using Ubuntu 18.04 LTS for installation, which comes with `ufw` and `netplan`,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Reverse Proxy Connections
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
In some deployments, the LibreTime server is deployed behind a reverse proxy,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Setting the Server Time
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
# Setting the server time
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Settings
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Setting up SSL
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
To increase the security of your server, you can enable encrypted access to the LibreTime administration interface, and direct your users towards this more secure login page. The main advantage of using this encryption is that your remote users' login names and passwords are not sent in plain text across the public Internet or untrusted local networks, such as shared Wi-Fi access points.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Troubleshooting
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
LibreTime is effectively a web site running on a LAPP stack, so individual components of the system can be started, stopped, restarted or checked in the server console using the **systemctl** command:
|
||||
|
@ -17,13 +17,11 @@ For example, to restart the Airtime playout engine, you could enter the command:
|
|||
|
||||
sudo systemctl restart libretime-playout
|
||||
|
||||
Log files {#logs}
|
||||
---------
|
||||
# Log files {#logs}
|
||||
|
||||
Airtime stores log files under the directory path */var/log/airtime/* which can be useful for diagnosing the cause of any problems. Copies of these log files may be requested by LibreTime developers while they are providing technical support for your Airtime deployment.
|
||||
|
||||
Test tones {#tones}
|
||||
----------
|
||||
# Test tones {#tones}
|
||||
|
||||
If you need to test your computer's soundcard, you can use `speaker-test`, a tone generator for ALSA.
|
||||
This does not come installed with LibreTime but can be installed with `sudo apt install speaker-test`.
|
||||
|
@ -53,20 +51,19 @@ Where:
|
|||
-h show help menu
|
||||
```
|
||||
|
||||
RabbitMQ hostname changes {#rabbitmq}
|
||||
-------------------------
|
||||
# RabbitMQ hostname changes
|
||||
|
||||
If the Airtime logs indicate failures to connect to the RabbitMQ server, such as:
|
||||
```
|
||||
2013-10-31 08:21:11,255 ERROR - [pypomessagehandler.py : main() : line
|
||||
99] - Error connecting to RabbitMQ Server. Trying again in few seconds
|
||||
|
||||
2013-10-31 08:21:11,255 ERROR - [pypomessagehandler.py : main() : line
|
||||
99] - Error connecting to RabbitMQ Server. Trying again in few seconds
|
||||
|
||||
2013-10-31 08:21:11,255 ERROR - \[pypomessagehandler.py : main() : line 99\] - Error connecting to RabbitMQ Server. Trying again in few seconds - See more at: http://forum.sourcefabric.org/discussion/16050/\#sthash.W8OJrNFm.dpuf
|
||||
|
||||
2013-10-31 08:21:11,255 ERROR - \[pypomessagehandler.py : main() : line 99\] - Error connecting to RabbitMQ Server. Trying again in few seconds - See more at: http://forum.sourcefabric.org/discussion/16050/\#sthash.W8OJrNFm.dpuf
|
||||
```
|
||||
but the RabbitMQ server is running normally, this error might be due to a change in the server's hostname since Airtime installation. Directory names under */var/lib/rabbitmq/mnesia/* indicate that RabbitMQ's database files are organised according to the hostname of the server, for example:
|
||||
|
||||
rabbit@airtime
|
||||
|
||||
```
|
||||
rabbit@airtime
|
||||
```
|
||||
where the hostname is *airtime.example.com*. If the hostname has changed, it may be necessary to reconfigure RabbitMQ manually, as follows:
|
||||
|
||||
1. Delete the files in */var/lib/rabbitmq/mnesia/*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Upgrading LibreTime
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
## LibreTime versioning
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Managing Users
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
> Note: if your Airtime server is accessible from the public Internet (ex. being hosted in a cloud VM)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
layout: page
|
||||
title: Using Vagrant and Virtualbox for developing LibreTime
|
||||
toc: true
|
||||
|
||||
---
|
||||
|
||||
> Prerequisites: git, [Vagrant](https://vagrantup.com), libvirt or VirturalBox
|
||||
> Prerequisites: git, [Vagrant](https://vagrantup.com), libvirt or VirtualBox
|
||||
|
||||
# VirtualBox
|
||||
|
||||
|
|
Loading…
Reference in New Issue