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

Saaze zaps index string in URL #2

Open
eklausme opened this issue Jul 4, 2021 · 0 comments
Open

Saaze zaps index string in URL #2

eklausme opened this issue Jul 4, 2021 · 0 comments

Comments

@eklausme
Copy link

eklausme commented Jul 4, 2021

I have a blog post with title .../2019/08-02-oracle-deadlock-when-using-bitmap-index/. This URL was shortened to .../2019/08-02-oracle-deadlock-when-using-bitmap-/.

To get rid of this behaviour I changed two files:

  1. core/src/Commands/BuildCommand.php
  2. core/src/Entries/Entry.php

I commented out below code.
For 1:

        if (substr_compare($entry->slug(), 'index', -strlen('index')) === 0) {
            $entryDir = preg_replace('/index$/', '', $entryDir);
        }

For 2:

        if (substr_compare($this->slug(), 'index', -strlen('index')) === 0) {
            $slug = preg_replace('/index$/', '', $slug);
        }

Currently I think that this code serves no other purpose then zapping this index-string at end of URL. But maybe there is another reason.

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

No branches or pull requests

1 participant