OG index.json

Can someone share the code for the original layouts/index.json? I had modified it and want to revert to the original one?

You can scroll down on the theme page— listed at the bottom in a separate section are all the defaults.

But it’s also here. theme-blank/layouts/index.json at master · microdotblog/theme-blank · GitHub

And if you want to revert and not make any customizations at all to the file, it’s better to just delete it from your custom theme. That way, you will always have the latest version of the file, should it be updated in the future.

Thanks, @jsonbecker and @sod. In that case, perhaps I need to understand the file structure better. In my custom theme page, I have three sections with a bunch of files in it - custom templates, templates for default, and default templates (I’m not sure how the latter two are different).

I usually make changes to the file in the first section, so based on your answers, I assume the files in the latter two sections remain unchanged, and the first section contains the edited copy. So if I deleted my edited copy, Micro.blog will use the one in the default, right?

However, the path of both files looks similar (see screenshot) hence, I guess I’m never sure which file I am editing.

PS. I fully understand this is FAFO behavior but that’s the only way I have learnt anything.

Custom Templates = What @pratik should edit. templates from theme blah are the defaults from the theme that you have loaded. Default Templates are Micro.blog defaults.

Order of operations is if custom exists, use that, if it doesn’t fall back to theme, if that doesn’t fall back to MB.

Only ever edit the first set.

Got it. Thanks. So if I delete a file in Custom Templates, I should first ensure a similarly named file exists in Default Templates so Micro.blog will use that if one in Custom Templates doesn’t exist. Also, when I create a new file, it creates it in Custom Templates, right?

yes, creating a file goes in custom templates.

No you don’t have to check-- it’s quite possible that file is not necessary for your site. If it is necessary for the theme or micro.blog, it will be contained in those other sections. The only way that file wont exist is if it’s something you created entirely custom yourself.

1 Like