Skip to content

Commit

Permalink
banner and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-phillips1 committed Jul 4, 2024
1 parent 2a01cba commit 8bfb357
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 28 deletions.
17 changes: 17 additions & 0 deletions .github/assets/banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ['master']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"dev": "vite --host 0.0.0.0",
"build": "vite build"
"build": "vite build",
"preview": "vite preview"
},
"author": "",
"license": "ISC",
"devDependencies": {
"vite": "^5.0.12"
"vite": "^5.3.2"
}
}
7 changes: 4 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<!-- <img src="./public/4906292.png" alt="drawing" width="200"/> -->
[![link later banner](./.github/assets/banner.svg)](https://hellraiserrob.github.io/link-later)

# Link Later

## Introduction

This is a small library to find and replace keywords in your html with linked keywords, it could also be easily adapted for different purposes, such as highlighting specific keywords.

Use cases might internal linking for SEO purposes, or affiliate linking.

[Demo](https://hellraiserrob.github.io/link-later/)


## What it does

In a nutshell it does this
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const options: Option[] = [
target: "_blank",
classes: "test-class",
debug: true,
ignore: ["SPAN"]
ignore: ["SPAN", "A"]
},
],
},
Expand Down
14 changes: 1 addition & 13 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
// import pkg from "./package.json";
import fs from "fs";
import { defineConfig } from "vite";
import { resolve } from "path";

export default defineConfig({
build: {
lib: {
// formats: ["es", "iife"],
entry: resolve(__dirname, "src/link-later.ts"),
name: "ls",
fileName: "ls"
},
},
plugins: [
]
base: "/link-later/"
});

0 comments on commit 8bfb357

Please sign in to comment.