Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/assets/js/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const Result = ({ hit, components, category }) => {
</div>
<p className="text-gray-600 text-sm">
{hit.content && (
<span dangerouslySetInnerHTML={{__html: hit.content}} />
<span style={{ whiteSpace: 'pre-line' }} dangerouslySetInnerHTML={{ __html: hit.content }} />
)}
{!hit.content && (
<span style={{ wordBreak: 'break-word' }}>{hit.document.itemUrl}</span>
Expand Down
9 changes: 9 additions & 0 deletions website/assets/js/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"include": [
"**/*.ts",
"**/*.tsx",
"**/*.d.ts"
]
}

16 changes: 1 addition & 15 deletions website/layouts/partials/author-with-avatar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,14 @@
{{ $handle := . }}
{{ $img := printf "https://github.com/%s.png" $handle }}
{{ $link := printf "https://github.com/%s" $handle }}
{{ $apiUrl := printf "https://api.github.com/users/%s" $handle }}
{{ $name := $handle }}
{{ $displayName := $handle }}
{{ with resources.GetRemote $apiUrl }}
{{ with .Err }}
{{/* Silently fall back to GitHub handle on error */}}
{{ else }}
{{ $data := . | transform.Unmarshal }}
{{ if $data.name }}
{{ $name = $data.name }}
{{ $displayName = printf "%s (%s)" $data.name $handle }}
{{ end }}
{{ end }}
{{ end }}
<a href="{{ $link }}" class="flex items-center space-x-3 group" rel="noopener" target="_blank">
<img
class="h-12 w-12 rounded-full ring-1 ring-white dark:ring-dark"
src="{{ $img }}"
alt="Author avatar for {{ $handle }}"
/>
<span class="text-md font-bold tracking-tight text-gray-700 group-hover:text-secondary dark:text-gray-200">
{{ $displayName }}
{{ $handle }}
</span>
</a>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion website/scripts/typesense-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async function indexHTMLFiles(
tagName: node.tagName,
content: $(node)
.text()
.replace(/[\n\t]/g, " "),
.replace(/\t/g, " "),
});
}

Expand Down
6 changes: 5 additions & 1 deletion website/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@
"typeRoots": ["./node_modules/@types"]
},
"exclude": ["node_modules"],
"include": ["**/*.ts"]
"include": [
"**/*.ts",
"**/*.tsx",
"**/*.d.ts"
]
}
Loading