Code Monkey home page Code Monkey logo

Comments (15)

hell03610 avatar hell03610 commented on August 17, 2024 1

you mean how to make a production build? I translated the contribution guide, so it's step 4 on https://github.com/VLCTechHub/VLCTechHub-site/blob/master/CONTRIBUTING.md#-building-the-website

Let me know if you have any other question!

from vlctechhub-site.

jantznick avatar jantznick commented on August 17, 2024

My Spanish is not the best(although I'll give it a try), would you mind giving me some generic phrases you'd like on the 404 page?

from vlctechhub-site.

hell03610 avatar hell03610 commented on August 17, 2024

maybe something like

Title: "404 - Página no encontrada"
Main message: "Oh no! No hemos podido encontrar la página que has pedido, pero no te vayas sin descubrir los [eventos](link to /) de la agenda local o las últimas [ofertas de trabajo](link to /job/board/) publicadas."

Like that the user has two direct links to the most visited pages!

from vlctechhub-site.

adrienluitot avatar adrienluitot commented on August 17, 2024

Hello :D
@jantznick Do you want to take this issue ? Otherwise I think I can do it ;)

(And I think for the open source it could be cool to translate the .md files into english :D)

from vlctechhub-site.

hell03610 avatar hell03610 commented on August 17, 2024

(It makes total sense that the .md files are in english, thanks for pointing it out, i'll change them asap)

from vlctechhub-site.

jantznick avatar jantznick commented on August 17, 2024

@adrienluitot go right ahead you can do it!

from vlctechhub-site.

adrienluitot avatar adrienluitot commented on August 17, 2024

Nice @hell03610
@jantznick If you know how to do it, you can do it. Because I didn't succeed to install the site on my computer x)
I have some trouble with the api and the db apparently.

from vlctechhub-site.

hell03610 avatar hell03610 commented on August 17, 2024

@adrienluitot I feel that everybody is using the production build to run the website locally, because setting up the api repo is not very straight forward and having the production website locally is fine as long as you are not testing creating new events or job offers, which are the only "write" actions :D

from vlctechhub-site.

adrienluitot avatar adrienluitot commented on August 17, 2024

Hmm yeah, how can I do so ?
Otherwise there is this : https://surge.sh/help/adding-a-custom-404-not-found-page

from vlctechhub-site.

adrienluitot avatar adrienluitot commented on August 17, 2024

So, I arrived to build it but I had to edit build.js, I don't know where I have to put NODE_ENV=production.

But I still have a problem, I can't make a new page in the root of data, I have an error concerning scss:
Error: [metalsmith-sass] Error: File to import not found or unreadable: abstract/functions. -> /home/user/Downloads/VLCTechHub-site/data/404/assets/css/main.scss:3:1

from vlctechhub-site.

hell03610 avatar hell03610 commented on August 17, 2024

You shouldnt need to change build.js, supposing you already have yarn installed, in order to build the website you need to run the yarn commands:

> yarn install 
> yarn run build

That will build a development site and will expect that you have the api installed locally.
To build it for production, in your command line execute:

> yarn install
> NODE_ENV=production yarn run build

And the site will be built with the production api.

from vlctechhub-site.

hell03610 avatar hell03610 commented on August 17, 2024

As for the error, I would need more info of what you have created/modified in your branch.

But just some guessing on the steps done:
To create a new page in data, let's say we create data/foobar.njk, and then:

1 - Extend from the default template - https://github.com/VLCTechHub/VLCTechHub-site/blob/master/data/job/new.njk#L2
2 - Add some main content - https://github.com/VLCTechHub/VLCTechHub-site/blob/master/data/job/new.njk#L6

When the site is built, the page will be served at localhost/foobar/ with is actually localhost/foobar/index.html. I know there is a way to say to metalsmith to create the page as localhost/foobar.html but i dont remember now. This is what I suppose we need, as surge needs the page to be named 404.html

from vlctechhub-site.

jantznick avatar jantznick commented on August 17, 2024

I was able to get it running only on a specific version of node(I think 8 something) but it worked for me just fine running
NODE_ENV=production yarn run build

from vlctechhub-site.

adrienluitot avatar adrienluitot commented on August 17, 2024

Okay I'm sorry I had to add a bit of code on the top of the page to say that 404.njk is a page ^^

from vlctechhub-site.

adrienluitot avatar adrienluitot commented on August 17, 2024

Seems Done ! I'll make a PR. 😄

from vlctechhub-site.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.