+
+
+
{{ $page->t('Installation and integration requirements') }}
+
{{ $page->t('LibreSign is an app for a compatible Nextcloud server, not an independent standalone signing server. API integrations use an authorized Nextcloud account and its installation-specific permissions. Depending on configuration, external recipients can sign through invitations without a Nextcloud account.') }}
+
{{ $page->t('External applications can keep their own interface and workflows while their backend requests signatures and retrieves signed documents only with appropriate authorization. Consult the documentation for your installed LibreSign version.') }}
+
+
+
@include('_partials.home.card-grid-section', [
'sectionId' => 'it-pillars',
'sectionClass' => 'ud-it-pillars ud-page-section',
@@ -71,8 +82,8 @@
'subtitle' => $page->t('Discover the technical pillars that give your team freedom to innovate with confidence, visibility, and governance.'),
'items' => $itPillarItems,
'sectionActions' => [[
- 'href' => 'https://docs.libresign.coop/developer_manual/api/',
- 'label' => $page->t('Access API Documentation'),
+ 'href' => 'https://docs.libresign.coop/',
+ 'label' => $page->t('Choose Your Version for API Documentation'),
'class' => 'btn ud-btn-solid-brand',
'target' => '_blank',
]],
@@ -94,8 +105,8 @@
'class' => 'btn ud-btn-solid-warm',
],
[
- 'href' => 'https://docs.libresign.coop/admin_manual/',
- 'label' => $page->t('Read the Admin Documentation'),
+ 'href' => 'https://docs.libresign.coop/',
+ 'label' => $page->t('Choose Your Version for Admin Documentation'),
'class' => 'btn ud-btn-ghost',
'target' => '_blank',
],
diff --git a/tests/js/rendered-technical-discovery.smoke.mjs b/tests/js/rendered-technical-discovery.smoke.mjs
new file mode 100644
index 00000000..6bbcd00f
--- /dev/null
+++ b/tests/js/rendered-technical-discovery.smoke.mjs
@@ -0,0 +1,58 @@
+import assert from 'node:assert/strict';
+import { readFileSync } from 'node:fs';
+import test from 'node:test';
+
+const buildRoot = new URL('../../build_production/', import.meta.url);
+const html = (path) => readFileSync(new URL(path, buildRoot), 'utf8');
+const tags = (page, name) => [...page.matchAll(new RegExp('<' + name + '\\b[^>]*>', 'gi'))].map((match) => match[0]);
+const attribute = (tag, name) => tag?.match(new RegExp('\\b' + name + '="([^"]*)"', 'i'))?.[1] ?? null;
+const namedTag = (page, element, attributeName, value) =>
+ tags(page, element).find((tag) => attribute(tag, attributeName) === value);
+
+test('generated pages have absolute canonical, hreflang and social image URLs', () => {
+ for (const path of [
+ 'index.html',
+ 'faq/index.html',
+ 'tecnical-details/index.html',
+ 'pt-BR/tecnical-details/index.html',
+ ]) {
+ const page = html(path);
+ const canonical = attribute(namedTag(page, 'link', 'rel', 'canonical'), 'href');
+ assert.match(canonical ?? '', /^https:\/\//, path + ': canonical must be absolute');
+ const canonicalOrigin = new URL(canonical).origin;
+
+ const alternates = tags(page, 'link').filter((tag) =>
+ attribute(tag, 'rel') === 'alternate' && attribute(tag, 'hreflang'));
+ assert.ok(alternates.length > 0, path + ': missing hreflang');
+ for (const alternate of alternates) {
+ assert.match(attribute(alternate, 'href') ?? '', /^https:\/\//, path + ': hreflang must be absolute');
+ }
+
+ for (const [name, key] of [['og:image', 'property'], ['twitter:image', 'name']]) {
+ const image = attribute(namedTag(page, 'meta', key, name), 'content');
+ assert.match(image ?? '', /^https:\/\//, path + ': ' + name + ' must be absolute');
+ assert.equal(new URL(image).origin, canonicalOrigin, path + ': ' + name + ' must use the site origin');
+ assert.match(new URL(image).pathname, /\/assets\/images\/logo\/logo-libresign-large\.png$/);
+ }
+ }
+});
+
+test('rendered technical guide links are styled and external docs open safely', () => {
+ for (const path of ['index.html', 'faq/index.html', 'tecnical-details/index.html']) {
+ const anchors = tags(html(path), 'a');
+ assert.ok(anchors.some((tag) =>
+ /posts\/libresign-api-guide/.test(attribute(tag, 'href') ?? '') &&
+ /\bud-btn-solid-brand\b/.test(attribute(tag, 'class') ?? '')
+ ), path + ': missing styled API guide action');
+ }
+
+ for (const path of ['faq/index.html', 'tecnical-details/index.html']) {
+ const anchors = tags(html(path), 'a');
+ assert.ok(anchors.some((tag) =>
+ attribute(tag, 'href') === 'https://docs.libresign.coop/' &&
+ /\bud-btn-outline-brand\b/.test(attribute(tag, 'class') ?? '') &&
+ attribute(tag, 'target') === '_blank' &&
+ attribute(tag, 'rel') === 'noopener noreferrer'
+ ), path + ': missing safely opened documentation action');
+ }
+});
diff --git a/tests/js/technical-discovery.test.mjs b/tests/js/technical-discovery.test.mjs
new file mode 100644
index 00000000..85b1117a
--- /dev/null
+++ b/tests/js/technical-discovery.test.mjs
@@ -0,0 +1,30 @@
+import assert from 'node:assert/strict';
+import { readFileSync } from 'node:fs';
+import test from 'node:test';
+
+const read = (name) => readFileSync(new URL('../../source/' + name, import.meta.url), 'utf8');
+const header = read('_layouts/header.blade.php');
+const home = read('index.blade.php');
+const technical = read('tecnical-details.blade.php');
+const faq = read('faq.blade.php');
+const layout = read('_layouts/main.blade.php');
+
+test('primary discovery paths reference the API guide and documentation chooser', () => {
+ for (const [name, source] of [['header', header], ['home', home], ['technical', technical], ['FAQ', faq]]) {
+ assert.match(source, /posts\/libresign-api-guide/, name + ' lacks an API guide link');
+ }
+ for (const [name, source] of [['header', header], ['technical', technical], ['FAQ', faq]]) {
+ assert.match(source, /https:\/\/docs\.libresign\.coop\//, name + ' lacks a documentation chooser');
+ }
+ assert.doesNotMatch(technical, /docs\.libresign\.coop\/(?:developer_manual|admin_manual)\//);
+});
+
+test('social image URLs use the origin resolver even with production baseUrl="/"', () => {
+ assert.match(layout, /property="og:image" content="\{\{\s*\$absoluteSeoUrl\(/);
+ assert.match(layout, /name="twitter:image" content="\{\{\s*\$absoluteSeoUrl\(/);
+});
+
+test('new technical links use the Weblate extraction helper', () => {
+ assert.match(technical, /id="it-requirements-heading">\{\{\s*\$page->t\(/);
+ assert.match(faq, /https:\/\/docs\.libresign\.coop\/"[^>]*>\{\{\s*\$page->t\(/);
+});