Giter VIP home page Giter VIP logo

Comments (17)

jannec22 avatar jannec22 commented on July 24, 2024 2

Well, from curl or from browser search will require executing some code at runtime. Don't know what software currently serves the static content, but if it's apache/nginx whatever, for sure it is capable of invoking a script that would scan directories and filter out not matching files.

I am actually thinking about making the page "recursive". Imagine that you have the following recipe folder structure:

+ index.html
- polish_food
    + pierogi
    + rosół

then polish_food could actually have also an index.html which would be created according to a template and would be responsible only for recipes in that polish_food folder.

Compiling could then be recursive too.

And searching could search down from path, so:

GET /polish_food/search

would retrieve only results from polish food.
I believe it's pretty natural approach.

from based.cooking.

k144 avatar k144 commented on July 24, 2024 2

Git supports symlinks natively, so a recipe could be in many directories at once. Then each directory could have a site with a central automatically generated list. Going with @twiclo 's example, let's say someone wanted to upload "ozór wołowy" which is both Polish and beef. He could upload a txt file with a list of directories where the recipe fits:

cuisine/polish
ingredient/meat/beef

The original files could be in some folder segregated by authors, and then a script could create symlinks to them. I think such site structure would be good for discoverability of new recipes without any need for javascript or dynamic site generation.
And on a category site you could just ctrl+f. What do you think?

from based.cooking.

LukeSmithxyz avatar LukeSmithxyz commented on July 24, 2024

Yep. There are a million ways to do this and I haven't decided what's best.

People are welcome to recommend things because I think there are many directions we can go with this.

from based.cooking.

twiclo avatar twiclo commented on July 24, 2024

This might be a good time to talk about how the curl search will work. I would imagine that'd be easier to do if we keep it in mind when restructuring recipes

I'm interested in working on the search if @LukeSmithxyz can tell me how he wants it ran. I can whip something up in rust with actix-web pretty quick but I have a feeling that goes against the philosophy of this project

from based.cooking.

jannec22 avatar jannec22 commented on July 24, 2024

In fact that would form a linked list which is super handy, since other resources could be distributed all over the world on different servers, but the whole website would present a single interface. Only searching would be problematic, between servers if we consider searching deeper than one level

from based.cooking.

twiclo avatar twiclo commented on July 24, 2024

How would you handle someone searching for steak instead of beef? Or what if there's a dish that's both Polish and beef?

from based.cooking.

jannec22 avatar jannec22 commented on July 24, 2024

I am not sure if I understand the question. Are you asking about complex searches with logical expressions?

Searching could be done following the simple principles:

  1. In each recipe you provide a list of tags/related expressions
  2. Each recipe has a meaningful title
  3. Each recipe lays in a catalog that is related to the recipe or other way around.

Then you could just look at files down the requested path and simply decide if the tag list, title or catalog names match the requested query

from based.cooking.

twiclo avatar twiclo commented on July 24, 2024

Okay that makes sense. One thing I would like to see is a better organization structure for authors. I plan to submit quite a few articles so it'd be nice if I could have a folder that contained all of my content

from based.cooking.

jannec22 avatar jannec22 commented on July 24, 2024

That is quite a problem. I think It depends on the strategy, but this site, since it will be focused on content and not authors (it's about recipes not who made them), doesn't need that feature. If you want to keep all your recipes in one place the best would be to create your own instance of the site and link it with other instances. If searching of authors would be crucial, we could say that each author should have a top level folder with his name and surname. And you could ask like to give you one or you could still make your own instance and link it to the Luke's site. The one really problematic thing still would be searching through all of the content, since it would require recursive requests between instances which will not work.

from based.cooking.

Mr-X-666 avatar Mr-X-666 commented on July 24, 2024

I would propose just categorizing alphabetically based on the first letter.

from based.cooking.

jannec22 avatar jannec22 commented on July 24, 2024

But that would kill the ability to organise similar recipes which is more important when searching. I don't see why content should be kept sorted in some predefined way since its best to sort on search or while displaying. Well in this particular case pages would be sorted while compiling and putting together references to them

from based.cooking.

jannec22 avatar jannec22 commented on July 24, 2024

Sounds good, simpler and better searching at almost no cost.

from based.cooking.

DominikRusso avatar DominikRusso commented on July 24, 2024

There should still be a page with all the recipes as a single level list though (and preferably alphabetically sorted), that would make for the easiest ctrl+f.

from based.cooking.

LukeSmithxyz avatar LukeSmithxyz commented on July 24, 2024

Symlinking the articles is an interesting idea. It's a way of getting tagging for free.

We can, of course, still have a massive page with every link as well, but I feel like normalfriends will not like that too much.

from based.cooking.

sylGauthier avatar sylGauthier commented on July 24, 2024

Mentionning #78 as well, since it's related.

Symlinking the articles is an interesting idea. It's a way of getting tagging for free.

I'm not sure how that would work, you still need an index page per tag referencing all tagged articles. Plus symlink is a slippery slope towards spaghetti code.

I feel like normalfriends will not like that too much.

Normalfriends have a plethora of food blogs and fancy youtube videos to go to, I feel like as soon as you're offering a based static website with minimal CSS, you're already kind of filtering most of them...

from based.cooking.

k144 avatar k144 commented on July 24, 2024

I think you're right. Since the indexing pages would be there with the symlinking approach anyway, why bother symlinking at all if you can just link the original.

The indexing pages for each tag are already there tho, and they all fit on the main page, so most of the job is done.
There could be a directory tags with files listing out all tags of a given category, like tags/cuisines with a cuisine list. The makefile could put them on the homepage with <h3>'s for the category name and/or on their subpages. For tags outside of categories, using cat tags/* and join with the existing code generating the tag list could put them in "others".

from based.cooking.

hcars avatar hcars commented on July 24, 2024

Have you thought about building a simple information retrieval system? We could use very basic circa 2000 indexing and query processing.

from based.cooking.

Related Issues (20)

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.