| title | contributing @ OPN |
|---|
::: note This is a temporary workflow, in the future this process will be made easier, an on-line real time collaborative editor app will be provided. :::
Everyone can contribute to this notes and its relative website, at the moment, the only way to do that is through github repo contribution: this allows to track changes an attribution.
The basic steps are:
- install necessary software
- fork the repo
- make changes
- make a pull request
In case you have been added to the contributors, this reduces to:
- install necessary software
- make changes
- push changes
The server is written in typescript, we use node to execute our server so you have to download and install it. You can download it from nodejs.org.
::: warning
For Windows users.
You are advised to use the .msi installer that will take care of everything. In other cases, you might need to add node and npm to the system PATH in order to be able to easily execute all the steps
:::
You can use your preferred text editor, we suggest VSCode for its simplicity and integration.
If you use VSCode, you may be interested in the following plugins:
- Code Spell Checker for spell checking of your documents
- Markdown Emoji if you want to see emoji in VSCode default preview window
- SVG Editor
::: note We hope we can provide a VSCode extension soon to make it easier editing without starting the local server :::
Use your favorite git app, for example Github Desktop that is very simple to use
If you are not an approved contributor, you have to fork the project in order to make changes. Simply go to GitHub and fork the main repo
You can now clone the fork on your computer and start making changes.
You can now start editing the project. At the time of writing, the content is in the /content folder.
If you use VSCode, you may simply:
code .or, if you just want to edit something and ignore the rest of the project:
code ./content/path/to/some/article/folder/::: note
See the cheat-sheet
::: todo
tip
:::
:::
Remember to commit only the necessary content avoid committing temporary or unnecessary files. Avoid committing large files.
::: todo provide a way of sharing large files separately :::
To open a preview you need to execute the following commands:
npm install: this will download the necessary librariesnpm start: to open a server onlocalhost- on your browser, open http://localhost:8000/
::: note
if you edit a .md article, the web page automatically refreshes on file save.
:::
If you want the content to be visible to the local network you have to use:
node ./dist/print_network_interfaces.jsto get a list of network interfaces on your computer, for example:
VirtualBox Host-Only Network: fe80::545:11d:d85c:28b7 IPv6 false
VirtualBox Host-Only Network: 192.168.56.1 IPv4 false
Wi-Fi: fe80::70d3:9d84:8081:4513 IPv6 false
Wi-Fi: 10.0.0.101 IPv4 false
Loopback Pseudo-Interface 1: ::1 IPv6 true
Loopback Pseudo-Interface 1: 127.0.0.1 IPv4 true
::: todo
remove automatic language detection in code blocks!!!
:::
Choose the correct one, for example Wi-Fi and then:
(sudo) node ./dist/index.js Wi-FiYou can now access the website from the LAN. If you want to access it from the outside you can use localtunnel or enable port forwarding on your router.
When you like your changes, create a pull request so that your changes are merged into the website
You are now a contributor! 🎉🎉🎉
Your changes will be visible on the website soon! ✨