mirror of
https://github.com/arfct/itty-bitty.git
synced 2026-03-11 08:54:33 +00:00
ignore descriptions shorter than one character
This commit is contained in:
parent
a7f5be7f1f
commit
6fb057cec6
3 changed files with 8 additions and 5 deletions
|
|
@ -1,10 +1,14 @@
|
|||
<!DOCTYPE html><html xmanifest="manifest.appcache"><meta name="viewport" content="width=device-width, viewport-fit=cover"><meta name="description" content="itty bitty things can be conveyed in a link.">
|
||||
<!DOCTYPE html>
|
||||
<html xmanifest="manifest.appcache">
|
||||
<meta name="viewport" content="width=device-width, viewport-fit=cover">
|
||||
<meta name="description" content="itty bitty things can be conveyed in a link.">
|
||||
|
||||
<link id="favicon" rel=icon href=''>
|
||||
<script src="/js/lzma/lzma-d-min.js"></script>
|
||||
<script src="/data.js"></script>
|
||||
<script src="/render.js"></script>
|
||||
<script src="/index.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/render.css">
|
||||
<link rel="stylesheet" href="/index.css">
|
||||
<noscript>To use itty.bitty, please enable JavaScript.</noscript>
|
||||
<div id="toast">itty.bitty is experimental technology that renders linked content from outside sources. <a href="http://toast.bitty.site" target="_blank">Learn more</a>.
|
||||
<br><br>This content is only as trustworthy as its source, and it should be treated with the caution
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#! /bin/bash
|
||||
cd docs/legacy
|
||||
terser data.js > data-min.js
|
||||
terser index.js > index-min.js
|
||||
uglifycss index.css > index-min.css
|
||||
|
|
@ -15,7 +15,7 @@ exports.index = functions.https.onRequest((request, response) => {
|
|||
|
||||
let content = "";
|
||||
if (title) content += `<title>${title}</title><meta property="og:title" content="${title}"/>`;
|
||||
if (desc) content += `<meta name="description" content="${desc}"/><meta property="og:description" content="${desc}"/>`;
|
||||
if (desc && desc.length > 1) content += `<meta name="description" content="${desc}"/><meta property="og:description" content="${desc}"/>`;
|
||||
if (image) {
|
||||
if (image.startsWith("http")) {
|
||||
content += `<meta property="og:image" content="${image}"/>`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue