Skip to content

Saaze zaps index string in URL #2

@eklausme

Description

@eklausme

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions