Skip to content

4.1 Define yours preferences

Christophe Avonture edited this page Apr 19, 2017 · 13 revisions

You'll find a settings.json.dist file in the application rootfolder. To be able to use your own settings, make a copy of that file and name the new file settings.json.

Note : it's better to make a copy of the file and not just rename it

Changes you'll made to your settings.json file won't be overwritten by getting a newer version of this script but changes done into settings.json.dist well so it's a very bad idea to modify that file.

For editing the settings.json file, be sure to use a text editor like Notepad++ (under Windows) i.e. a program that will edit text file without adding markups (like Word do f.i.). And, second thing, be sure to always save the file with a UTF8-NoBom encoding. In Notepad++, take a look on the Encoding menu to select the good one.

The file will looks like this : (april 2017)

{
	"admin": {
		"login": "admin",
		"password": "marknotes"
	},
	"convert": {
		"decktape": {
			"script" : "c:\\tools\\decktape\\phantomjs.exe"
		},
		"pandoc": {
			"script" : "c:\\tools\\pandoc\\pandoc.exe",
			"options" : {
				"pdf" : "--latex-engine=xelatex -V geometry:margin=1in"
			}
		}
	},
	"debug": 0,
	"development": 0,
	"editor": 1,
	"encryption": {
		"password": "",
		"method": "aes-256-ctr"
	},
	"folder": "docs",
	"language": "en",
	"list": {
		"opened": 0,
		"auto_open": []
	},
	"locale": "fr-FR",
	"optimisation": {
		"browser_cache": 1,
		"lazyload": 1,
		"localStorage": 1,
		"server_session": 1
	},
	"page": {
		"google_font": "",
		"img_maxwidth": 800,
		"jolitypo": 1,
		"robots": "noindex, nofollow"
	},
	"site_name": "marknotes | An Open Source notes management tool",
	"slideshow": {
		"bullet": {
			"fontawesome": "check",
			"extra_attribute": ""
		},
		"type": "reveal",
		"reveal": {
			"animation": {
				"bullet": "animated",
				"h1": "zoom",
				"h2": "concave",
				"h3": "slide-in",
				"h4": "fade",
				"h5": "fade",
				"h6": "fade"
			},
			"section": {
				"extra_data_img_attr": "data-background-size='contain'"
			}
		}
	},
	"tag_prefix": "§",
	"tags": [],
	"templates": {
		"html": "html",
		"pdf": "pdf",
		"remark": "remark",
		"reveal": "reveal",
		"screen": "screen",
		"timeline": "timeline"
	},
	"treeview": {
		"default": "marknotes/how-to-use.md"
	},
	"languages": {
		"en": {
			"action_download": "Download this file",
			"action_html": "View this slideshow like an article",
			"action_slideshow": "View this article like a slideshow",
			"allow_popup_please": "The new window has been blocked by your browser, please allow popups for your domain",
			"apply_filter": "Filtering to [%s]",
			"apply_filter_tag": "Display notes containing this tag",
			"button_encrypt": "Add encryption for the selection",
			"button_exit_edit_mode": "Exit the editing mode",
			"button_save": "Submit your changes",
			"button_save_done": "The note has been successfully saved",
			"button_save_error": "There was an error while saving the note",
			"cancel": "Cancel",
			"copy_clipboard": "Copy the note's content, with page layout, in the clipboard",
			"copy_link": "Copy the link to this note in the clipboard",
			"copy_clipboard_done": "The note's content has been copied.  You can now paste the clipboard in your application.",
			"copy_link_done": "The URL of this note has been copied into the clipboard",
			"confidential": "confidential",
			"display_that_note": "Display that note",
			"edit_file": "Edit",
			"error": "Error",
			"error_create_file": "An error has occured during the creation of the note [%s]",
			"error_create_folder": "An error has occured during the creation of the folder [%s]",
			"error_delete_file": "An error has occured during the deletion of the note [%s]",
			"error_rename_file": "An error has occured when trying to rename the note [%s] into [%s]",
			"error_rename_folder": "An error has occured when trying to rename the folder [%s] into [%s]",
			"export_docx": "Export the note as a DOCX document",
			"export_pdf": "Export the note as a PDF document",
			"file_created": "The note [%s] has been successfully created on the disk",
			"file_deleted": "The note [%s] has been successfully deleted",
			"file_not_found": "The note [%s] doesn\\'t exists",
			"file_read_only": "The note [%s] is read-only, it\\'s then impossible to delete it",
			"file_renamed": "The note [%s] has been renamed into [%s]",
			"files_found": "%s has been retrieved",
			"folder_created": "The folder [%s] has been created on the disk",
			"folder_deleted": "The folder [%s] and its content has been deleted",
			"folder_not_deleted": "The folder [%s] is outside your documentation root folder and therefore will not be deleted",
			"folder_not_found": "The folder [%s] doesn\\'t exists",
			"folder_read_only": "Sorry but the folder [%s] is read-only",
			"folder_renamed": "The folder [%s] has been renamed into [%s]",
			"fullscreen": "Display the note in fullscreen",
			"incorrect_parameter": "The parameter [%s] is incorrect",
			"is_encrypted": "This information is encrypted in the original note and decoded here for screen display",
			"json_error": "The [%s] task has returned an invalid JSON result",
			"loading_tree": "Loading the list of notes, please wait...",
			"login": "Username",
			"login_error": "Incorrect login, please try again",
			"login_success": "Login successfull",
			"loginform": "Login form",
			"no_save_allowed": "Error, saving notes isn't allowed.",
			"not_authenticated": "You need first to authenticate",
			"on_this_page": "On this page",
			"open_html": "Open in a new window",
			"OK": "Ok",
			"password": "Password",
			"please_wait": "Please wait...",
			"print_preview": "Print preview",
			"refresh": "Refresh",
			"search_no_result": "Sorry, the search is not successfull",
			"search_placeholder": "Search...",
			"settings_clean": "Clear cache",
			"settings_clean_done": "The application's cache has been cleared",
			"signin": "Sign in",
			"sitemap": "Get the sitemap",
			"slideshow": "slideshow",
			"timeline": "Display notes in a timeline view",
			"tree_delete_file": "Delete the note [%s]",
			"tree_delete_folder": "Remove the folder [%s] and everything in that folder",
			"tree_delete_file_confirm": "Are you really sure you want to delete the note [%s] ?",
			"tree_delete_folder_confirm": "Are your really sure you want to kill everything in the folder [%s] and the folder itself ?",
			"tree_rename": "Rename",
			"tree_new_folder": "Create a new folder",
			"tree_new_folder_name": "New folder",
			"tree_new_note": "Create a new note",
			"tree_new_note_name": "New note"
		},
		"fr": {
			"action_download": "Télécharger ce fichier",
			"action_html": "Afficher la présentation comme un article",
			"action_slideshow": "Voir cet article sous le format présentation",
			"allow_popup_please": "La nouvelle fenêtre a été bloquée par votre navigateur, veuillez s'il vous plaît autoriser les 'popups' pour votre domaine",
			"apply_filter": "Limite la liste des notes à [%s]",
			"apply_filter_tag": "Affiche les notes reprennant ce mot",
			"button_encrypt": "Encrypte la sélection",
			"button_exit_edit_mode": "Quitte le mode édition",
			"button_save": "Enregistre vos modifications sur le serveur",
			"button_save_done": "Le fichier a été enregistré avec succès",
			"button_save_error": "Une erreur a été rencontrée lors de la sauvegarde",
			"cancel": "Annuler",
			"copy_clipboard": "Copie le contenu de la note, avec mise en page, dans le presse-papier",
			"copy_clipboard_done": "La note a été copiée.  Vous pouvez vous rendre dans l'application de destination et coller le contenu du presse-papier",
			"copy_link": "Copier le lien vers cette note dans le presse-papier",
			"copy_link_done": "L'URL vers cette note a été copiée dans le presse-papier.",
			"confidential": "confidentiel",
			"display_that_note": "Afficher cette note",
			"edit_file": "Éditer",
			"error": "Erreur",
			"error_create_file": "Une erreur a été rencontrée lors de la création du fichier [%s]",
			"error_create_folder": "Une erreur a été rencontrée lors de la création du dossier [%s]",
			"error_delete_file": "Une erreur a été rencontrée lors de la suppression du fichier [%s]",
			"error_rename_file": "Une erreur a été rencontrée lors de la tentative de renommer le fichier [%s] en [%s]",
			"error_rename_folder": "Une erreur a été rencontrée lors de la tentative de renommer le dossier [%s] en [%s]",
			"export_docx": "Exporter cette note au format docx",
			"export_pdf": "Exporter cette note au format pdf",
			"file_created": "Le fichier [%s] a été créé sur le disque",
			"file_deleted": "La note [%s] a été supprimée sur le disque",
			"file_not_found": "Le fichier [%s] n'existe pas",
			"file_read_only": "Le fichier [%s] est en lecture seule, il n'est pas possible de le supprimer",
			"file_renamed": "Le fichier [%s] a été renommé en [%s]",
			"files_found": "%s fichiers ont été retrouvés",
			"folder_created": "Le dossier [%s] a été créé sur le disque",
			"folder_deleted": "Le dossier [%s] et son contenu a été supprimé",
			"folder_not_deleted": "Le dossier [%s] se trouve en dehors du dossier qui contient vos notes et par conséquent n'a pas été supprimé",
			"folder_not_found": "Le dossier [%s] ne semble pas exister",
			"folder_read_only": "Désolé, le dossier [%s] est en lecture seule",
			"folder_renamed": "Le dossier [%s] a été renommé en [%s]",
			"fullscreen": "Affiche la note en plein écran",
			"incorrect_parameter": "Le paramètre [%s] est incorrect",
			"is_encrypted": "Cette information, même si elle est affichée en clair, est cryptée dans le fichier. Elle n'est pas donc pas accessible si on ouvre immédiatement le fichier source.",
			"json_error": "La tâche [%s] a retourné une réponse JSON incorrecte",
			"loading_tree": "Chargement de la liste des notes, merci de patienter...",
			"login": "Nom d'utilisateur",
			"login_error": "Erreur de connexion, veuillez réessayer s'il vous plaît",
			"login_success": "Connexion réussie",
			"loginform": "Formulaire de connexion",
			"no_save_allowed": "Erreur, l'édition des notes n'est pas autorisée.",
			"not_authenticated": "Vous devez d'abord vous authentifier",
			"on_this_page": "Sur cette page",
			"open_html": "Ouvrir dans une nouvelle fenêtre",
			"OK": "Oui",
			"password": "Mot de passe",
			"please_wait": "Un peu de patience s'il vous plaît...",
			"print_preview": "Aperçu avant impression",
			"refresh": "Rafraîchir",
			"search_no_result": "Désolé, votre recherche n'a pas retourné de résultat",
			"search_placeholder": "Recherchez...",
			"settings_clean": "Nettoie le cache de l'application",
			"settings_clean_done": "Le cache de l'application a été nettoyé",
			"signin": "Se connecter",
			"sitemap": "Afficher la carte du site",
			"slideshow": "Affiche le document au format 'présentation'",
			"timeline": "Affiche la liste des notes, par ordre chronologique inversé",
			"tree_delete_file": "Supprimer la note [%s]",
			"tree_delete_folder": "Supprimer l'intégralité du dossier [%s]",
			"tree_delete_file_confirm": "Êtes-vous certain de vouloir supprimer la note [%s] ?",
			"tree_delete_folder_confirm": "Êtes-vous certain de vouloir supprimer le dossier [%s] et tout ce qu'il contient ?",
			"tree_rename": "Renommer",
			"tree_new_folder": "Créer un nouveau dossier",
			"tree_new_folder_name": "Nouveau dossier",
			"tree_new_note": "Créer une nouvelle note",
			"tree_new_note_name": "Nouvelle note"
		}
	}
}
  • admin : If both login and password are empty, the system won't ask for a valid authentication and actions like deleting or editing a note will be allowed without to give credentials,
    • login : admin by default. Login to use to establish a valid session (see button login), you can of course change this info by making your own settings.json file.
    • password : marknotes by default. Password to use to establish a valid session (see button login), you can of course change this info by making your own settings.json file,
  • convert :
    • decktape : decktape is a tool that allows to convert a reveal or remarks presentation to a nice pdf file. See https://github.com/astefanutti/decktape for more info.
      • script : location of your phantomjs.exe program
    • pandoc : pandoc is a software on Windows that will allows to convert markdown files to, f.i. a pdf or a docx one. See http://pandoc.org/ for more info.
      • script : location of your pandoc.exe program
      • options :
        • docx : extra options that will be added to the command line when the notes will be converted to a .docx file. For instance -S --toc
        • pdf : extra options that will be added to the command line when the notes will be converted to a pdf file. For instance -S --toc --latex-engine=xelatex -V geometry:margin=1in
  • debug : 0 / 1. Enable or not debuging i.e. get extra logging informations,
  • development : 0 / 1. Enable or not the development mode. That mode can break the normal way of working of the application f.i. stop functionnalities before doing it (f.i. rewrite files). Don't activate that mode unless you really know what you're doing. For coders only,
  • editor : 0 / 1. Allow or not editing through the interface. When editor is set on 0, the edit icon won't be displayed,
  • encryption :
    • password : your password for the encryption. Don't forget it ! There is no way to recoved it.
    • method : the method used for the encryption,
  • folder: by default, your notes should be located in a folder called 'docs'. You can change the name here,
  • language : your interface language. Be sure that strings are translated in that language. You can see that (or translate) in the languages node. So, if you wish the interface in French, because 'fr' is already available under languages, just type 'fr' here. Can be an another one but in that case, you'll need to translate each sentences from, f.i. languages->en an create your own entry (f.i. languages->nl),
  • list :
    • opened : 0 / 1. By displaying the application interface, how the treeview at the left should be displayed ? Every folders opened or only the first level ? If you set opened to 1, every folders will be opened, to the depest level. By putting 0, only the first level will be opended,
    • auto_open : (optional, can stay empty) a list of folder name that should be automatically opened when opened is set to 0. Just mention the relative folder name so s.i. 'folder1', 'folder2', 'folder3/subfolder1', ... Relative : name compared to folder mentionned here above,. Note : you can type more than one,
  • locale : a valid local string like 'en-US','fr-FR','nl-BE', ... (with the minus sign, not an underscore),
  • optimisation :
    • browser_cache : 0/1. Do you want to use the navigator cache ? If so, specify 1 here so that the needed meta will be added,
    • lazyload: 0/1. Do you wish to load images only when they are about to be displayed on the screen i.e. not every images during the load time of the page but only when needed,
    • localStorage: 0/1. Allow the program to store informations in the navigator's localStorage cache system. For instance, allow to store the list of folders and files displayed in the treeview so a refresh of the page will be faster since the list is already known on the client's side,
    • server_session : 0/1. Do you want to cache informations (like the list of files/folders) on the server ?,
  • page :
    • google_font : specify here a Google font name like f.i. Roboto if you want to use such font. Please note : no fonts are downloaded. The script will just add a call to the font and will generate css to use the font for h1 till h6. You can do more by editing the custom.css file
    • img_maxwidth : if you wish to make sure that images can be displayed on screen and on printed documents, specify here a max width like f.i. 800 (pixels). If images will be bigger, they'll be resized in css,
    • jolitypo : 0 / 1. Allow to solve common typography issues (see https://github.com/jolicode/JoliTypo),
    • robots: use "noindex, nofollow" if you want that every .html pages generated by the program needs to be ignored by the search bot; let "index, follow" if you want to allow search engines to add your page in his results
  • site_name : will be used in the og:site_name meta property in every .html pages generated by the program,
  • slideshow :
    • bullet :
      • fontawesome: since Font-Awesome is used by MarkNotes, it's easy to provide a specific icon to use for bullet lists (unordered ones). Just type here the name of the icon to use (without the fa-). You can find icon's name here : http://fontawesome.io/icons/ (if you want rotating icons, just add fa-spin after the name so f.i. joomla fa-spin,
      • extra_attribute : need to add a special style to the bullet like f.i. style='color:#142849;', extra_attribute allows you to add anything to each li items,
    • type : remark or reveal. Define which type of slideshow should be used.
    • `reveal' : see https://github.com/hakimel/reveal.js/#slide-transitions
      • animation :
      • section :
        • extra_data_img_attr`: if mentionned (f.i. "data-background-size='800px 600px'" or "data-background-size='contain'"), this string of attributes will be applied to slide with a data-background-image (only in that case). By default : "data-background-size='contain'" is used to avoid disproportion (a small image stretched for filling the screen)
  • tag_prefix : you can use tags in your notes; it's just like a hash tag but the # can't be used, by default, the prefix will be §,
  • tags : (optional) a list of tags that you want to automatically select when the page is displayed so, if you wish to immediatly select a tag by opening the application, just type the tag here. Note : you can type more than one,
  • templates :
    • html : you want to use your own template for .html pages ? By setting here a name like my_own_html and by creating that specific file in the templates folder, the application will then use your own file,
    • pdf : same for html but for pdf exportation,
    • remark : see the slideshow->type setting, the remark template will be used if you've decide to use remark as slideshow functionnality,
    • reveal : see the slideshow->type setting, the reveal template will be used if you've decide to use reveal as slideshow functionnality,
    • screen : how the note should looks like within the interface (when displayed after having clicked on a note on the treeview),
    • timeline : the timeline template will be used with the ?task=timeline functionnality i.e. seeing notes in a timeline,
  • treeview:
    • default: If you wish to force the opening of a specific note each time your marknotes site is started. You'll need to specify the relative filename like this : subfolder/subfolder/notes.md (exemple : marknotes/how-to-use.md). The relative location start after your /docs folder. Specify each subfolders until the note. You'll also need to specify the filename (notes.md in this example)
  • languages :
    • en : here, you'll find each strings used by the application, in english.
    • fr : the French translation.
    • xx : add yours. You can create a new language just by addind a node for it, for instance it for Italian. Copy/Paste every strings and start the translation. Be sure that the encoding is correct i.e. you should escape every accentuated characters; to be sure, use an "html encoder" site and check your new .json file with f.i. jsonlint.com to be sure it's correctly encoded,