fix build no display after using vite

This commit is contained in:
adueck 2024-08-14 19:20:20 -04:00
parent b35ad98d92
commit c01143f058
3 changed files with 144 additions and 136 deletions

View File

@ -1,4 +1,4 @@
[build] [build]
base = "website" base = "website"
command = "export REACT_APP_BUILD_NO=`git rev-parse --short HEAD` && npm run test && npm run build" command = "export VITE_BUILD_NO=`git rev-parse --short HEAD` && npm run test && npm run build"
publish = "dist" publish = "dist"

View File

@ -12,142 +12,150 @@ import { State } from "../types/dictionary-types";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import VideoPlayer from "../components/VideoPlayer"; import VideoPlayer from "../components/VideoPlayer";
const About = ({ state }: { state: State }) => ( const About = ({ state }: { state: State }) => {
<div className="width-limiter"> return (
<Helmet> <div className="width-limiter">
<link rel="canonical" href="https://dictionary.lingdocs.com/about" /> <Helmet>
<meta name="description" content="About the LingDocs Pashto Dictionary" /> <link rel="canonical" href="https://dictionary.lingdocs.com/about" />
<title>About - LingDocs Pashto Dictionary</title> <meta
</Helmet> name="description"
<h2>About</h2> content="About the LingDocs Pashto Dictionary"
<p> />
The <strong>LingDocs Pashto Dictionary</strong> aims to make an easily <title>About - LingDocs Pashto Dictionary</title>
searchable and accessible dictionary of the Pashto Language, along with </Helmet>
its inflections and verb conjugations. <h2>About</h2>
</p> <p>
<h3>Features</h3> The <strong>LingDocs Pashto Dictionary</strong> aims to make an easily
<ul> searchable and accessible dictionary of the Pashto Language, along with
<li>Approximate search-as-you-type</li> its inflections and verb conjugations.
<li>Alphabetical browsing</li> </p>
<li>Pashto Audio Recordings</li> <h3>Features</h3>
<li>Inflections and Verb Conjugations</li> <ul>
<li>Phrase Generation Engine</li> <li>Approximate search-as-you-type</li>
<li>Ability to suggest additions or corrections (with sign-in)</li> <li>Alphabetical browsing</li>
<li>Choice of spelling/phonetic systems</li> <li>Pashto Audio Recordings</li>
<li>...and more</li> <li>Inflections and Verb Conjugations</li>
</ul> <li>Phrase Generation Engine</li>
<h3>Video Introduction</h3> <li>Ability to suggest additions or corrections (with sign-in)</li>
<VideoPlayer url="https://www.youtube.com/watch?v=MMpSpaMMdp4&t=1s&ab_channel=LingDocs" /> <li>Choice of spelling/phonetic systems</li>
<h3>Installing</h3> <li>...and more</li>
<p> </ul>
After visiting this dictionary for the first time it will be accessible <h3>Video Introduction</h3>
from your browser even without an internet connection. You can also <VideoPlayer url="https://www.youtube.com/watch?v=MMpSpaMMdp4&t=1s&ab_channel=LingDocs" />
{` `} <h3>Installing</h3>
<strong>install it as an app</strong> on your phone or desktop by choosing <p>
"Add to Home Screen" on "Install" on your browser menu. It is also After visiting this dictionary for the first time it will be accessible
{` `} from your browser even without an internet connection. You can also
<a href="https://play.google.com/store/apps/details?id=com.lingdocs.pashto.dictionary"> {` `}
find and install it on the Google Play Store <strong>install it as an app</strong> on your phone or desktop by
</a> choosing "Add to Home Screen" on "Install" on your browser menu. It is
. also
</p> {` `}
<h3>Phonetic System</h3> <a href="https://play.google.com/store/apps/details?id=com.lingdocs.pashto.dictionary">
<p> find and install it on the Google Play Store
This dictionary (and the{" "}
<a href="https://grammar.lingdocs.com">grammar</a> that goes along with
it) uses a{" "}
<a href="https://grammar.lingdocs.com/writing/phonetics/">
special phonetic system
</a>{" "}
for writing the Pashto words in Latin letters, showing the pronunciation
the vowels. This has been designed to allow people to write and search
words <em>without needing to type an special characters</em>.
</p>
<h3>Inspiration and Sources</h3>
<p>
This dictionary is grateful for and indebted to the excellent work
available at <a href="https://qamosona.com/">qamosona.com</a>,{" "}
<a href="https://www.wiktionary.org/">wiktionary.org</a>, and{" "}
<a href="https://translate.google.com/">Google Translate</a>. These
sources were used extensively as a reference for definitions.
</p>
<p>
Currently this dictionary contains{" "}
{state.dictionaryInfo
? state.dictionaryInfo.numberOfEntries
: "about 15,000"}{" "}
entries. It is nowhere near as comprehensive or accurate as some of these
other sources, but it does strive to present something uniquely accesible
to learners through offline web-app availability,
inflection/conjugation/phrase-building engine, and smart searching
algorithms.
</p>
<h3>Contact</h3>
<p>Feedback and suggestions are appreciated.</p>
<ul>
<li>
Twitter: <a href="https://twitter.com/@lingdocs">@lingdocs</a>
</li>
<li>
Reddit: <a href="https://reddit.com/r/lingdocs">/r/lingdocs</a>
</li>
<li>
YouTube:{" "}
<a href="https://www.youtube.com/channel/UC1-yjDec5VDtia5s1gcMw4A">
LingDocs YouTube Channel
</a> </a>
</li> .
<li>Email: dev234 AT lingdocs DOT com</li>
</ul>
<p>
Or show your support through{" "}
<a href="https://www.buymeacoffee.com/lingdocsdev">buymeacoffee</a>
</p>
<h3>License and Legal Info</h3>
<h4>Source Code</h4>
<p>
This dictionary app is open sounce. The code is available{" "}
<a href="https://github.com/lingdocs/pashto-dictionary">here on GitHub</a>{" "}
and is licensed under a GPLv3 License.
</p>
<h4>Dictionary Content</h4>
<p>
The contents of this dictionary are licensed under a{" "}
<a
rel="license"
href="https://creativecommons.org/licenses/by-nc-sa/4.0/"
>
Creative Commons Creative Commons Attribution-NonCommercial-ShareAlike
4.0 International License
</a>
, with the added stipulation that this material cannot be used or
re-distributed by any people or groups involved with military, violence,
or government intelligence work.
</p>
<p>
The LingDocs Pashto Dictionary assumes no responsibility or liability for
any errors or omissions in the content of this site. The information
contained in this site is provided on an as is basis with no guarantees
of completeness, accuracy, usefulness or timeliness.
</p>
<p>
<Link to="/privacy">Privacy Policy</Link>
</p>
<p>
© Copyright 2023 - <a href="https://www.lingdocs.com/">lingdocs.com</a>
</p>
{state.dictionaryInfo && (
<p className="text-muted">
Number of Entries: {state.dictionaryInfo.numberOfEntries} - Updated:{" "}
{dayjs(state.dictionaryInfo.release).toString()}
</p> </p>
)} <h3>Phonetic System</h3>
{import.meta.env.REACT_APP_BUILD_NO && ( <p>
<p className="small text-muted"> This dictionary (and the{" "}
App build number: {import.meta.env.REACT_APP_BUILD_NO} <a href="https://grammar.lingdocs.com">grammar</a> that goes along with
it) uses a{" "}
<a href="https://grammar.lingdocs.com/writing/phonetics/">
special phonetic system
</a>{" "}
for writing the Pashto words in Latin letters, showing the pronunciation
the vowels. This has been designed to allow people to write and search
words <em>without needing to type an special characters</em>.
</p> </p>
)} <h3>Inspiration and Sources</h3>
</div> <p>
); This dictionary is grateful for and indebted to the excellent work
available at <a href="https://qamosona.com/">qamosona.com</a>,{" "}
<a href="https://www.wiktionary.org/">wiktionary.org</a>, and{" "}
<a href="https://translate.google.com/">Google Translate</a>. These
sources were used extensively as a reference for definitions.
</p>
<p>
Currently this dictionary contains{" "}
{state.dictionaryInfo
? state.dictionaryInfo.numberOfEntries
: "about 15,000"}{" "}
entries. It is nowhere near as comprehensive or accurate as some of
these other sources, but it does strive to present something uniquely
accesible to learners through offline web-app availability,
inflection/conjugation/phrase-building engine, and smart searching
algorithms.
</p>
<h3>Contact</h3>
<p>Feedback and suggestions are appreciated.</p>
<ul>
<li>
Twitter: <a href="https://twitter.com/@lingdocs">@lingdocs</a>
</li>
<li>
Reddit: <a href="https://reddit.com/r/lingdocs">/r/lingdocs</a>
</li>
<li>
YouTube:{" "}
<a href="https://www.youtube.com/channel/UC1-yjDec5VDtia5s1gcMw4A">
LingDocs YouTube Channel
</a>
</li>
<li>Email: dev234 AT lingdocs DOT com</li>
</ul>
<p>
Or show your support through{" "}
<a href="https://www.buymeacoffee.com/lingdocsdev">buymeacoffee</a>
</p>
<h3>License and Legal Info</h3>
<h4>Source Code</h4>
<p>
This dictionary app is open sounce. The code is available{" "}
<a href="https://github.com/lingdocs/pashto-dictionary">
here on GitHub
</a>{" "}
and is licensed under a GPLv3 License.
</p>
<h4>Dictionary Content</h4>
<p>
The contents of this dictionary are licensed under a{" "}
<a
rel="license"
href="https://creativecommons.org/licenses/by-nc-sa/4.0/"
>
Creative Commons Creative Commons Attribution-NonCommercial-ShareAlike
4.0 International License
</a>
, with the added stipulation that this material cannot be used or
re-distributed by any people or groups involved with military, violence,
or government intelligence work.
</p>
<p>
The LingDocs Pashto Dictionary assumes no responsibility or liability
for any errors or omissions in the content of this site. The information
contained in this site is provided on an as is basis with no
guarantees of completeness, accuracy, usefulness or timeliness.
</p>
<p>
<Link to="/privacy">Privacy Policy</Link>
</p>
<p>
© Copyright 2023 - <a href="https://www.lingdocs.com/">lingdocs.com</a>
</p>
{state.dictionaryInfo && (
<p className="text-muted">
Number of Entries: {state.dictionaryInfo.numberOfEntries} - Updated:{" "}
{dayjs(state.dictionaryInfo.release).toString()}
</p>
)}
{import.meta.env.VITE_BUILD_NO && (
<p className="small text-muted">
App build number: {import.meta.env.VITE_BUILD_NO}
</p>
)}
</div>
);
};
export default About; export default About;

View File

@ -2,7 +2,7 @@
/// <reference types="vite-plugin-pwa/client" /> /// <reference types="vite-plugin-pwa/client" />
interface ImportMetaEnv { interface ImportMetaEnv {
readonly REACT_APP_BUILD_NO: string; readonly VITE_BUILD_NO: string;
} }
interface ImportMeta { interface ImportMeta {