blazed-past-us 0.8.1 → 0.8.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 gass-git
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,13 +1,15 @@
1
- <p align="center">
2
- <img src="https://github.com/gass-git/blazed-past-us/raw/main/bolt.png" width="100">
3
- </p>
1
+ ![banner](blazed-logo.png)
4
2
 
5
3
  > 🚧 **Work in progress** This framework is still under active development. Expect changes.
6
4
 
7
- # Blazed Past Us..
5
+ > [![Downloads](https://img.shields.io/npm/dm/blazed-past-us.svg?style=flat-square)](https://www.npmjs.com/package/blazed-past-us)
6
+ > [![version](https://img.shields.io/npm/v/blazed-past-us.svg?style=flat-square)](https://www.npmjs.com/package/blazed-past-us)
7
+ > [![MIT License](https://img.shields.io/npm/l/blazed-past-us.svg?style=flat-square)](https://github.com/gass-git/blazed-past-us/blob/main/LICENSE)
8
8
 
9
9
  Developer centric static blog framework. Write in Markdown from your IDE, share code and SVGs effortlessly, and ship server-rendered HTML for blazing⚡fast load times.
10
10
 
11
+ [Live demo](https://gass-git.github.io/blazed-past-us/)
12
+
11
13
  ## Commit 0
12
14
 
13
15
  **Silver Surfer asked:**
@@ -70,46 +72,7 @@ npm run dev
70
72
  npm run build
71
73
  ```
72
74
 
73
- ## Action that works for deploying to Github pages
75
+ ## Links of interest
74
76
 
75
- ```
76
- name: deploy to Github pages
77
-
78
- on:
79
- push:
80
- branches:
81
- - main
82
-
83
- permissions:
84
- contents: read
85
- pages: write
86
- id-token: write
87
- deployments: write
88
-
89
- jobs:
90
- build-deploy:
91
- runs-on: ubuntu-latest
92
- steps:
93
- - uses: actions/checkout@v4
94
-
95
- - uses: actions/setup-node@v4
96
- with:
97
- node-version: 24
98
-
99
- - run: npm install
100
- - run: npm run build
101
-
102
- - uses: actions/upload-pages-artifact@v3
103
- with:
104
- path: ./dist
105
-
106
- - uses: actions/deploy-pages@v4
107
-
108
- - name: Create Deployment Record
109
- uses: chrnorm/deployment-action@v2
110
- with:
111
- token: ${{ secrets.GITHUB_TOKEN }}
112
- environment: github-pages
113
- environment-url: https://{you-username-here}.github.io/
114
- ref: main
115
- ```
77
+ - [How to configure and deploy to Github pages](https://gass-git.github.io/blazed-past-us/#/configuration-and-deployment-to-github-pages)
78
+ - [Inspiration and architecture](https://gass-git.github.io/blazed-past-us/#/the-inspiration-and-architecture)
Binary file
@@ -1,70 +1,57 @@
1
1
  function getPostData(postsMetadata, slug, option) {
2
- return postsMetadata.find((post) => post.slug === slug)?.[option];
2
+ return postsMetadata.find((post) => post.slug === slug)?.[option];
3
3
  }
4
4
  function getPathnameFromLocationHash(locationHash) {
5
- return locationHash.split('/').splice(1).join('/');
5
+ return locationHash.split('/').splice(1).join('/');
6
6
  }
7
7
  function getLocationHashSpecifics(window) {
8
- const hashRoute = window.location.hash;
9
- const pathname = getPathnameFromLocationHash(hashRoute);
10
- const queryString = hashRoute.split('?')[1] || '';
11
- const urlParams = new URLSearchParams(queryString);
12
- return { pathname, queryString, urlParams };
8
+ const hashRoute = window.location.hash;
9
+ const pathname = getPathnameFromLocationHash(hashRoute);
10
+ const queryString = hashRoute.split('?')[1] || '';
11
+ const urlParams = new URLSearchParams(queryString);
12
+ return { pathname, queryString, urlParams };
13
13
  }
14
14
  function getSlug(htmlFilename) {
15
- return htmlFilename.replace('.html', '');
15
+ return htmlFilename.replace('.html', '');
16
16
  }
17
17
  function getTitle(htmlFilename) {
18
- return htmlFilename.replace('.html', '').replaceAll('-', ' ');
18
+ return htmlFilename.replace('.html', '').replaceAll('-', ' ');
19
19
  }
20
20
  function getBrief(fileContent, lines) {
21
- const A =
22
- fileContent
23
- .split('\n')
24
- .splice(1)
25
- .filter((str) => !str.includes('tags') && str.length > 10) || '';
26
- let brief = '';
27
- for (let l = 0; l < lines; l++) {
28
- brief += A[l];
29
- }
30
- // Remove unwanted chars.
31
- const cleanedBrief = brief.replace(/\r/g, ' ').replace(/`/g, '');
32
- return cleanedBrief;
21
+ const A = fileContent
22
+ .split('\n')
23
+ .splice(1)
24
+ .filter((str) => !str.includes('tags') && str.length > 10) || '';
25
+ let brief = '';
26
+ for (let l = 0; l < lines; l++) {
27
+ brief += A[l];
28
+ }
29
+ // Clean the brief from unwanted chars.
30
+ const cleanedBrief = brief.replace(/\r/g, ' ').replace(/`/g, '');
31
+ return cleanedBrief;
33
32
  }
34
33
  function getTags(fileContent) {
35
- return (
36
- fileContent
37
- .split('\n')
38
- ?.find((str) => str.includes('**tags:**'))
39
- ?.split('**tags:**')
40
- ?.slice(1)[0]
41
- ?.split(',')
42
- .map((str) => str.trim()) || []
43
- );
34
+ return (fileContent
35
+ .split('\n')
36
+ ?.find((str) => str.includes('**tags:**'))
37
+ ?.split('**tags:**')
38
+ ?.slice(1)[0]
39
+ ?.split(',')
40
+ .map((str) => str.trim()) || []);
44
41
  }
45
42
  function getColoredTagsHTML(tags, config) {
46
- return tags
47
- .replace(/\s/g, '')
48
- .toLowerCase()
49
- .split(',')
50
- .map((key) => {
51
- const tagColor = config.tags[key]?.color ?? config.tags.default.color;
52
- return `
53
- <span class="tag" style="--tag-color: ${tagColor}">
54
- ${key}
55
- </span>
43
+ return tags
44
+ .replace(/\s/g, '')
45
+ .toLowerCase()
46
+ .split(',')
47
+ .map((key) => {
48
+ const tagColor = config.tags[key]?.color ?? config.tags.default.color;
49
+ return `
50
+ <span class="tag" style="--tag-color: ${tagColor}">
51
+ ${key}
52
+ </span>
56
53
  `;
57
54
  })
58
- .join(`<span class="tag-separator">, </span>`);
55
+ .join(`<span class="tag-separator">, </span>`);
59
56
  }
60
-
61
- export {
62
- getPostData,
63
- getTitle,
64
- getTags,
65
- getBrief,
66
- getColoredTagsHTML,
67
- getSlug,
68
- getPathnameFromLocationHash,
69
- getLocationHashSpecifics,
70
- };
57
+ export { getPostData, getTitle, getTags, getBrief, getColoredTagsHTML, getSlug, getPathnameFromLocationHash, getLocationHashSpecifics, };
@@ -17,6 +17,6 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "three": "^0.182.0",
20
- "blazed-past-us": "^0.7.9"
20
+ "blazed-past-us": "^0.8.1"
21
21
  }
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blazed-past-us",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "A static blog framework made for developers that allows content to be written in Markdown directly from the IDE.",
5
5
  "license": "MIT",
6
6
  "author": "gass-git",
@@ -1,43 +0,0 @@
1
- name: deploy to Github pages
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- permissions:
9
- contents: read
10
- pages: write
11
- id-token: write
12
- deployments: write
13
-
14
- jobs:
15
- build-deploy:
16
- runs-on: ubuntu-latest
17
- defaults:
18
- run:
19
- working-directory: ./src/template
20
-
21
- steps:
22
- - uses: actions/checkout@v4
23
-
24
- - uses: actions/setup-node@v4
25
- with:
26
- node-version: 24
27
-
28
- - run: npm i
29
- - run: npm run build
30
-
31
- - uses: actions/upload-pages-artifact@v3
32
- with:
33
- path: ./src/template/dist
34
-
35
- - uses: actions/deploy-pages@v4
36
-
37
- - name: Create Deployment Record
38
- uses: chrnorm/deployment-action@v2
39
- with:
40
- token: ${{ secrets.GITHUB_TOKEN }}
41
- environment: github-pages
42
- environment-url: https://gass-git.github.io/blazed-past-us/
43
- ref: main
Binary file