astro-accelerator 4.0.0 → 4.0.2
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/README.md +4 -0
- package/package.json +6 -6
- package/src/pages/search.json.ts +6 -9
- package/.npmrc +0 -2
- package/public/css/main.css +0 -1189
- package/public/css/vars.css +0 -89
- package/public/icons/android-chrome-192x192.png +0 -0
- package/public/icons/android-chrome-512x512.png +0 -0
- package/public/icons/apple-touch-icon.png +0 -0
- package/public/icons/favicon-16x16.png +0 -0
- package/public/icons/favicon-32x32.png +0 -0
- package/public/icons/favicon.ico +0 -0
- package/public/js/main.js +0 -66
- package/public/js/modules/animation.js +0 -69
- package/public/js/modules/click-blocks.js +0 -42
- package/public/js/modules/code-blocks.js +0 -59
- package/public/js/modules/detail-tabs.js +0 -194
- package/public/js/modules/events.js +0 -19
- package/public/js/modules/external-links.js +0 -20
- package/public/js/modules/figures.js +0 -28
- package/public/js/modules/focus.js +0 -76
- package/public/js/modules/headers.js +0 -21
- package/public/js/modules/input-type.js +0 -53
- package/public/js/modules/nav-mobile.js +0 -159
- package/public/js/modules/nav-sticky.js +0 -56
- package/public/js/modules/query.js +0 -41
- package/public/js/modules/resizing.js +0 -43
- package/public/js/modules/search-dialog.js +0 -69
- package/public/js/modules/share.js +0 -31
- package/public/js/modules/string.js +0 -77
- package/public/js/modules/toc.js +0 -82
- package/public/js/modules/youtube.js +0 -44
- package/public/js/search.js +0 -615
- package/src/themes/accelerator/components/ArticleList.astro +0 -90
- package/src/themes/accelerator/components/Authors.astro +0 -65
- package/src/themes/accelerator/components/AuthorsMini.astro +0 -41
- package/src/themes/accelerator/components/Breadcrumbs.astro +0 -53
- package/src/themes/accelerator/components/Copyright.astro +0 -28
- package/src/themes/accelerator/components/Footer.astro +0 -37
- package/src/themes/accelerator/components/FooterItem.astro +0 -31
- package/src/themes/accelerator/components/Header.astro +0 -46
- package/src/themes/accelerator/components/HtmlHead.astro +0 -60
- package/src/themes/accelerator/components/Navigation.astro +0 -34
- package/src/themes/accelerator/components/NavigationBar.astro +0 -33
- package/src/themes/accelerator/components/NavigationItem.astro +0 -40
- package/src/themes/accelerator/components/PagingLinks.astro +0 -36
- package/src/themes/accelerator/components/RecentlyUpdated.astro +0 -38
- package/src/themes/accelerator/components/Related.astro +0 -87
- package/src/themes/accelerator/components/SkipLinks.astro +0 -29
- package/src/themes/accelerator/components/TableOfContents.astro +0 -46
- package/src/themes/accelerator/components/Taxonomy.astro +0 -53
- package/src/themes/accelerator/layouts/Author.astro +0 -27
- package/src/themes/accelerator/layouts/Default.astro +0 -83
- package/src/themes/accelerator/layouts/Redirect.astro +0 -29
- package/src/themes/accelerator/layouts/Search.astro +0 -48
- package/src/themes/accelerator/utilities/Languages.ts +0 -21
- package/src/themes/accelerator/utilities/custom-markdown.mjs +0 -142
- package/src/themes/accelerator/utilities/default-layout.mjs +0 -7
- package/src/themes/accelerator/utilities/img.mjs +0 -142
- package/src/themes/accelerator/utilities/language.json +0 -117
- package/src/themes/accelerator/utilities/stats.mjs +0 -44
package/README.md
CHANGED
|
@@ -7,3 +7,7 @@ Review the documentation at [astro.stevefenton.co.uk](https://astro.stevefenton.
|
|
|
7
7
|
|
|
8
8
|
[](https://www.npmjs.com/package/astro-accelerator/)
|
|
9
9
|
[](https://www.npmjs.com/package/astro-accelerator/)
|
|
10
|
+
|
|
11
|
+
## Upgrades
|
|
12
|
+
|
|
13
|
+
- [Upgrading from v3 to v4 of Astro and Astro Accelerator.](https://www.stevefenton.co.uk/blog/2023/12/upgrade-astro-v4/)
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.0.
|
|
2
|
+
"version": "4.0.2",
|
|
3
3
|
"author": "Steve Fenton",
|
|
4
4
|
"name": "astro-accelerator",
|
|
5
5
|
"description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
"dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@astrojs/mdx": "^2.0.
|
|
35
|
-
"astro": "^4.0.
|
|
34
|
+
"@astrojs/mdx": "^2.0.3",
|
|
35
|
+
"astro": "^4.0.8",
|
|
36
36
|
"astro-accelerator-utils": "^0.3.5",
|
|
37
|
-
"cspell": "^8.1
|
|
38
|
-
"csv": "^6.3.
|
|
37
|
+
"cspell": "^8.3.1",
|
|
38
|
+
"csv": "^6.3.6",
|
|
39
39
|
"hast-util-from-selector": "^3.0.0",
|
|
40
40
|
"html-to-text": "^9.0.5",
|
|
41
41
|
"keyword-extractor": "^0.0.28",
|
|
42
42
|
"remark-directive": "^3.0.0",
|
|
43
|
-
"sharp": "^0.33.
|
|
43
|
+
"sharp": "^0.33.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@playwright/test": "^1.40.1"
|
package/src/pages/search.json.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { Accelerator, PostFiltering } from 'astro-accelerator-utils';
|
|
4
4
|
import type { MarkdownInstance } from 'astro';
|
|
5
5
|
import { SITE } from '@config';
|
|
6
|
-
import { htmlToText } from 'html-to-text';
|
|
6
|
+
import { htmlToText, convert } from 'html-to-text';
|
|
7
7
|
import keywordExtractor from 'keyword-extractor';
|
|
8
8
|
|
|
9
9
|
|
|
@@ -33,20 +33,17 @@ const getData = async () => {
|
|
|
33
33
|
let counted: { word: string, count: number }[] = [];
|
|
34
34
|
|
|
35
35
|
if (content) {
|
|
36
|
-
const text =
|
|
36
|
+
const text = convert(content, { wordwrap: false });
|
|
37
37
|
|
|
38
38
|
const words = keywordExtractor.extract(text, {
|
|
39
39
|
language: 'english',
|
|
40
|
-
return_changed_case: true
|
|
40
|
+
return_changed_case: true,
|
|
41
|
+
remove_duplicates: true
|
|
41
42
|
});
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
return array.indexOf(value) === index;
|
|
45
|
-
}
|
|
46
|
-
const uniques = words.filter(unique);
|
|
47
|
-
counted = uniques.map((w) => {
|
|
44
|
+
counted = words.map((w) => {
|
|
48
45
|
return { word: w, count: words.filter(wd => wd === w).length };
|
|
49
|
-
}).filter(e => e.word.replace(/[^a-z]+/g, '').length > 1
|
|
46
|
+
}).filter(e => e.word.replace(/[^a-z]+/g, '').length > 1);
|
|
50
47
|
}
|
|
51
48
|
|
|
52
49
|
items.push({
|
package/.npmrc
DELETED