astro-accelerator 4.0.5 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,85 +1,85 @@
1
- {
2
- "version": "4.0.5",
3
- "author": "Steve Fenton",
4
- "name": "astro-accelerator",
5
- "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
6
- "keywords": [
7
- "astro",
8
- "themes"
9
- ],
10
- "type": "module",
11
- "packageManager": "pnpm@8.7.0",
12
- "engines": {
13
- "node": ">=18.14.1",
14
- "pnpm": ">=8.6.12"
15
- },
16
- "homepage": "https://astro.stevefenton.co.uk/",
17
- "bugs": "https://github.com/Steve-Fenton/astro-accelerator/issues",
18
- "license": "(Apache-2.0)",
19
- "repository": {
20
- "url": "https://github.com/Steve-Fenton/astro-accelerator"
21
- },
22
- "scripts": {
23
- "img": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs",
24
- "dev": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs && astro dev",
25
- "stats": "node --no-experimental-fetch ./src/themes/accelerator/utilities/stats.mjs",
26
- "spellcheck": "git fetch origin main:refs/remotes/origin/main && git diff origin/main --name-only --diff-filter=ACMRTUXB | cspell --no-must-find-files --file-list stdin",
27
- "test": "astro build && npx playwright install --with-deps && npx playwright test",
28
- "build": "astro build",
29
- "preview": "astro preview",
30
- "astro": "astro",
31
- "dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
32
- },
33
- "dependencies": {
34
- "@astrojs/mdx": "^2.0.3",
35
- "astro": "^4.0.8",
36
- "astro-accelerator-utils": "^0.3.5",
37
- "cspell": "^8.3.1",
38
- "csv": "^6.3.6",
39
- "hast-util-from-selector": "^3.0.0",
40
- "html-to-text": "^9.0.5",
41
- "keyword-extractor": "^0.0.28",
42
- "remark-directive": "^3.0.0",
43
- "sharp": "^0.33.1"
44
- },
45
- "devDependencies": {
46
- "@playwright/test": "^1.40.1"
47
- },
48
- "files": [
49
- ".npmrc",
50
- "env.d.ts",
51
- "tsconfig.json",
52
- "astro.config.mjs",
53
- "sample/*",
54
- "sample/**/*",
55
- "src/config.ts",
56
- "src/pages/index.md",
57
- "src/pages/search.md",
58
- "src/pages/authors/[[]author[]]/[[]page[]].astro",
59
- "src/pages/articles/[[]page[]].astro",
60
- "src/pages/articles/index.astro",
61
- "src/pages/articles/feed.xml.ts",
62
- "src/pages/category/[[]category[]]/[[]page[]].astro",
63
- "src/pages/category/[[]category[]]/index.astro",
64
- "src/pages/tag/[[]tag[]]/[[]page[]].astro",
65
- "src/pages/tag/[[]tag[]]/index.astro",
66
- "src/pages/search.json.ts",
67
- "src/pages/sitemap.xml.ts",
68
- "src/pages/report/*",
69
- "src/layouts/*",
70
- "src/themes/accelerator/components/*",
71
- "src/themes/accelerator/layouts/*",
72
- "src/themes/accelerator/utilities/*",
73
- "src/data/*",
74
- "public/img/astro-lighthouse.png",
75
- "public/icons/**/*",
76
- "public/css/*",
77
- "public/js/*"
78
- ],
79
- "pnpm": {
80
- "overrides": {
81
- "postcss@<8.4.31": ">=8.4.31",
82
- "zod@<=3.22.2": ">=3.22.3"
83
- }
84
- }
85
- }
1
+ {
2
+ "version": "4.0.7",
3
+ "author": "Steve Fenton",
4
+ "name": "astro-accelerator",
5
+ "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
6
+ "keywords": [
7
+ "astro",
8
+ "themes"
9
+ ],
10
+ "type": "module",
11
+ "packageManager": "pnpm@8.7.0",
12
+ "engines": {
13
+ "node": ">=18.14.1",
14
+ "pnpm": ">=8.6.12"
15
+ },
16
+ "homepage": "https://astro.stevefenton.co.uk/",
17
+ "bugs": "https://github.com/Steve-Fenton/astro-accelerator/issues",
18
+ "license": "(Apache-2.0)",
19
+ "repository": {
20
+ "url": "https://github.com/Steve-Fenton/astro-accelerator"
21
+ },
22
+ "scripts": {
23
+ "img": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs",
24
+ "dev": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs && astro dev",
25
+ "stats": "node --no-experimental-fetch ./src/themes/accelerator/utilities/stats.mjs",
26
+ "spellcheck": "git fetch origin main:refs/remotes/origin/main && git diff origin/main --name-only --diff-filter=ACMRTUXB | cspell --no-must-find-files --file-list stdin",
27
+ "test": "astro build && npx playwright install --with-deps && npx playwright test",
28
+ "build": "astro build",
29
+ "preview": "astro preview",
30
+ "astro": "astro",
31
+ "dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
32
+ },
33
+ "dependencies": {
34
+ "@astrojs/mdx": "^2.0.4",
35
+ "astro": "^4.1.3",
36
+ "astro-accelerator-utils": "^0.3.6",
37
+ "cspell": "^8.3.2",
38
+ "csv": "^6.3.6",
39
+ "hast-util-from-selector": "^3.0.0",
40
+ "html-to-text": "^9.0.5",
41
+ "keyword-extractor": "^0.0.28",
42
+ "remark-directive": "^3.0.0",
43
+ "sharp": "^0.33.2"
44
+ },
45
+ "devDependencies": {
46
+ "@playwright/test": "^1.40.1"
47
+ },
48
+ "files": [
49
+ ".npmrc",
50
+ "env.d.ts",
51
+ "tsconfig.json",
52
+ "astro.config.mjs",
53
+ "sample/*",
54
+ "sample/**/*",
55
+ "src/config.ts",
56
+ "src/pages/index.md",
57
+ "src/pages/search.md",
58
+ "src/pages/authors/[[]author[]]/[[]page[]].astro",
59
+ "src/pages/articles/[[]page[]].astro",
60
+ "src/pages/articles/index.astro",
61
+ "src/pages/articles/feed.xml.ts",
62
+ "src/pages/category/[[]category[]]/[[]page[]].astro",
63
+ "src/pages/category/[[]category[]]/index.astro",
64
+ "src/pages/tag/[[]tag[]]/[[]page[]].astro",
65
+ "src/pages/tag/[[]tag[]]/index.astro",
66
+ "src/pages/search.json.ts",
67
+ "src/pages/sitemap.xml.ts",
68
+ "src/pages/report/*",
69
+ "src/layouts/*",
70
+ "src/themes/accelerator/components/*",
71
+ "src/themes/accelerator/layouts/*",
72
+ "src/themes/accelerator/utilities/*",
73
+ "src/data/*",
74
+ "public/img/astro-lighthouse.png",
75
+ "public/icons/**/*",
76
+ "public/css/*",
77
+ "public/js/*"
78
+ ],
79
+ "pnpm": {
80
+ "overrides": {
81
+ "postcss@<8.4.31": ">=8.4.31",
82
+ "zod@<=3.22.2": ">=3.22.3"
83
+ }
84
+ }
85
+ }
Binary file
Binary file
Binary file
@@ -11,7 +11,7 @@ function enhanceHeaders() {
11
11
  linkContainer.href = `#${elem.id}`;
12
12
  linkContainer.className = 'bookmark-link';
13
13
  linkContainer.innerHTML = 'Bookmark'
14
- console.log(elem, typeof elem);
14
+
15
15
  elem.appendChild(linkContainer);
16
16
  });
17
17
 
@@ -81,8 +81,7 @@ function addMobileNav(resizedEventName) {
81
81
  const w2 = document.body.getBoundingClientRect().width;
82
82
  document.documentElement.style.color = 'red';
83
83
  document.documentElement.style.paddingInlineEnd = (w2 - w1) + 'px';
84
-
85
- console.log(w1, w2, w1 - w2);
84
+
86
85
  const menuElement = qs('#' + navigationSelector);
87
86
 
88
87
  overlay.innerHTML = menuElement.outerHTML;
@@ -34,12 +34,14 @@ function addStickyNavigation(headerSelector, navigationSelector, navigationListS
34
34
  // && where the browser is more than 860px wide
35
35
  if (dimensions.navigationHeight < ((dimensions.browserHeight - Math.max(dimensions.headerHeight, site_features.stickyNav.top)) - buffer)
36
36
  && dimensions.browserWidth > 860) {
37
- console.log('Navigation: Sticky Mode');
37
+ // Navigation: Sticky Mode
38
+
38
39
  navigation.classList.add(className);
39
40
  const top = site_features.stickyNav.top ?? 220;
40
41
  navigation.style.top = top + 'px';
41
42
  } else {
42
- console.log('Navigation: Fixed Mode');
43
+ // Navigation: Fixed Mode
44
+
43
45
  navigation.classList.remove(className);
44
46
  }
45
47
  }
@@ -71,7 +71,6 @@ function recheck() {
71
71
  const item = validItems.pop();
72
72
 
73
73
  if (item && item.id !== current) {
74
- console.log('Reading', item.id);
75
74
  current = item.id;
76
75
  highlight(item.id);
77
76
  }
@@ -293,7 +293,6 @@ async function replaceSynonyms(queryTerms) {
293
293
  */
294
294
  async function search(s, r) {
295
295
  const numberOfResults = r ?? 12;
296
- console.log('search:' + s, numberOfResults);
297
296
 
298
297
  /** @type {SearchEntry[]} */
299
298
  const needles = [];
@@ -319,8 +318,6 @@ async function search(s, r) {
319
318
 
320
319
  const allTerms = queryTerms.concat(stemmedTerms);
321
320
 
322
- console.log(allTerms);
323
-
324
321
  cleanQuery.length > 0 && haystack.forEach( (item) => {
325
322
 
326
323
  item.foundWords = 0;
@@ -512,7 +509,7 @@ async function search(s, r) {
512
509
  more.addEventListener('click', function() {
513
510
  currentQuery = '';
514
511
  const newTotal = numberOfResults + 12;
515
- console.log('More', newTotal);
512
+
516
513
  search(s, newTotal);
517
514
  })
518
515
 
@@ -594,8 +591,6 @@ fetch(dataUrl)
594
591
  return false;
595
592
  });
596
593
 
597
- console.log('Search ready');
598
-
599
594
  const params = new URLSearchParams(window.location.search);
600
595
  if (params.has('q')) {
601
596
  siteSearchQuery.value = params.get('q') ?? '';
@@ -607,8 +602,6 @@ fetch(dataUrl)
607
602
  }
608
603
  }
609
604
 
610
- console.log(scoring);
611
-
612
605
  debounceSearch();
613
606
  })
614
607
  .catch((error) => {
@@ -22,8 +22,6 @@ const pages = allPages
22
22
  .sort(PostOrdering.sortByModDateDesc)
23
23
  .slice(0, Math.min(count, pageCount));
24
24
 
25
- console.log('Recent Pages: ' + pageCount);
26
-
27
25
  stats.stop();
28
26
  ---
29
27
  <ul class="recent-updates">
@@ -13,8 +13,6 @@ const imagePath = path.join('public', imagePaths.src);
13
13
  const outputPath = path.join('public', imagePaths.dest);
14
14
  const imageDirectory = path.join(workingDirectory, imagePath);
15
15
 
16
- console.log(imageDirectory);
17
-
18
16
  const filesToProcess = [];
19
17
 
20
18
  function getDestinationFilePathless(source, s) {
@@ -25,7 +23,7 @@ function getDestinationFilePathless(source, s) {
25
23
 
26
24
  async function createDestinationFolder(destinationFile) {
27
25
  const file = path.parse(destinationFile + '.txt');
28
- console.log(file.dir);
26
+
29
27
  await fs.promises.mkdir(file.dir, { recursive: true });
30
28
  }
31
29
 
@@ -77,10 +75,7 @@ async function recurseFiles(directory) {
77
75
 
78
76
  await recurseFiles('');
79
77
 
80
- console.log(`Found ${filesToProcess.length} files to process`);
81
-
82
78
  for (const file of filesToProcess) {
83
- console.log(file.path);
84
79
  const source = path.join(imageDirectory, file.path);
85
80
  const destination = getDestinationFilePathless(file.path, 'x');
86
81
  await createDestinationFolder(destination);
@@ -138,5 +133,3 @@ for (const file of filesToProcess) {
138
133
  }
139
134
  }
140
135
  }
141
-
142
- console.log(`Finished`);