Skip to content

Commit

Permalink
Merge branch 'main' into tintou/use_submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisgoddard authored Mar 24, 2024
2 parents 2bc767a + 8c35013 commit 458b62c
Show file tree
Hide file tree
Showing 15 changed files with 90 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
submodules: true

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ jobs:
run: |
export DEBIAN_FRONTEND=noninteractive
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends software-properties-common
sudo apt-get update -qq
sudo apt-get install -qq --no-install-recommends software-properties-common
sudo add-apt-repository -y ppa:vala-team/daily
sudo apt-get update -y
sudo apt-get update -qq
curl -O https://repo.manticoresearch.com/manticore-repo.noarch.deb
sudo dpkg -i manticore-repo.noarch.deb
sudo apt-get update -qq
sudo apt-get install \
-y \
-qq \
--no-install-recommends \
gcc \
libgee-0.8-dev \
Expand All @@ -36,14 +39,15 @@ jobs:
libvaladoc-0.58-dev \
php \
php-curl \
sphinxsearch \
unzip \
valac \
valadoc \
wget \
xsltproc \
make \
nodejs
nodejs \
manticore \
manticore-extra
- name: Build the documentation
run: |
Expand Down
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@
## Builds valadoc and serves it with a basic PHP server

# Cleanup and publish
FROM php:apache-buster
FROM php:apache-bookworm

ENV DEBIAN_FRONTEND=noninteractive

# Install sphinxsearch for search index
RUN apt-get update -qq && apt-get install \
-qq \
--no-install-recommends \
sphinxsearch
wget
RUN wget https://repo.manticoresearch.com/manticore-repo.noarch.deb
RUN dpkg -i manticore-repo.noarch.deb
RUN apt-get update -qq && apt-get install \
-qq \
--no-install-recommends \
manticore manticore-extra
RUN mkdir -p /var/run/manticore

# Install the mysqli extension
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ to install the devhelp books in your system. Now launch Devhelp and use them!
Searching
=========

For a more complete experience, you will need to install `sphinxsearch` and `xsltproc`.
For a more complete experience, you will need to install [manticore](https://manticoresearch.com/install/) and `xsltproc`.

On elementary OS or Ubuntu run:
```bash
sudo apt install sphinxsearch xsltproc
sudo apt install xsltproc
```

The run the following command to generate search indexes:
```bash
make serve-search
```

This will (eventually!) start a sphinx daemon on port `51413`.
This will (eventually!) start a manticore daemon on port `51413`.


Add New Packages
Expand Down
11 changes: 7 additions & 4 deletions data/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ function get_title ($page) {
<meta property="og:type" content="website">
<title><?php echo get_title ($page); ?></title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CDroid+Serif:400%7CRoboto+Mono:400,500,700,400italic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/styles/main.css" type="text/css">
<link rel="apple-touch-icon" href="/images/icon.png">
<link rel="shortcut icon" href="/images/favicon.ico">
Expand All @@ -79,9 +78,13 @@ function get_title ($page) {
</form>
<a class="title" href="/index.htm"><img alt="Valadoc" src="/images/logo.svg"/></a>
<ul>
<li><a href="https://vala.dev/" target="_blank" title="Vala Official Website"><i class="fa fa-home"></i></a>
<li><a href="https://www.reddit.com/r/vala/" target="_blank" title="reddit"><i class="fa fa-reddit"></i></a>
<li><a href="/markup.htm" title="Markup Info"><i class="fa fa-info-circle"></i></a>
<li><a href="https://vala.dev/" target="_blank" title="Vala Official Website"><svg xmlns="http://www.w3.org/2000/svg" width="1.27em" height="1em" viewBox="0 0 1664 1312"><path fill="currentColor" d="M1408 768v480q0 26-19 45t-45 19H960V928H704v384H320q-26 0-45-19t-19-45V768q0-1 .5-3t.5-3l575-474l575 474q1 2 1 6m223-69l-62 74q-8 9-21 11h-3q-13 0-21-7L832 200L140 777q-12 8-24 7q-13-2-21-11l-62-74q-8-10-7-23.5T37 654L756 55q32-26 76-26t76 26l244 204V64q0-14 9-23t23-9h192q14 0 23 9t9 23v408l219 182q10 8 11 21.5t-7 23.5"/></svg></a>
<li><a href="https://discourse.gnome.org/tag/vala" target="_blank" title="Discourse (Forums)"><svg xmlns="http://www.w3.org/2000/svg" width="0.88em" height="1em" viewBox="0 0 448 512"><path fill="currentColor" d="M225.9 32C103.3 32 0 130.5 0 252.1C0 256 .1 480 .1 480l225.8-.2c122.7 0 222.1-102.3 222.1-223.9C448 134.3 348.6 32 225.9 32M224 384c-19.4 0-37.9-4.3-54.4-12.1L88.5 392l22.9-75c-9.8-18.1-15.4-38.9-15.4-61c0-70.7 57.3-128 128-128s128 57.3 128 128s-57.3 128-128 128"/></svg></a>
<li><a href="https://matrix.to/#/#vala:gnome.org" target="_blank" title="Matrix"><svg xmlns="http://www.w3.org/2000/svg" width="1.13em" height="1em" viewBox="0 0 1728 1536"><path fill="currentColor" d="m959 896l64-256H769l-64 256zm768-504l-56 224q-7 24-31 24h-327l-64 256h311q15 0 25 12q10 14 6 28l-56 224q-5 24-31 24h-327l-81 328q-7 24-31 24H841q-16 0-26-12q-9-12-6-28l78-312H633l-81 328q-7 24-31 24H296q-15 0-25-12q-9-12-6-28l78-312H32q-15 0-25-12q-9-12-6-28l56-224q7-24 31-24h327l64-256H168q-15 0-25-12q-10-14-6-28l56-224q5-24 31-24h327l81-328q7-24 32-24h224q15 0 25 12q9 12 6 28l-78 312h254l81-328q7-24 32-24h224q15 0 25 12q9 12 6 28l-78 312h311q15 0 25 12q9 12 6 28"/></svg></a>
<li><a href="https://discord.gg/YFAzjSVHt7" target="_blank" title="Discord"><svg xmlns="http://www.w3.org/2000/svg" width="1.25em" height="1em" viewBox="0 0 640 512"><path fill="currentColor" d="M524.531 69.836a1.5 1.5 0 0 0-.764-.7A485.065 485.065 0 0 0 404.081 32.03a1.816 1.816 0 0 0-1.923.91a337.461 337.461 0 0 0-14.9 30.6a447.848 447.848 0 0 0-134.426 0a309.541 309.541 0 0 0-15.135-30.6a1.89 1.89 0 0 0-1.924-.91a483.689 483.689 0 0 0-119.688 37.107a1.712 1.712 0 0 0-.788.676C39.068 183.651 18.186 294.69 28.43 404.354a2.016 2.016 0 0 0 .765 1.375a487.666 487.666 0 0 0 146.825 74.189a1.9 1.9 0 0 0 2.063-.676A348.2 348.2 0 0 0 208.12 430.4a1.86 1.86 0 0 0-1.019-2.588a321.173 321.173 0 0 1-45.868-21.853a1.885 1.885 0 0 1-.185-3.126a251.047 251.047 0 0 0 9.109-7.137a1.819 1.819 0 0 1 1.9-.256c96.229 43.917 200.41 43.917 295.5 0a1.812 1.812 0 0 1 1.924.233a234.533 234.533 0 0 0 9.132 7.16a1.884 1.884 0 0 1-.162 3.126a301.407 301.407 0 0 1-45.89 21.83a1.875 1.875 0 0 0-1 2.611a391.055 391.055 0 0 0 30.014 48.815a1.864 1.864 0 0 0 2.063.7A486.048 486.048 0 0 0 610.7 405.729a1.882 1.882 0 0 0 .765-1.352c12.264-126.783-20.532-236.912-86.934-334.541M222.491 337.58c-28.972 0-52.844-26.587-52.844-59.239s23.409-59.241 52.844-59.241c29.665 0 53.306 26.82 52.843 59.239c0 32.654-23.41 59.241-52.843 59.241m195.38 0c-28.971 0-52.843-26.587-52.843-59.239s23.409-59.241 52.843-59.241c29.667 0 53.307 26.82 52.844 59.239c0 32.654-23.177 59.241-52.844 59.241"/></svg></a>
<li><a href="https://mastodon.social/@vala_lang" target="_blank" title="Mastodon"><svg xmlns="http://www.w3.org/2000/svg" width="0.88em" height="1em" viewBox="0 0 448 512"><path fill="currentColor" d="M433 179.11c0-97.2-63.71-125.7-63.71-125.7c-62.52-28.7-228.56-28.4-290.48 0c0 0-63.72 28.5-63.72 125.7c0 115.7-6.6 259.4 105.63 289.1c40.51 10.7 75.32 13 103.33 11.4c50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.54 102.54 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7c56.12-6.7 105-41.3 111.23-72.9c9.8-49.8 9-121.5 9-121.5m-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175c25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5l11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1c23.71 27.3 18.4 53 18.4 175z"/></svg></a>
<li><a href="https://www.reddit.com/r/vala/" target="_blank" title="Reddit"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 1792 1792"><path fill="currentColor" d="M1095 1167q16 16 0 31q-62 62-199 62t-199-62q-16-15 0-31q6-6 15-6t15 6q48 49 169 49q120 0 169-49q6-6 15-6t15 6M788 986q0 37-26 63t-63 26t-63.5-26t-26.5-63q0-38 26.5-64t63.5-26t63 26.5t26 63.5m395 0q0 37-26.5 63t-63.5 26t-63-26t-26-63t26-63.5t63-26.5t63.5 26t26.5 64m251-120q0-49-35-84t-85-35t-86 36q-130-90-311-96l63-283l200 45q0 37 26 63t63 26t63.5-26.5T1359 448t-26.5-63.5T1269 358q-54 0-80 50l-221-49q-19-5-25 16l-69 312q-180 7-309 97q-35-37-87-37q-50 0-85 35t-35 84q0 35 18.5 64t49.5 44q-6 27-6 56q0 142 140 243t337 101q198 0 338-101t140-243q0-32-7-57q30-15 48-43.5t18-63.5m358 30q0 182-71 348t-191 286t-286 191t-348 71t-348-71t-286-191t-191-286T0 896t71-348t191-286T548 71T896 0t348 71t286 191t191 286t71 348"/></svg></a>
<li><a href="/markup.htm" title="Markup Info"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 1536 1536"><path fill="currentColor" d="M1024 1248v-160q0-14-9-23t-23-9h-96V544q0-14-9-23t-23-9H544q-14 0-23 9t-9 23v160q0 14 9 23t23 9h96v320h-96q-14 0-23 9t-9 23v160q0 14 9 23t23 9h448q14 0 23-9t9-23M896 352V192q0-14-9-23t-23-9H672q-14 0-23 9t-9 23v160q0 14 9 23t23 9h192q14 0 23-9t9-23m640 416q0 209-103 385.5T1153.5 1433T768 1536t-385.5-103T103 1153.5T0 768t103-385.5T382.5 103T768 0t385.5 103T1433 382.5T1536 768"/></svg></a>
</ul>
</nav>
<div id="sidebar">
Expand Down
15 changes: 8 additions & 7 deletions data/scripts/valadoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ document.addEventListener('DOMContentLoaded', () => {
// We run a search when the value changes, after a given delay
html.searchField.addEventListener('keyup', evt => {
// only if the pressed key isn't up/down arrow, because we use them to select next/previous search result and not to trigger search
if (evt.keyCode !== 40 && evt.keyCode !== 38) {
if (evt.key !== "ArrowUp" && evt.key !== "ArrowDown") {
updateSearch()
}
})
Expand All @@ -196,22 +196,22 @@ document.addEventListener('DOMContentLoaded', () => {

// register some useful shortcuts
document.addEventListener('keyup', evt => {
switch (evt.keyCode) {
case 27: // echap
switch (evt.key) {
case "Escape": // Esc key
if (html.searchField === document.activeElement) {
html.searchField.value = ''
updateSearch()
}
break
case 38: // up arrrow
case "ArrowUp": // up arrrow
// if we are focusing a search result, but not the first...
if (html.searchFocused && html.searchFocused.previousElementSibling != null) {
html.searchFocused.className = html.searchFocused.className.replace(' search-selected', '')
html.searchFocused = html.searchFocused.previousElementSibling
html.searchFocused.className = html.searchFocused.className + ' search-selected'
}
break
case 40: // down arrow
case "ArrowDown": // down arrow
// if we are focusing a search result, but not the last...
if (html.searchFocused && html.searchFocused.nextElementSibling != null) {
html.searchFocused.className = html.searchFocused.className.replace(' search-selected', '')
Expand All @@ -226,12 +226,13 @@ document.addEventListener('DOMContentLoaded', () => {
html.searchFocused.className = html.searchFocused.className + ' search-selected'
}
break
case 13: // enter
case "Enter": // enter
if (html.searchFocused) { // if we have a search item selected, we load its page
loadPage(html.searchFocused.children[0])(evt)
}
break
case 17: // ctrl
case "Control": // ctrl
case "/": // the "/" key
html.searchField.focus() // we focus the search
break
}
Expand Down
7 changes: 7 additions & 0 deletions data/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ function escapestring($str) {
}
}
$query = implode (" ", $tokens);
if ( empty($query) ) {
echo '<span class="search-name">No results found.</span>';
exit();
}
if ($trimmedquery[0] == '.') {
$query = ". << ".$query;
}
Expand Down Expand Up @@ -78,6 +82,9 @@ function escapestring($str) {
if (!($q = $mysqli->query($qq)))
die("Query failed: (" . $mysqli->errno . ") " . $mysqli->error);

if ( $q->num_rows === 0 )
echo '<span class="search-name">No results found.</span>';

while ($row = $q->fetch_assoc()) {
$splitted = explode ("/", $row["path"]);
$pkg = $splitted[1];
Expand Down
2 changes: 1 addition & 1 deletion docker-server.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

cd /opt/valadoc && searchd
cd /opt/valadoc && searchd -c /opt/valadoc/sphinx.conf
apache2-foreground
4 changes: 0 additions & 4 deletions documentation/champlain-0.12/Champlain-0.12.valadoc.metadata

This file was deleted.

This file was deleted.

37 changes: 12 additions & 25 deletions documentation/packages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@
<package name="gmodule-2.0" home="https://www.gtk.org/" gir="GModule-2.0" c-docs="https://docs.gtk.org/gmodule/">
Portable method for dynamically loading 'plug-ins'
</package>
<package name="libpeas-gtk-1.0" gir="PeasGtk-1.0" c-docs="https://developer-old.gnome.org/libpeas/unstable/">
A GObject-based plugins engine
<package name="libpeas-2" gir="Peas-2" c-docs="https://gnome.pages.gitlab.gnome.org/libpeas/libpeas-2/">
libpeas is a gobject-based plugins engine, and is targetted at giving every application
the chance to assume its own extensibility.
</package>
<package name="libpeas-1.0" deprecated="true" gir="Peas-1.0" c-docs="https://developer-old.gnome.org/libpeas/unstable/">
libpeas is a gobject-based plugins engine, and is targetted at giving every application
the chance to assume its own extensibility.
</package>
</section>

Expand Down Expand Up @@ -111,10 +116,6 @@
<package name="shumate-1.0" gir="Shumate-1.0" home="https://wiki.gnome.org/Projects/libshumate" c-docs="https://gnome.pages.gitlab.gnome.org/libshumate/">
Shumate is a library providing a widget to display maps in applications.
</package>
<package name="champlain-gtk-0.12" deprecated="true" gir="GtkChamplain-0.12" flags="--pkg gtk+-3.0 --pkg champlain-0.12 --pkg clutter-1.0" c-docs="https://developer-old.gnome.org/libchamplain/unstable/" home="https://projects.gnome.org/libchamplain/">
Libchamplain-gtk is a C library on top of libchamplain providing a Gtk+ widget to display maps
in GTK+ applications.
</package>
<package name="libgnome-menu-3.0" flags="--pkg gio-2.0 --pkg gio-unix-2.0" gir="GnomeDesktop-3.0">
Utility library for loading .desktop files.
</package>
Expand All @@ -129,6 +130,9 @@
<package name="goocanvas-2.0" gir="GooCanvas-2.0" c-docs="https://developer-old.gnome.org/goocanvas/stable/">
GooCanvas is a canvas widget for GTK+ that uses the cairo 2D library for drawing.
</package>
<package name="libpeas-gtk-1.0" deprecated="true" gir="PeasGtk-1.0" c-docs="https://developer-old.gnome.org/libpeas/unstable/">
A GObject-based plugins engine
</package>
</section>

<section name="Multimedia">
Expand Down Expand Up @@ -383,18 +387,8 @@
<package name="libgeoclue-2.0" gir="Geoclue-2.0" flags="--pkg=glib-2.0 --pkg=gobject-2.0 --pkg=gio-2.0" home="https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home" c-docs="https://www.freedesktop.org/software/geoclue/docs/libgeoclue/">
GeoClue is a D-Bus geoinformation service. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
</package>
<package name="tracker-control-2.0" gir="TrackerControl-2.0" c-docs="https://developer-old.gnome.org/libtracker-control/stable/">
External control and monitoring of miners
</package>
<package name="tracker-miner-2.0" gir="Tracker-2.0" c-docs="https://developer-old.gnome.org/libtracker-miner/stable/">
The libtracker-miner library is the foundation for Tracker data miners,
these miners will extract metadata and insert it in SPARQL form to
a TrackerSparqlConnection.
</package>
<package name="tracker-sparql-2.0" c-docs="https://developer-old.gnome.org/libtracker-sparql/stable/">
The libtracker-sparql library is the foundation for Tracker querying and inserting
into the data store. The data store allows both querying and inserting using SPARQL
based on the Nepomuk ontology.
<package name="tracker-sparql-3.0" home="https://tracker.gnome.org" c-docs="https://gnome.pages.gitlab.gnome.org/tracker">
A SPARQL triple store library.
</package>
<package name="folks" home="https://wiki.gnome.org/Projects/Folks" maintainers="Travis Reitter" c-docs="http://telepathy.freedesktop.org/doc/folks/c/">
Libfolks is a library that aggregates people from multiple sources (eg, Telepathy connection managers
Expand Down Expand Up @@ -611,16 +605,9 @@ simple methods via GObject-Introspection
<package name="avahi-client" flags="--pkg avahi-gobject" home="http://www.avahi.org/" maintainers="Sebastian Noack">
The Avahi package is a system which facilitates service discovery on a local network.
</package>
<package name="champlain-0.12" deprecated="true" flags="--pkg clutter-1.0" home="http://projects.gnome.org/libchamplain/" gir="Champlain-0.12">
Libchamplain is a C library providing a ClutterActor to display maps.
</package>
<package name="libwnck-3.0" gir="Wnck-3.0" c-docs="https://developer-old.gnome.org/libwnck/unstable/">
Library to manage X windows and workspaces (via pagers, tasklists, etc.)
</package>
<package name="libpeas-1.0" gir="Peas-1.0" c-docs="https://developer-old.gnome.org/libpeas/unstable/">
libpeas is a gobject-based plugins engine, and is targetted at giving every application
the chance to assume its own extensibility.
</package>
<package name="libnotify" gir="Notify-0.7" c-docs="https://developer-old.gnome.org/libnotify/unstable/">
libnotify is a library that sends desktop notifications to a notification daemon, as defined in
the Desktop Notifications spec. These notifications can be used to inform the user about an event
Expand Down

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions documentation/tracker-miner-1.0/Tracker-1.0.valadoc.metadata

This file was deleted.

35 changes: 32 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 458b62c

Please sign in to comment.