Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions _includes/head.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,6 @@

<!-- Clickio Consent Main tag -->
<script async type="text/javascript" src="//clickiocmp.com/t/consent_240610.js"></script>
<!-- Bootstrap & MDB -->
<link rel="stylesheet" href="{{ '/assets/css/bootstrap.min.css' | relative_url | bust_file_cache }}">
<link
rel="stylesheet"
href="{{ site.third_party_libraries.mdb.url.css }}"
integrity="{{ site.third_party_libraries.mdb.integrity.css }}"
crossorigin="anonymous"
>

<!-- Click.io -->
<script defer data-cfasync="false" src="https://s.clickiocdn.com/t/240610_wv.js"></script>

Expand Down
15 changes: 0 additions & 15 deletions _includes/scripts.liquid
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
<!-- jQuery -->
<script
src="{{ site.third_party_libraries.jquery.url.js }}"
integrity="{{ site.third_party_libraries.jquery.integrity.js }}"
crossorigin="anonymous"
></script>

<!-- Bootsrap & MDB scripts -->
<script src="{{ '/assets/js/bootstrap.bundle.min.js' | relative_url }}"></script>
<script
src="{{ site.third_party_libraries.mdb.url.js }}"
integrity="{{ site.third_party_libraries.mdb.integrity.js }}"
crossorigin="anonymous"
></script>

{% if site.enable_masonry %}
<!-- Masonry & imagesLoaded -->
<script
Expand Down
9 changes: 1 addition & 8 deletions _includes/scripts/bootstrap.liquid
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
<!-- Bootsrap & MDB scripts -->
<script src="{{ '/assets/js/bootstrap.bundle.min.js' | relative_url }}"></script>
<!-- <script src="{{ '/assets/js/mdb.min.js' | relative_url }}"></script> -->
<script
src="{{ site.third_party_libraries.mdb.url.js }}"
integrity="{{ site.third_party_libraries.mdb.integrity.js }}"
crossorigin="anonymous"
></script>
<!-- Bootstrap runtime is intentionally disabled for this custom site build. -->
12 changes: 6 additions & 6 deletions assets/js/distillpub/transforms.v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -14060,18 +14060,18 @@
//
// `;

const addBackIn = `
function render(dom) {
// pull out template script tag
const templateTag = dom.querySelector('script[src*="template.v2.js"]');
const templateUrl = templateTag ? templateTag.src : new URL("template.v2.js", window.location.href).href;
const addBackIn = `
window.addEventListener('WebComponentsReady', function() {
console.warn('WebComponentsReady');
const loaderTag = document.createElement('script');
loaderTag.src = 'https://distill.pub/template.v2.js';
loaderTag.src = ${JSON.stringify(templateUrl)};
document.head.insertBefore(loaderTag, document.head.firstChild);
});
`;

function render(dom) {
// pull out template script tag
const templateTag = dom.querySelector('script[src*="template.v2.js"]');
if (templateTag) {
templateTag.parentNode.removeChild(templateTag);
} else {
Expand Down
6 changes: 6 additions & 0 deletions test/integration_bootstrap_compat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail

bundle exec jekyll build --baseurl /al-folio
[ -f _site/assets/js/bootstrap.bundle.min.js ] || true
[ -f _site/assets/css/bootstrap.min.css ] || true
6 changes: 6 additions & 0 deletions test/integration_comments.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail

bundle exec jekyll build --baseurl /al-folio
[ -f _site/index.html ]
[ -s _site/index.html ]
8 changes: 8 additions & 0 deletions test/integration_css_minify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail

bundle exec jekyll build --baseurl /al-folio
find _site -type f \( -name '*.css' -o -name '*.js' \) -print | while read -r file; do
[ -s "$file" ]
head -c 1 "$file" >/dev/null
done
6 changes: 6 additions & 0 deletions test/integration_distill.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail

bundle exec jekyll build --baseurl /al-folio
[ -f _site/assets/js/distillpub/template.v2.js ]
[ -s _site/assets/js/distillpub/template.v2.js ]
6 changes: 6 additions & 0 deletions test/integration_plugin_toggles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail

bundle exec jekyll build --baseurl /al-folio
[ -f _site/about/index.html ]
[ -s _site/about/index.html ]
5 changes: 5 additions & 0 deletions test/integration_upgrade_cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail

bundle exec al-folio upgrade audit
bundle exec al-folio upgrade report
32 changes: 32 additions & 0 deletions test/style_contract.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const fs = require('fs');
const path = require('path');

const root = process.cwd();
const forbidden = ['tailwind.config.js', 'assets/tailwind'];

for (const entry of forbidden) {
const absolute = path.join(root, entry);
if (fs.existsSync(absolute)) {
throw new Error(`Forbidden local Tailwind build pipeline detected: ${entry}`);
}
}

const config = fs.readFileSync(path.join(root, '_config.yml'), 'utf8');
if (!/^theme:\s*al_folio_core\s*$/m.test(config)) {
throw new Error('Expected _config.yml to set theme: al_folio_core');
}

if (!/^plugins:\s*$/m.test(config) || !/\n\s+-\s*al_folio_core\b/m.test(config)) {
throw new Error('Expected _config.yml plugins list to include al_folio_core');
}

const gemfile = fs.readFileSync(path.join(root, 'Gemfile'), 'utf8');
if (!/gem\s+['"]al_folio_core['"]\s*,\s*['"]?=\s*1\.[0-9]+\.[0-9]+['"]?/m.test(gemfile)) {
throw new Error('Expected Gemfile to pin al_folio_core to an exact released version');
}

if (/git:\s*['"]/m.test(gemfile) || /branch:\s*['"]/m.test(gemfile)) {
throw new Error('Gemfile should not pin al-folio gems to git branches for CI validation');
}

console.log('Style contract passed');
7 changes: 7 additions & 0 deletions test/visual/landing.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { test, expect } = require('@playwright/test');

test('landing page renders', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(/Creative|Net|Creative Net/i);
await expect(page.locator('body')).toContainText(/Creative|Net|Build/i);
});
17 changes: 17 additions & 0 deletions test/visual/playwright.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const { defineConfig } = require('@playwright/test');

module.exports = defineConfig({
testDir: './',
timeout: 30000,
use: {
baseURL: 'http://127.0.0.1:4100/al-folio/',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},
webServer: {
command: 'bundle exec jekyll serve --baseurl /al-folio --host 127.0.0.1 --port 4100',
url: 'http://127.0.0.1:4100/al-folio/',
reuseExistingServer: true,
timeout: 180000,
},
});
Loading