> For the complete documentation index, see [llms.txt](https://docs.mydukaan.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mydukaan.io/how-does-it-all-work.md).

# How does it all work?

As discussed previously, we use html files for different pages, products page has its own html file, similarly for categories page and so on.\
But how are all these pages related and linked to each other? The answer to that is a templating engine. \
We could also put all the .html into a single file layout.html but that would a horibble mess of code and a big huge difficult to read file and if you add dynamic content to it, god bless you and your coders! Hence we split it into different files for easier maintenance and understanding.\
\
However with this code could be duplicated across these files and a lot of other issues can arise.\
Hence to keep things organized, reduce repitition of code, and handle dynamic content we use a templating engine to simplify the things. \
\
Dukaan theme uses Nunjucks templating engine, we have explained about it in the [next chapter](/nunjucks-templating-language.md).<br>

## 🤔 How to know which file to change?

Let's understand with an example.\
Imagine the layout.html file is like the menu template for a restaurant. It defines the overall design, font, and color scheme of the menu. This template is used by all the different sections of the menu, such as appetizers, main courses, and desserts.

Now, think of the product.html file as the dessert section of the menu. It follows the same menu template (layout.html) but has its unique dessert items and descriptions listed.

In this case, Nunjucks acts like a menu designer who uses the menu template (layout.html) to create the overall look of the menu and then adds the specific items and descriptions for each section, like the desserts in the product.html file.

To customize the restaurant menu, you have two options:

1. If you want to change the overall design, font, or color scheme of the entire menu, you can edit the layout.html file (the menu template). This will affect all sections of the menu that use this template.
2. If you only want to change something specific to the dessert section, like adding a new dessert item or updating its description, you can edit the product.html file. This will only affect the dessert section and leave the rest of the menu untouched.

So, if you wanted to make the product title text bold, you have to goto the products.html page and then find the variable which contains the product title and update its css to bold.

\ <br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mydukaan.io/how-does-it-all-work.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
