Skip to content

CoderDojoNavan/website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoderDojo Navan Website

This repostitory contains the new CoderDojoNavan website. It is statically generated by Hugo and deployed to Cloudflare Pages on pushes to main or any other branch


Contributing

Please follow the following guides depending on what sort of change you are doing. If you wish to create a new update or a page, please follow the Contributing Content Guide. If you wish to make changes to the layout, style, generation etc of the website please follow Website Improvement guide.

Regardless of what type of change you would like to do, please follow the following steps:

  1. Make sure you have a Github Account. If you don't, please register
  2. Make you change (either Content or Website)
  3. Submit your change for Review.

Contributing Content

Although this is harder than making a post on Wordpress or other Content Management System its not too complicated!

Remember: If something is not going according to your plan, contact someone for help!

Before I start with the steps let me quickly explain some jargon

  • Github - This website, stores all the code for the website and manages changes.
    • Fork - Your copy of the code
    • Pull Request - "Here are the changes I made (commits), can you please look at them"
  • Git - Tool used to store revisions of the code.
    • Commit - Single change to the code
    • Branch - Each branch is its own history of the code.
      • main branch - This is THE source of truth, and this is the code as it is looking right now
      • feature branch - Your change. Typically a single feature branch stores related changes.
    • Merge - Taking a change and updating the existing code
  • Hugo - Takes what you write and generates it into pages.
  • Markdown - Like HTML but much simpler. No need to write <h3>Section</h3>, but instead you can write ### Section. The best cheatsheet can be found here: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet

Step By Step

  1. Next to the green button < > Code towards the top of the page, click on Add File > Create new File.

  2. For the Name your file field, please put int the appropiate file:

    1. If you are making a new update/post, the name should start with content/posts/ then the current year, and finally current year - title.md, something like this: content/posts/<current-year>/<current-year>-<title>.md. eg. content/posts/2022/2022-autumn.md. Please make sure that there are not spaces in the name. If you want to make a break, please replace a space with -. The file MUST also end with .md.
    2. If you are making a top level page, the path should be content/<title>.md.
  3. For the page content, it must start with some basic information about the page. followed by the actual page content.

    ---
    # Everything after a # between the --- lines is a comment and can be ignored
    title: Title of the page or post/update
    # Current date. Must be in this format - yyyy-mm-ddThh-mm-ss+02:00
    date: 2022-09-08T00:37:12+02:00
    draft: false # If its set to true the page will not be generated
    
    # Only add the following line if you are making a page which you want to show
    # in the top of the navigation. This cannot be a post/update, just a normal
    # page.
    menu: top
    ---
    
    The content in the Markdown format. Do not include the title again as it will
    be added. If you want to put something on a line below, use double new line.
    eg.
    
    This is bad
    This is bad
    
    When viewing this will show as "This is bad This is bad"
    
    Good with extra new line in between
    
    Good with extra new line in between
    
    ## Section
    
    - list
    - another item on the list
    
    [Title of the link](https://address.of.the.link)
  4. In the Propose new file section:

    1. First is the commit name. Try to keep the message quite short, but still describing what it does. eg. 2023 Spring Class Post is a much better title than Make Change. If you have some details to add, please do so in the description.
    2. Desciption of the change, if any. Typically the commit name would be self explainatory.
  5. Press Propose New File. This should bring you to the Pull Request and you can continue to the Review section.

If you are still stuck and would like to see a video of how its done, here's one https://youtu.be/pTFN_KLW6a4?t=64 (watch from 1:04). I might record a video specific to this repository if it helps.


Website Improvement

I think you know how to clone the project and make changes, so I will skip this part, but after downloading hugo for your device you can preview the changes locally using this command:

hugo server -D

Commit you changes and push to a branch as normal, and proceed to Review


Reviews

So you made you change. Time for review. After you make your change and visit the the Pull Requests Page you should see your change there. If not, this might show on the Forked repository.

Make a new Pull Request. Try and keep the pull request message quite short, but still describing what it does. eg. 2023 Spring Class Post is a much better title than Make Change. If you have some details to add, please do so in the description.

Cloudflare Pages which is the host of the website should create a new comment with a preview link that you can use to make sure that the change you made showed up the way you envisioned. You can click on the link and it will bring you to a temporary website.

If you are not happy, you can edit the change. If you get a review saying that there is a typo, or something else is wrong, please change it. I will link a video tutorial on how to do it if I find it.

After the change is merged, you might want to Sync the Fork to make sure that you are not editing some old version in the future.

About

Project website for CoderDojo Navan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages