• ejnwebmaster

    (@ejnwebmaster)


    Suggestion: Is it possible to make the slugs match the name of the file that is loaded? Except in the case of “index.html” or “index.htm”, having a slug match the filename (minus the .htm*) would help, but I’m not sure if your database has that option.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Alan Fuller

    (@alanfuller)

    It would with coding changes. Thecurrent plugin detects the first H1 in the HTML and uses that for the post title and by default the post title is sanitized into the slug.

    Are youhandy with PHP code? As this may be fairly specific then it may bebest to add a filter.

    Thread Starter ejnwebmaster

    (@ejnwebmaster)

    I have no PHP experience. Always willing to learn, though.

    Is this in GitHub?

    Also, the H1 comes through as the page title, and that’s terrific. Shifting to using the filename as a slug would retain that match for the URL calls. For index.html pages, you’d use the folder name or category as the slug, since that also matches the URL.

    Not a complaint. This has been a real timesaver! Thanks!

    Plugin Author Alan Fuller

    (@alanfuller)

    github https://github.com/alanef/load-html-files

    this is a little ahead of the plugin as I added a filter in preparation of custom slug generation

    you are welcome to create pull requests but as mentioned elsewhere I will look at some of these as I get spare time.

    Thread Starter ejnwebmaster

    (@ejnwebmaster)

    I’ve offered a couple of changes in my fork:

    https://github.com/ejnwebmaster/load-html-files

    They address the slug and the post title issue.

    Thanks for your efforts!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.