Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog permalink #55

Merged
merged 4 commits into from
Dec 26, 2024
Merged

Blog permalink #55

merged 4 commits into from
Dec 26, 2024

Conversation

ansxor
Copy link
Contributor

@ansxor ansxor commented Dec 26, 2024

resolves #37

image

@ansxor ansxor changed the title added blog permalink Blog permalink Dec 26, 2024
@y-ack y-ack requested review from 12Me21 and y-ack December 26, 2024 18:35
if (!OPTS.has('dev')) {
const domain = Req.server.split("/")[0]
let href = undefined
if (Object.hasOwn(page.values, "share") && page.values.share) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we checking page.values.share twice? (i would just use if (page.values.share))

Copy link
Contributor Author

@ansxor ansxor Dec 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's to check if it's also a truthy value. if page.values.share won't throw an exception then i can also do that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok yes i can do that, pushing a change

src/navigate.js Outdated
@@ -66,6 +66,7 @@ class ViewSlot {
for (let x of items) {
let a = document.createElement('a')
a.href = x.href
a.target = x['target'] ?? '_self'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • should just be x.target || '_self' (i don't use ?? anywhere else in the code (..i hope i had a good reason for this))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fineee

@12Me21 12Me21 merged commit d12c7c6 into 12Me21:🌨️ Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants