Skip to content

Commit

Permalink
Lint: Markdown and YAML files
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlelek committed Feb 2, 2025
1 parent 3ec6df4 commit c0a959f
Show file tree
Hide file tree
Showing 23 changed files with 506 additions and 487 deletions.
735 changes: 356 additions & 379 deletions HISTORY.md

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
Raneto [![Node.js CI](https://github.com/ryanlelek/Raneto/actions/workflows/nodejs.ci.yml/badge.svg)](https://github.com/ryanlelek/Raneto/actions/workflows/nodejs.ci.yml) [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B44615%2Fgithub.com%2Fryanlelek%2FRaneto.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B44615%2Fgithub.com%2Fryanlelek%2FRaneto?ref=badge_shield&issueType=license)
======
# Raneto [![Node.js CI](https://github.com/ryanlelek/Raneto/actions/workflows/nodejs.ci.yml/badge.svg)](https://github.com/ryanlelek/Raneto/actions/workflows/nodejs.ci.yml) [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B44615%2Fgithub.com%2Fryanlelek%2FRaneto.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B44615%2Fgithub.com%2Fryanlelek%2FRaneto?ref=badge_shield&issueType=license)

[![Raneto Logo](https://raw.githubusercontent.com/ryanlelek/Raneto/main/logo/logo_readme.png)](https://raneto.com/)

[Raneto](https://raneto.com) is a free, open, simple Markdown-powered knowledge base for Node.js.
[Find out more →](https://docs.raneto.com/what-is-raneto)
[Live Demo →](https://docs.raneto.com/)
[Documentation →](https://docs.raneto.com/)
[Documentation →](https://docs.raneto.com/)

# Top Features

- All content is file-based
- Search file names and contents
- Markdown editor in the browser
- Login system for edit protection
- Simple and Lightweight

# Mailing List

[Click here to join the mailing list](https://23afbd9f.sibforms.com/serve/MUIFAG1rmxtMH-Y_r96h_E7js7A7nUKcvP1fTNlIvKTMIzh7wD3u9SVbCiBc-Wo9TkSBADb2e3PEvAHWuXPMyUe_dEcdJsUihGQwDBX79nvS9bm3JYqyWOPjxacnexONo5yxNgHtnQKKG3JYtPS1LL1oejZ0rTchHzphtZuEbUJ3Hg6CimV69nbqhGKoNj-sPNhpvjSqgSIv3Zu0) for project news and important security alerts!

# License Report

[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B44615%2Fgithub.com%2Fryanlelek%2FRaneto.svg?type=large&issueType=license)](https://app.fossa.com/projects/custom%2B44615%2Fgithub.com%2Fryanlelek%2FRaneto?ref=badge_large&issueType=license)

Temporarily Removed Packages

```bash
"eslint-config-standard": "17.1.0",
```
8 changes: 4 additions & 4 deletions content/pages/community/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Sort: 2
Want to report a bug, request a feature, contribute or translate Raneto?
At the moment most things can be contributed via the main [Raneto GitHub repository](https://github.com/ryanlelek/Raneto).

* [Submit a bug report](https://github.com/ryanlelek/Raneto/issues?labels=bug)
* [Submit a feature request](https://github.com/ryanlelek/Raneto/issues?labels=enhancement)
* [Submit a pull request](https://github.com/ryanlelek/Raneto/pulls)
* Submit a language translation (TODO)
- [Submit a bug report](https://github.com/ryanlelek/Raneto/issues?labels=bug)
- [Submit a feature request](https://github.com/ryanlelek/Raneto/issues?labels=enhancement)
- [Submit a pull request](https://github.com/ryanlelek/Raneto/pulls)
- Submit a language translation (TODO)
3 changes: 1 addition & 2 deletions content/pages/community/credits.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Credits
-------
## Credits

- Raneto was created by [Gilbert Pellegrom](https://gilbitron.me)
- Maintained by [Ryan Lelek](https://www.ryanlelek.com) from [AnsibleTutorials.com](https://www.ansibletutorials.com)
Expand Down
4 changes: 3 additions & 1 deletion content/pages/community/related-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ Title: Related Projects
Sort: 9
---

This list contains additional projects that will help you deploy and run Raneto.
This list contains additional projects that will help you deploy and run Raneto.

# Themes

- [Default Theme](https://github.com/raneto/theme-default)

# Deployment

- [Deploy Raneto to your servers with Ansible](https://github.com/ryanlelek/raneto-devops) by [@ryanlelek](https://github.com/ryanlelek)
- [Run Raneto in a Vagrant container](https://github.com/draptik/vagrant-raneto) by [@draptik](https://github.com/draptik)
- [Deploy Raneto using Docker container](https://github.com/appsecco/raneto-docker) by [@madhuakula](https://github.com/madhuakula)
1 change: 1 addition & 0 deletions content/pages/community/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Sort: 9
---

# Raneto Roadmap

- Join the [Roadmap Discussion](https://github.com/ryanlelek/Raneto/issues/374)
2 changes: 1 addition & 1 deletion content/pages/community/showcase.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Sort: 8

**Are you using Raneto in the wild?**
We'd love to see it.
Add your site to the [Raneto Showcase](https://github.com/ryanlelek/Raneto/wiki/Raneto-Showcase).
Add your site to the [Raneto Showcase](https://github.com/ryanlelek/Raneto/wiki/Raneto-Showcase).
5 changes: 3 additions & 2 deletions content/pages/deployment/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ Sort: 8

# Containers (Docker)

Official Raneto container images on [Docker Hub](https://hub.docker.com/r/raneto/raneto/tags)
Official Raneto container images on [Docker Hub](https://hub.docker.com/r/raneto/raneto/tags)

Run the default container, and access on [localhost:3000](http://localhost:3000)
`docker run --rm -it --publish 3000:3000 raneto/raneto:latest`

Same as above, but provide your own content and configuration
Same as above, but provide your own content and configuration

```
docker run --rm -it --publish 3000:3000 \
--volume \
Expand Down
5 changes: 4 additions & 1 deletion content/pages/deployment/production-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ Heroku and other services handle this for you, but you can implement your own re
**See [Related Projects](%base_url%/related-projects) for deployment scripts to use on your own servers**

## Listening Port

You can change the listening port anytime by setting the environment variable in your shell's profile, or running in-line as below:
`$ PORT=1234 npm start`

## Listening Host Address / IP

### Defaults

Raneto listens only to localhost (`127.0.0.1`) traffic by default now (v0.17.0).
This is to prevent unintended exposure and access of your documentation.
Previous versions before v0.17.0 would bind to all IP addresses, which could accidentally make documents available on the public internet.
Previous versions before v0.17.0 would bind to all IP addresses, which could accidentally make documents available on the public internet.

### Override

To override the default IP host, please look above at an Nginx reverse proxy to access `127.0.0.1` or you can manually set the IP Host (private or public) setting the Environment Variable `HOST` somewhere.
`$ HOST=192.168.0.10 npm start`
4 changes: 3 additions & 1 deletion content/pages/deployment/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Sort: 8
---

# Default Password
Make sure you edit the default username and password in your `config.js` file.

Make sure you edit the default username and password in your `config.js` file.

```
##### WARNING #####
// You MUST change the username and password for security
Expand Down
1 change: 1 addition & 0 deletions content/pages/deployment/updating-raneto.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The update process for Raneto is as follows:
1. Make a backup of your `content` folder and your `config.js` outside of your project.

1. (Optional) If you have edited the template, backup the following paths:

- the `themes/default/` folder
- any edited files in the `public` folder

Expand Down
5 changes: 4 additions & 1 deletion content/pages/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ ShowOnMenu: true
---

# Markdown Reference

If you want to embed links and images, you'll need to use the Markdown syntax.
[See this Markdown Guide](https://www.markdownguide.org/cheat-sheet)

# Essentials

Visit the [Example Repo](https://github.com/raneto/example)
See the [installation guide](https://docs.raneto.com/install/installing-raneto) for more information.
See the [installation guide](https://docs.raneto.com/install/installing-raneto) for more information.

# Links

- [Configuration](https://docs.raneto.com/usage/configuration)
- [Production Notes](https://docs.raneto.com/install/production-notes)
- [Deploying to Heroku](https://docs.raneto.com/tutorials/deploying-raneto-to-heroku)
Expand Down
3 changes: 2 additions & 1 deletion content/pages/install/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ Sort: 1
---

To run Raneto you need to have [Node.js](https://nodejs.org)

- **v23.x.x** (Current)
- **v22.x.x** (LTS)

Please use the latest version available of the above major Node.js releases to ensure you have the latest security fixes!
Please use the latest version available of the above major Node.js releases to ensure you have the latest security fixes!

Here is a [list of services](https://github.com/joyent/node/wiki/Node-Hosting) that provide
hosting for Node.js projects if you are looking to publish your knowledgebase online.
4 changes: 4 additions & 0 deletions content/pages/news.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ ShowOnMenu: true
# Raneto News

## April 30th 2024

### Changes

- v0.18.x is bringing big updates to modernize Raneto
- Separated theme + Raneto for easier customization
- Dependency upgrades across the board

### Upcoming

- Slimming down the project. After 10+ years, some packages are either no longer needed or not maintained
- Official support for containers (Docker, Podman)
- Complete revisit of the documentation
78 changes: 39 additions & 39 deletions content/pages/tutorials/customizing-the-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Templating in Raneto is powered by [Mustache](https://mustache.github.io/). All
be found in the `themes/default/` folder. Feel free to customize the template as you wish. The template structure
is as follows:

* `layout.html`: The parent template. You'll probably want to customize this first
* `home.html`: The homepage template. Shown if you don't have an [index.md](%base_url%/usage/custom-homepage)
* `page.html`: The template used for single pages
* `search.html`: The template used for search results
* `error.html`: Shown when Raneto encounters an error or can't find a page
- `layout.html`: The parent template. You'll probably want to customize this first
- `home.html`: The homepage template. Shown if you don't have an [index.md](%base_url%/usage/custom-homepage)
- `page.html`: The template used for single pages
- `search.html`: The template used for search results
- `error.html`: Shown when Raneto encounters an error or can't find a page

Remember you will need to restart the app after changing the template.

Expand All @@ -20,23 +20,23 @@ Some features can be enabled on your pages by changing settings in the `config.d

### Enable Table of Contents

In `config.default.js` set `table_of_contents` to `true`. Raneto uses
[markdown-toc](https://github.com/jonschlinkert/markdown-toc) to generate
the table of contents on pages, so you can customize the appearance of the
tables of contents by specifying values for parameters in
In `config.default.js` set `table_of_contents` to `true`. Raneto uses
[markdown-toc](https://github.com/jonschlinkert/markdown-toc) to generate
the table of contents on pages, so you can customize the appearance of the
tables of contents by specifying values for parameters in
the `table_of_contents_options` object in `config.default.js`.

### Display Site Menu on Pages

In `config.default.js` set `menu_on_pages` to `true`.
To make the menu collapsible, so that category headings can be expanded or collapsed -
To make the menu collapsible, so that category headings can be expanded or collapsed -
useful for sites with lots of pages - set `menu_on_pages_collapsible` to `true`.

## Public Files

All static files in Raneto (images, CSS, JavaScript files, etc.) are served from the `public` folder.
This is so that no one can access any other files in the install.
Only files in the `public` folder are available to visitors that are not logged in.
Only files in the `public` folder are available to visitors that are not logged in.

It's worth noting that when customising Raneto you should always make your
own files rather than customizing the existing Raneto files,
Expand All @@ -48,45 +48,45 @@ Below are a list of template variables available to use in their respective temp

**home.html**

* `config`: Holds an array of values from `config.js`
* `pages`: Structured list of categories and pages (used for navigation)
* `body_class`: Class for the `<body>` tag
- `config`: Holds an array of values from `config.js`
- `pages`: Structured list of categories and pages (used for navigation)
- `body_class`: Class for the `<body>` tag

**page.html**

* `config`: Holds an array of values from `config.js`
* `pages`: Structured list of categories and pages (used for navigation)
* `body_class`: Class for the `<body>` tag
* `meta`: Holds an array of values taken from the page meta comment block (e.g. `meta.title`)
* `content`: The HTML content of the page
* `last_modified`: The formatted date of the time the file was last modified
- `config`: Holds an array of values from `config.js`
- `pages`: Structured list of categories and pages (used for navigation)
- `body_class`: Class for the `<body>` tag
- `meta`: Holds an array of values taken from the page meta comment block (e.g. `meta.title`)
- `content`: The HTML content of the page
- `last_modified`: The formatted date of the time the file was last modified

**search.html**

* `config`: Holds an array of values from `config.js`
* `pages`: Structured list of categories and pages (used for navigation)
* `body_class`: Class for the `<body>` tag
* `search`: The current search query
* `searchResults`: An array search results
- `config`: Holds an array of values from `config.js`
- `pages`: Structured list of categories and pages (used for navigation)
- `body_class`: Class for the `<body>` tag
- `search`: The current search query
- `searchResults`: An array search results

## Array Structure

The `pages` array has a structure similar to the following:

* `slug`: The category slug
* `title`: The category title
* `is_index`: True for the top level files (ie not in a category)
* `class`: CSS class
* `sort`: The sort index for this category
* `files[]`: Array of pages in this category
* `slug`: The page slug
* `title`: The page title
* `active`: True if the current page is "active"
* `sort`: The sort index for this page
- `slug`: The category slug
- `title`: The category title
- `is_index`: True for the top level files (ie not in a category)
- `class`: CSS class
- `sort`: The sort index for this category
- `files[]`: Array of pages in this category
- `slug`: The page slug
- `title`: The page title
- `active`: True if the current page is "active"
- `sort`: The sort index for this page

The `searchResults` array contains items which include:

* `slug`: The page slug
* `title`: The page title
* `body`: The page content
* `excerpt`: The page excerpt
- `slug`: The page slug
- `title`: The page title
- `body`: The page content
- `excerpt`: The page excerpt
12 changes: 6 additions & 6 deletions content/pages/tutorials/deploying-raneto-to-heroku.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Just follow the instructions.
Heroku works by deploying a Git repository to their servers.
So we need to make your Raneto install is a Git repository.
This also means you will need to commit any changes you make to Git before deploying them to Heroku.
Thankfully this is easy to setup:
Thankfully this is easy to setup:

$ git clone https://github.com/ryanlelek/Raneto.git
$ cd Raneto/
Expand Down Expand Up @@ -64,7 +64,7 @@ You should see Heroku go through its deployment steps and successfully deploy yo
Note that you will need to run the `git push heroku main` command after your commit changes every time you want to publish your Raneto site.

Finally we just need to make sure that we have one dyno running our `web` process.
This command only needs to be run this one time.
This command only needs to be run this one time.

$ heroku ps:scale web=1

Expand All @@ -75,7 +75,7 @@ You can now visit your live Raneto install in the browser by running the `heroku

## Further Reading

* [Getting Started with Node.js on Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs)
* [Process Types and the Procfile](https://devcenter.heroku.com/articles/procfile)
* [Dynos and the Dyno Manager](https://devcenter.heroku.com/articles/dynos)
* [Custom Domains](https://devcenter.heroku.com/articles/custom-domains)
- [Getting Started with Node.js on Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs)
- [Process Types and the Procfile](https://devcenter.heroku.com/articles/procfile)
- [Dynos and the Dyno Manager](https://devcenter.heroku.com/articles/dynos)
- [Custom Domains](https://devcenter.heroku.com/articles/custom-domains)
Loading

0 comments on commit c0a959f

Please sign in to comment.