Open cadeon opened 1 year ago
I ended up setting - theme_dir = '/config/themes' theme_name = 'default'
and moving 'public' into '/config/themes/default/public' and my templates into '/config/themes/default/templates'
That works, but it feels like it's nowhere near the "intended" setup for theme template files.
Definitely a documentation problem, not you.
We're currently splitting the theme out from the core to help make this easier. The ideal flow we're working toward is:
npm install mytheme
or similarThe details are still being worked out on exactly how to do all that, but the theme package linked above is currently used in the latest release
If you're looking for "quick and easy" changes, such as 1-2 files, you should be able to put them in:
node_modules/@raneto/theme-default/dist/
That directory is the installed module, and dist
has the generated files
There are 3 different areas:
Hope this helps clarify
Config snippet with relevant sections
// Which Theme to Use?
//
// Local Directory Example (for development or custom themes)
// var theme_dir = path.join(__dirname, 'themes');
// var theme_name = 'my-theme-directory';
//
// Themes from NPM
// use "dist" as the theme name for modules (for now)
var theme_dir = path.join(
__dirname,
'..',
'node_modules',
'@raneto/theme-default'
);
var theme_name = 'dist';
...
// Specify the path of your content folder where all your '.md' files are located
// Fix: Cannot be an absolute path
content_dir: path.join(__dirname, '..', 'content', 'pages'),
// Where is the public directory or document root?
public_dir: path.join(theme_dir, theme_name, 'public'),
I haven't been able to figure out where to put my modified layout.html such that it will be picked up and used.
https://docs.raneto.com/templates/customizing-the-template indicates that the updated html files should go in "themes/default" but I'm not sure exactly where due to the relative path. Putting "themes" at the same level as "content", "images", and "public" feels correct but doesn't seem to work. Putting "themes" inside "public" doesn't seem to work either.