Comments (17)
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.
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.
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.
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.
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.
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.
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:
- In each recipe you provide a list of tags/related expressions
- Each recipe has a meaningful title
- 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.
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.
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.
I would propose just categorizing alphabetically based on the first letter.
from based.cooking.
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.
Sounds good, simpler and better searching at almost no cost.
from based.cooking.
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.
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.
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.
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.
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)
- To make based.cooking a sharable document HOT 3
- Images larger than 100kb HOT 1
- Styling on landing page - Underline overload HOT 1
- Inherit the stylesheet of lugo HOT 1
- Standardise units of measurement HOT 1
- Recipes translated to other languages HOT 2
- Rename "Fasting" tag to "Vegetarian"
- Tomato Flavored Hamburger and Macaroni typo + broken link
- example.md and README.md contradiction
- Change video links HOT 2
- Should I add pictures when I didn't quite follow the recipe?
- Ambiguous Ingredient Quantity HOT 2
- Zim is available HOT 1
- [Question] download entire site for offline use HOT 3
- Project status HOT 8
- Broccoli can't scrape based.cooking recipies HOT 2
- New fork HOT 1
- Duplicate ingredient (butter) in "apple-pie" recipe.
- Misleading tag in content/pancake.md
- Is this project dead? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from based.cooking.