Skip to content

Commit

Permalink
Merge branch 'release/1.1.0-alpha.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nekofar committed Jan 30, 2024
2 parents a726a05 + e5993cc commit f9a4895
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 38 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file.

## [1.1.0-alpha.0] - 2024-01-30

### Features

- Add base meta tags for support Fracaster frames

### Refactor

- Update `handle_redirect` to improve code readability

## [1.0.5] - 2024-01-21

### Bug Fixes
Expand Down
18 changes: 9 additions & 9 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lilnouns-click"
version = "1.0.5"
version = "1.1.0-alpha.0"
authors = ["Milad Nekofar <[email protected]>"]
edition = "2021"
description = "A Nounish URL shortener for LilNouns DAO."
Expand All @@ -21,9 +21,9 @@ html-escape = { version = "0.2.13", default-features = false }
html-minifier = { version = "5.0.0", default-features = false }
log = { version = "0.4.20", features = [] }
percent-encoding = "2.3.1"
regex = "1.10.2"
regex = "1.10.3"
reqwest = "0.11.23"
serde = { version = "1.0.195", features = ["derive"] }
serde = { version = "1.0.196", features = ["derive"] }
sqids = "0.3.0"
unidecode = "0.3.0"
url = "2.5.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"dev": "wrangler dev"
},
"devDependencies": {
"wrangler": "3.23.0"
"wrangler": "3.25.0"
}
}
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

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

38 changes: 23 additions & 15 deletions src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ pub async fn handle_redirect<D>(req: Request, ctx: RouteContext<D>) -> worker::R
<meta name="twitter:description" content="{}">
<meta name="twitter:image" content="{}">
<meta property="fc:frame" content="vNext" />
<meta property="fc:frame:image" content="{}" />
<meta property="fc:frame:button:1" content="{}" />
<meta property="fc:frame:post_url" content="{}" />
<meta http-equiv="refresh" content="3; url={}" />
<title>{}</title>
Expand All @@ -134,21 +139,24 @@ pub async fn handle_redirect<D>(req: Request, ctx: RouteContext<D>) -> worker::R
</body>
</html>
"#,
url,
encode_safe(&title),
encode_safe(&description),
image,
image,
encode_safe(&title),
url,
encode_safe(&title),
encode_safe(&description),
image,
url,
encode_safe(&title),
encode_safe(&description),
url,
encode_safe(&title),
url, // OpenGraph URL
encode_safe(&title), // OpenGraph Title
encode_safe(&description), // OpenGraph Description
image, // OpenGraph Image URL
image, // OpenGraph Image Secure URL
encode_safe(&title), // OpenGraph Image Alt
url, // Twitter URL
encode_safe(&title), // Twitter Title
encode_safe(&description), // Twitter Description
image, // Twitter Image
image, // Farcaster Image
"Show Result", // Farcaster Button #1
url, // Farcaster Post URL
url, // Page Refresh URL
encode_safe(&title), // Page Title
encode_safe(&description), // Page Description
url, // Page Content Link URL
encode_safe(&title), // Page Content Link Title
);

let minified_html = minify(html_doc).expect("Failed to minify HTML");
Expand Down

0 comments on commit f9a4895

Please sign in to comment.