This is the https://vlctechhub.org website repository. If you have any question you can contact with the maintainer team in the slack https://slack.vlctechhub.org, in the channel #vlctechhub
Do you think you found a bug or you have a new functionality to propose? Let us know!
-
Update to the most recent commit in master. It is possible the bug was already fixed.
-
Search for similar issues in the issues section, it is possible someone already reported the bug.
-
Open an issue. The more info you provide in the description, the easier will be to confirm it is actually a bug. That will let us act faster.
-
Provide a clear and detailed explanation of the functionality you would like to see implemented. Explain the reason why it is important. Bear in mind that we prefer functionalities that benefit the mayority of users instead of a small group of them.
-
After submiting the issue, it is possible that you try tocreate a pull request. If you can, start writing some code. There are always more more things to do than time to do them. If you can provide some code, it will make the process faster.
VLCTechHub website is developed with the static side generator Metalsmith.
- Install yarn
Yarn is a dependency manager in node. To install it, follow its instructions.
- Clone this repository
git clone [email protected]:VLCTechHub/VLCTechHub-site.git
- Install dependencies with yarn
Go into the newly created folder and install the dependencies.
cd VLCTechHub-site/
yarn install
- Build the site
The command build
constructs the site in the dist folder.
yarn run build
When the site is buld, VLCTechHub API is used. By default it uses the local API, that is, it expects the VLCTechHub api is running on localhost:5000
.
In order to build the website in production mode, we need to properly set the environment variable NODE_ENV
with the value production
:
NODE_ENV=production yarn run build
- Serve the website
The website is already built! Now we need to run a webserver on the folder dist. One easy way is to use the Python one from the command line.
With Python 2:
cd dist/
python -m SimpleHTTPServer 8080
With Python 3:
cd dist/
python3 -m http.server 8080
Now the website is available at http://localhost:8080
.
-
Clone this repository and the backend repository in the same folder.
-
In the site folder, just execute
docker-compose up --build
ordocker-compose up
if you have already build the project. Now, the site will be available athttp://localhost:8080
. -
The site needs to be manually build when a change is made in the code. To do so, just execute
docker-compose exec site yarn build
. -
If a new package needs to be added, it needs to be done also using the yarn inside the container, with:
docker-compose exec site yarn add [package]
.
We love pull requests! Here you have a brief guide about how to contribute:
-
Fork this repo
-
Introduce your changes following the syntax guidelines:
- Two spaces, no tabs
- Follow the conventions you already see in the code or run the linters for extra help.
yarn run lint
and yarn run prettylint
will list the offenses, if any. yarn run lint --fix
or yarn run prettylint --fix
to automatically fix the offenses of the linter.
-
Commit your changes. This repo uses a pre-commit to list all the offenses (in warning mode).
-
Pushe to your fork and create a pull request. Provide an explanation about why you have done those changes.
Metalsmith documentation can be found in its website.
The template sysmte used in this repo is Nunjucks, a simple-yet-powerful template language developed by Mozilla.
Template hierarchies are based in an article about component-oriented design patterns in Nunjucks.
In order to create a typical page in this repo we need two things: a template and some data to fill the template with. For example, every event page that you see in the built website are the data of one event with the template templates/event.njk
.
If you are creating a new page, chances are the template you need to use already exists. In that case, you just need to provide the data. The data will be often a markdown file with .md
extension inside the folder data
. Bear in mind that the strucutre and naming you choose for the files will determine the final url. It is also possible that the data is provided by a yaml file with extension .yml
and used in a template.
We have a visual style guide we try to follow for developing the site. It has the information about the colours, fonts, sizes, margins... You can find it in this link
If the template does not exists, create it inside the folder templates
and then use it following the above description.
To add or modify css, javascript and/or images use the folder assets
.