Mirrored Notes in a Separate Folder

Here I’m breaking out the first part of the question titled “Separate Folder for Mirrored Notes.”

The original request was stated like this:

For a more streamlined note hierarchy, would it be possible to keep the mirrored notes (.html) in a separate folder within the collection folder? This would provide a cleaner folder view, improving workability with other text editors. Some markdown text editors recognize .html and .css files in addition to .md, which causes a bit of inconvenience.

So the easiest way to accomplish this is simply to edit the generated sample mirror template files and change the output commands to specify the name of a subfolder in which you would like all of the html files to be placed. The other change would be to change the path to the css file.

Here’s an example of what the top of these templates would look like, after modification. With these changes, the html files would be placed in a subfolder named web.

Let me know if this helps, @zgr .

<?nextrec?>
<?output "../../web/=$title&f$=.html" ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>=$title$=</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="../mirror/css/styles.css" type="text/css" />
</head>
1 Like

That worked like a charm. thank you!

1 Like

For those who are interested, in the index_mirror.html file, the first line should be

<?output "../../web/index.html" ?>

Then the index file will also be in web folder

2 Likes

In the index.html, is it possible to have indentation according to the seq/level per note?

I want to achieve organization similar to the screenshot shown below, which is the second part of seq+title view :

Let me ask you a question, @zgr. Are you trying to mirror your notes because you are trying to create a website for viewing by anyone on the web, or are you trying to mirror your notes to provide an alternative way for you to view them on your devices? A little context might help me understand your issue better.

Thanks!

to provide an alternative way for you to view them on your devices

Try the latest beta.

Then modify your template file to include the following before the title of each Note.

=$level&^r&nbsp;&nbsp;^$=

This should effectively insert two non-breaking spaces for every increase in the level value.

Let me know how this works for you.

1 Like

One more instant solution from @hbowie !!!

This is what I got (I’ve added 4 spaces), more or less what I seek, thank you!

I wonder if level 1 could have no spaces, so it would be left-aligned and make the outline a bit cleaner. However, I’m not sure if that would be easy to achieve.

Check out the latest beta.

You will need to modify your variable modifier string.

Give this a try:

=$level&^r-1,2,&nbsp;^$=

The ‘-1’ subtracts one from the level value, converting a 1 into a zero.

The following ‘2’ multiples the value by two, so that the repeating string will be repeated twice for each level above 1.

The following string, then, only needs to contain one non-breaking space.

Let me know how this works for you.

Thanks!

1 Like

That worked, level 1 is left-aligned, outline is nicer!

Thank you!

1 Like