{"id":14988572,"url":"https://github.com/thomastjdev/nim_websitecreator","last_synced_at":"2025-03-17T15:12:21.542Z","repository":{"id":32433834,"uuid":"132656268","full_name":"ThomasTJdev/nim_websitecreator","owner":"ThomasTJdev","description":"Nim fullstack website framework - deploy a website within minutes","archived":false,"fork":false,"pushed_at":"2024-02-23T08:37:23.000Z","size":7914,"stargazers_count":176,"open_issues_count":13,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-17T15:12:16.738Z","etag":null,"topics":["2fa","2factor","blog","blog-engine","bulma","firejail","gravatar","libravatar","material-design","nim","nim-lang","recaptcha","totp","webframework","webp","webpage","website","wordpress"],"latest_commit_sha":null,"homepage":"https://nimwc.org","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThomasTJdev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-08T19:37:07.000Z","updated_at":"2025-02-08T12:34:18.000Z","dependencies_parsed_at":"2023-11-19T07:25:19.812Z","dependency_job_id":"90687f46-d160-429b-a57f-6617e755288b","html_url":"https://github.com/ThomasTJdev/nim_websitecreator","commit_stats":{"total_commits":1652,"total_committers":8,"mean_commits":206.5,"dds":0.3710653753026635,"last_synced_commit":"fe5d5d55648d571206be5b5c00fab6f6a9266b87"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fnim_websitecreator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fnim_websitecreator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fnim_websitecreator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fnim_websitecreator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThomasTJdev","download_url":"https://codeload.github.com/ThomasTJdev/nim_websitecreator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056425,"owners_count":20390719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2fa","2factor","blog","blog-engine","bulma","firejail","gravatar","libravatar","material-design","nim","nim-lang","recaptcha","totp","webframework","webp","webpage","website","wordpress"],"created_at":"2024-09-24T14:16:57.819Z","updated_at":"2025-03-17T15:12:21.523Z","avatar_url":"https://github.com/ThomasTJdev.png","language":"Nim","readme":"# Nim Website Creator\n\nA quick website tool. Run the nim file and access your webpage. Website: [https://nimwc.org](https://nimwc.org)\n\n\u003cimg src=\"private/screenshots/NimWC_logo_shadow.png\" style=\"max-height: 250px; display: block;\" /\u003e\n\n![](https://img.shields.io/github/languages/top/ThomasTJdev/nim_websitecreator?style=for-the-badge) \n![](https://img.shields.io/github/stars/ThomasTJdev/nim_websitecreator?style=for-the-badge)\n![](https://img.shields.io/github/languages/code-size/ThomasTJdev/nim_websitecreator?style=for-the-badge) \n\n\n# Features\n\n* Blog with custom meta-information and URL's\n* Security - 2FA, Firejail, reCAPTCHA\n* Fully customizable - log viewer, custom JS \u0026 CSS\n* Plugins with many features\n\n**See more in FEATURES.md**\n\n\n# Requirements\n\nTo get started you only need:\n\n- Nim \u003e= `1.6.14` (tested with +`2.0`)\n\nOptional dependencies (disabled by default):\n\n- webp (`libwebp`) (only required when using [WebP](https://github.com/juancarlospaco/nim-webp-tools))\n- firejail \u003e= `0.9.58` (only required when using [Firejail](https://github.com/juancarlospaco/nim-firejail))\n- Xvfb (`xorg-server-xvfb`, required by firejail setting `noX=`)\n- **When using Firejail and enabling/disabling a plugin a manual full restart of NimWC is required.** It is therefore not advised to enable/disable plugins in the browser when using Firejail.\n\n\n# Install\n\n## Install Nim\n\nTo compile and install you need [Nim](https://nim-lang.org/). You can easily install Nim using [choosenim](https://nim-lang.org/install_unix.html) with:\n\n```\ncurl https://nim-lang.org/choosenim/init.sh -sSf | sh\n```\n\n## Install NimWC\n\nYou only need to perform 1a **or** 1b  **or** 1c - not both of them.\n\n\n### 1a) Install with Nimble\n\n\u003cdetails\u003e\nIf you are using [Nimble](https://github.com/nim-lang/nimble) an executable will be generated and symlinked to `nimwc`, which then can be executed anywhere on your system.\n\n```bash\n# Install nimwc with nimble\nnimble install nimwc\n\n# Edit the config.cfg accordingly\n# (change the confg.cfg path to your nimble folder and the correct package version)\nnano ~/.nimble/pkgs/nimwc-[PACKAGE-VERSION]/config/config.cfg\n\n# Run nimwc\n# (to add an Admin append the arg \"newadmin\": nimwc --newadmin)\n# (to include some standard pages: nimwc --insertdata)\nnimwc\n\n# Login\n127.0.0.1:7000/login\n```\n\u003c/details\u003e\n\n\n### 1b) Compile\n\n\u003cdetails\u003e\n\nThis will generate the executable in the folder.\n\n```bash\n# Clone the repository\ngit clone https://github.com/ThomasTJdev/nim_websitecreator\ncd nim_websitecreator\n\n# Generate and edit the config.cfg accordingly\ncp config/config_default.cfg config/config.cfg\nnano config/config.cfg\n\n# Compile\nnimble -d:release build\n\n# Run nimwc\n# (to add an Admin append the arg \"newadmin\": nimwc --newadmin)\n# (to include some standard pages: nimwc --insertdata)\n./nimwc\n\n# Login\n127.0.0.1:7000/login\n```\n\n\u003c/details\u003e\n\n\n### 1c) Curl\n\nThis will guide you through the installation.\n\n```\ncurl https://raw.githubusercontent.com/ThomasTJdev/nim_websitecreator/master/devops/autoinstall.sh -sSf | sh\n# OR\ncurl https://raw.githubusercontent.com/ThomasTJdev/nim_websitecreator/master/devops/autoinstall.sh -sSfLO \u0026\u0026 echo \"6cc7510305db7b0ae5e3755137e71c23c7e08829264ddfb82702e6cac297f1063b46c48c01eafb16156c27a53aa23d1737c34f354ae1834c8498f5bd64b81b3c autoinstall.sh\" | sha512sum -c - \u0026\u0026 sh ./autoinstall.sh\n```\n\n\n# Use\n\n## Arguments\n\nThese arguments should be prepended to executable file, e.g. `./nimwc cdata`\n\n* `--showconfig` = Show parsed INI configuration and compile options.\n* `--newadmin` = Add the Admin user.\n* `--gitupdate` = Updates and force a hard reset.\n* `--initplugin` = Create plugin skeleton inside tmp/.\n* `--vacuumdb` = Vacuum database and continue (database maintenance).\n* `--backupdb` = Compressed full backup of database.\n* `--backupdb-gpg` = Compressed signed full backup of database.\n* `--newdb` = Generates the database with standard tables (does **not** override or delete tables). `newdb` will be initialized automatic, if no database exists.\n* `--insertdata` = Insert standard data, e.g `--insertdata bulma` (this will override existing data)\n  * `bulma` = Use Bulma CSS, No JS required (official design) [Default official theme]\n  * `bootstrap` = Use Bootstrap and jQuery\n  * `water` = Water CSS framework, No JS, HTML Classless (No classes on HTML required)\n\n\n## Compile options:\n\nThese options are only available at compiletime:\n\n* `-d:rc` = Recompile. NimWC is using a launcher, it is therefore needed to force a recompile.\n* `-d:adminnotify` = Send error logs (ERROR) to the specified admin email.\n* `-d:dev` = Development.\n* `-d:devemailon` = Send email when `-d:dev` is activated.\n* `-d:demo` = Used on public test site [Nim Website Creator](https://nimwc.org). This option will override the database every 1 hour with the standard data.\n* `-d:gitupdate` = Updates directly from Git and force a hard reset.\n* `-d:postgres` = Use Postgres database instead of SQLite.\n* `-d:packedjson` = Use [PackedJSON](https://github.com/Araq/packedjson#packedjson) instead of [std lib JSON](https://nim-lang.github.io/Nim/json.html). Performance optimization.\n\n\n# User profiles\n\nThere are 3 main user profiles:\n* User\n* Moderator\n* Admin\n\nThe access rights below applies to main program. Plugins can have their own definition of user rights.\n\n\u003cdetails\u003e\n\n## User\n\nThe \"User\" can login and see private pages and blog pages. This user has no access to adding or editing anything.\n\n## Moderator\n\nThe \"Moderator\" can login and see private pages and blog pages. The user **can** add and delete users, but cannot delete or add \"Admin\" users. The user **cannot** edit JS, CSS and core HTML - only within the pages and blogposts.\n\n## Admin\n\nThe \"Admin\" has access to anything.\n\n\u003c/details\u003e\n\n# Blog\n\nYou can easily add and edit blogpages. The blogpages support metadata: meta description and meta keywords. It is also possible to specify a category and tags.\n\n\u003cdetails\u003e\n\n## Blog sorting\n\nIn the settings menu you can specify how your blogposts should be sorted, e.g. on modfied date in ascending order.\n\n## Blog searching\n\nTo only show blogpost with a specific name, tag or category, you have to append the criteria to the URL. It is not possible to combine these.\n\n```\nwebsite.com/blog?name=nim\nwebsite.com/blog?category=article\nwebsite.com/blog?tags=code\n```\n\n\u003c/details\u003e\n\n# Plugins\n\nMultiple plugins are available. You can download them within the program at `\u003cwebpage\u003e/plugins/repo`.\n\nThe plugin repository are located here: [NimWC plugin repository](https://github.com/ThomasTJdev/nimwc_plugins)\n\n\n# Shortcuts\n\nWhen editing a blogpage or a normal page press Ctrl+S to save.\n\n\n# DevOps\n\n\u003cdetails\u003e\n  \u003csummary\u003eDocker, Vagrant, SystemD Service, NGNIX, Admin stuff, etc\u003c/summary\u003e\n\n**Docker**\n\n- [Use the Dockerfile](https://github.com/ThomasTJdev/nim_websitecreator/blob/master/devops/docker/) as starting point for your NimWC containers.\n- You can run the build_docker.sh and run_docker.sh scripts without changing anything to try out nimwc.\n\n\n**Vagrant**\n\n- [Use the Vagrantfile](https://github.com/ThomasTJdev/nim_websitecreator/blob/master/devops/Vagrantfile) as starting point for your NimWC VMs.\n\n\n**NGNIX Config**\n\n- [Use the NGNIX Config file](https://github.com/ThomasTJdev/nim_websitecreator/blob/master/devops/config_nginx_default.cfg) as starting point for your NGNIX Server configuration.\n\n\n**Google reCAPTCHA**\n\nTo activate Google reCAPTCHA [claim you site and server key](https://www.google.com/recaptcha/admin) and insert them into `config.cfg`.\n\n\n**SystemD**\n\n- [Use the SystemD Service file](https://github.com/ThomasTJdev/nim_websitecreator/blob/master/devops/nimwc.service) as starting point for your NimWC SystemD Services.\n\nCopy the file `nimwc.service` into `/lib/systemd/system/`\n\n```\nsudo nano /lib/systemd/system/nimwc.service\n```\n\nEnable auto start of NimWC:\n\n```\nsudo systemctl enable nimwc\nsudo systemctl start nimwc\nsudo systemctl status nimwc\n```\n\n\n**CI Builds**\n\n- [YAML Build templates for several Linux Distros (SourceHut).](https://github.com/ThomasTJdev/nim_websitecreator/tree/master/devops/sourcehut#whats-this)\n\n\n**CrossCompiling, Build for old Linux**\n\nSometimes you may need Build for very very old Linux, like old Centos and Debian Old Stable,\nfrom a recent Linux, like new Arch or Ubuntu,\nheres how you can do it, without a virtual machine with an old Linux to build.\n\n- https://github.com/wheybags/glibc_version_header#glibc-version-header-generator\n- https://github.com/phusion/holy-build-box#system-for-building-cross-distribution-linux-binaries\n- https://github.com/dockcross/dockcross#dockcross\n\n\u003c/details\u003e\n\n\n# How to Firejail\n\nOptional dependency.\n\n\u003cdetails\u003e\n\n- Default settings will work Ok on most systems, sane defaults.\n- Some settings are kind of technical, you should know some Linux Kernel related stuff.\n- Links are provided on the Firejail config page when makes sense.\n- You can harden your system even more by tweaking the Firejail config.\n- You can always come back to the default settings and it will work Ok.\n- Check that Firejail Status at bottom of the page is mostly green.\n\nYou can choose how much CPU \u0026 RAM NimWC can use,\nFirejail will make NimWC believe that theres less CPU \u0026 RAM that the actually physically available.\nIf you choose too small resources for too big load,\nthen it will feel like when you try to run a heavy program on a VirtualBox with too small CPU \u0026 RAM,\nbut will still run, or do the best to try to run.\nThis can be useful for Clouds that charge you extra when you pass certain threshold of CPU \u0026 RAM usage.\n\nNimWC does not depend on any Hardware device to run, like audio, video, USB, DVD, etc,\nso you can block the access to the hardware peripehals,\nthat also blocks its hardware drivers and libraries that may have vulnerabilities, making your NimWC more secure.\n\nThere are options to block root user and the rest of the users on the Linux system,\nthats help protect your NimWC against Privilege Scalations,\nthats when an unprivileged normal user becomes superuser root, or an user can see other users stuff.\n\nCaches and Temporary directories are mounted as private temporary unique autogenerated TMPFS,\nmeaning that the real ones can not be altered from within NimWC.\n\n`noMnt=true` is for when you run 1 instance NimWC per server,\n`noMnt=false` is for when you run multiple instances NimWC per server,\nbecause it may or may not block other instances of accesing subfolders on `/mnt/` simultaneously.\n\n`noX=false` if you are running a headless server or ChromeBook.\n`noX=true` uses `Xvfb` for X Isolation (`xorg-server-xvfb`),\nyou may need to install it if you want to use it, but is not a hard dependency,\njust use `noX=false` and you dont need to install it if you dont want to.\n\nThe features come from the Linux Kernel itself,\nso theres zero cost on performance and the technology is already there even if you use it or not.\n\nSo in conclusion NimWC being compiled binary wont need access to most of your system,\njust its own folder, the integration with Firejails hides everything else.\n\n### Install\nYou local version of firejail to needs be \u003e= `0.9.58`. Install using your package manager:\n```\n# Arch (package manager)\nsudo pacman -S firejail\n\n# Ubuntu (built files)\nhttps://launchpad.net/ubuntu/+source/firejail/0.9.58-1 # \u003c-- download\nsudo apt install ./firejail_0.9.58-1_arm64.deb\n\n# Compile\ngit clone https://github.com/netblue30/firejail.git\ncd firejail\n./configure \u0026\u0026 make \u0026\u0026 sudo make install-strip\n```\n\u003c/details\u003e\n\n\n\n# Resources\n\n- [NimWC Logo, high quality, PNG.](https://github.com/ThomasTJdev/nim_websitecreator/tree/master/public/images/logo)\n- [NimWC Presentation Slides, HTML5 3D, English.](http://htmlpreview.github.io/?https://raw.githubusercontent.com/ThomasTJdev/nim_websitecreator/master/docs/nimwc-presentation-presentation.html)\n- [NimWC Presentation Slides, HTML5 3D, Spanish.](http://htmlpreview.github.io/?https://raw.githubusercontent.com/ThomasTJdev/nim_websitecreator/master/docs/nimwc-presentation-es-presentation.html)\n- [NimWC Telegram Stickers on the Nim Pack.](https://t.me/addstickers/nimlang)\n\n\n\n# Videos\n\n[\u003cimg src=\"https://img.youtube.com/vi/3R1l4Ha0tDI/maxresdefault.jpg\" width=\"99%\"\u003e](https://youtu.be/3R1l4Ha0tDI \"NimWC Video!\")\n\n\n# Stars\n\n[![Stars over time](https://starchart.cc/ThomasTJdev/nim_websitecreator.svg)](https://starchart.cc/ThomasTJdev/nim_websitecreator \"Star NimWC on GitHub!\")\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomastjdev%2Fnim_websitecreator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomastjdev%2Fnim_websitecreator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomastjdev%2Fnim_websitecreator/lists"}