Skip to content

Commit

Permalink
Trying out OpenSearch (issue #39)
Browse files Browse the repository at this point in the history
  • Loading branch information
haukex committed Dec 30, 2024
1 parent 71db23b commit 4d57958
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
all: dist/index.html

dist/index.html: lint src/index.html src/*/*.ts package*.json src/*/tsconfig.json .parcelrc
npx parcel build
npx parcel build --public-url=https://dict.zero-g.net/

.PHONY: lint
lint:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Thanks ❤️
[correction](https://github.com/haukex/de-en-dict/issues/27)
- [@christophfriedrich (Christoph Friedrich)](https://github.com/christophfriedrich)
for [several suggestions](https://github.com/haukex/de-en-dict/issues?q=author%3Achristophfriedrich)
- [@rmetzler (Richard Metzler)](https://github.com/rmetzler)
for [suggesting OpenSearch support](https://github.com/haukex/de-en-dict/issues/39)
- Several (anonymous) people who sent bug reports and suggestions,
and several people who emailed me expressing their thanks!

Expand Down
53 changes: 53 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
"@eslint/js": "^9.8.0",
"@parcel/config-default": "^2.12.0",
"@parcel/packager-raw-url": "^2.12.0",
"@parcel/packager-xml": "^2.12.0",
"@parcel/transformer-typescript-tsc": "^2.12.0",
"@parcel/transformer-webmanifest": "^2.12.0",
"@parcel/transformer-xml": "^2.12.0",
"@stylistic/eslint-plugin": "^2.8.0",
"@types/eslint__js": "^8.42.3",
"@types/node": "^20.14.12",
Expand Down
1 change: 1 addition & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="manifest.json">
<link rel="icon" href="icons/favicon.ico">
<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="De-En-Dict" />
<title>German-English Dictionary</title>
<style>@import 'main.css'; /* parcel will inline and minify this */</style>
<script type="module">import "./js/main.ts"; /* parcel will inline and minify this */</script>
Expand Down
6 changes: 6 additions & 0 deletions src/opensearch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>De-En-Dict</ShortName>
<Description>German-English Dictionary</Description>
<Url type="text/html" template="https://dict.zero-g.net/#q={searchTerms}"/>
</OpenSearchDescription>

0 comments on commit 4d57958

Please sign in to comment.