GithubHelp home page GithubHelp logo

Comments (4)

cmil avatar cmil commented on July 26, 2024

Before implementing the slug, I'd like to make sure we have a common understanding of what we want to achieve. The idea (at least mine) of using names instead of IDs for filenames and URL slugs was to make those easy to recognise and memorable. IMO the example slugs added in 4ba1157 tend to deviate from that idea. Some of them are way too long to be memorable and it takes quite some visual parsing to distinguish the different farces nouvelles from each other. I think we should stick to shorter slugs, also considering that they would end up as file names where an excessive length would be rather impractical for various reasons.

Also, underscores in the original filenames are already replaced by dashes when adding the files to fredracor, so slug overrides like anonyme-adam or most of the racine-* ones wouldn't actually be necessary.

from fredracor.

lehkost avatar lehkost commented on July 26, 2024

All very good points, and I agree we should put purpose first. So we might abandon the slug idea in general. Or, inherit the filename from TC, lowercase and dash it as we already do, but additionally divide words in our slugs.

E.g. "anonyme-resurrectionjeninlandore" → "anonyme-resurrection-jenin-landore"

If we'd be a commercial website, I'd argue that we do this for SEO reasons. 😊 But since we aren't, I'd argue that this leads to better readability (also since URLs/slugs will land in our data files and spreadsheets for analyses).

So, if we decide to do it this way, should we strive for an automatic solution that uses the title pattern to divide slugs, or manually?

from fredracor.

lehkost avatar lehkost commented on July 26, 2024

I just committed the compromise proposed above (28edf10).

Slugs now feature the exact same letters as in the original TC, but individual words are separated with dashes (both authors and abbreviated titles). I kept the underscore between author(s) and titles, in case we need it later. Other than that, underscores can still be transformed to dashes in the URL.

Examples:

  • "LAFONTLESAGE_QUERELLEDESTHEATRES.xml" → "lafont-lesage_querelle-des-theatres.xml"

I did not remove obvious spelling mistakes (there are just a few), like this:

  • "DIDEROT_ENTRETIENDELAMBERTDIDEROT.xml" → "diderot_entretien-d-elambert-diderot.xml" (should be "d'alembert")

from fredracor.

cmil avatar cmil commented on July 26, 2024

@lehkost please have a look at the above PR. I replaced all underscores with hyphens for simplicity. I also removed all slug attributes that are not strictly necessary because they affect the performance of the transformation script. I also updated the staging database with the new versions.

from fredracor.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.