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

Create a 404 page for when the link is Not found #22

Open
bobbingwide opened this issue May 3, 2022 · 2 comments
Open

Create a 404 page for when the link is Not found #22

bobbingwide opened this issue May 3, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

The current page in genesis-sb is:

image

@bobbingwide bobbingwide added the enhancement New feature or request label May 3, 2022
@bobbingwide bobbingwide self-assigned this May 3, 2022
bobbingwide added a commit that referenced this issue May 4, 2022
@bobbingwide
Copy link
Owner Author

On the 404 page, when a link that has been auto generated using sample_bigrams::the_content
is not found, for whatever reason, then it makes sense to implement similar logic to that implemented for search banter.

ie If the URL is for an SB bigram ( bigram\sword-bword eg https://s.b/bigram/bigram/six-bells )
then generate a post for it. In this case the title would be Six Bells; first letters capitalized.

Is it possible to determine the referrer in order to populate the content as "Referred from Sword Bword"?

@bobbingwide
Copy link
Owner Author

Is it possible to determine the referrer in order to populate the content as "Referred from Sword Bword"?

HTTP_REFERER may contain the URL of the referring post eg "https://s.b/bigram/bigram/shark-bloke/"
but more often than not it'll be the home URL or an archive URL eg "https://s.b/bigram/s-word/shark/"

If it's the home URL we could infer the original post by running the main query run for the home page.
Ditto for an archive. Or we could just run a search query and use the first post that's found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant