Skip to content

cltl/cltl.github.io

Repository files navigation

NEW The site is now published through GitHub actions when you push changes onto the main branch. Source docs are now kept on the main branch.

Goal of these GitHub pages

The goal of this repository is to document and organize all our repositories, regardless of their maturity or level of activity: all repositories are welcome, whether they accompany a publication or published software, or whether they are work in progress, or even premature repositories. The GitHub pages are thus not only intended for finished, presentable code, but also for repositories that might otherwise be forgotten, and become deadwood.

If you create a CLTL repository, mention it in these pages!

README and ME

This repository contains two README files:

  • this README contains information on the GitHub setup of this website, and instructions to modify the content and commit changes.
  • The README located in src was generated by Docusaurus. It provides additional information on content modification and pointers to the Docusaurus documentation.

Contributing to this website

Instructions to add and modify these pages are provided below. Before pushing changes, you may want to

  1. work on a separate branch to avoid merge conflicts (see next)
  2. deploy the website locally

Collaborative setup

Clone this repository

$ git clone https://github.com/cltl/cltl.github.io
$ cd cltl.github.io

Or update its contents to the latest version

cltl.github.io$ git checkout main
cltl.github.io$ git pull

You should make changes in a local branch to prevent clashes when pushing your commits. Create a local branch, e.g. mybranch:

git checkout -b mybranch    # or git switch -c mybranch

You can now access and modify the content in docs. You will find below instructions on:

When you are ready to commit, you can check the website locally following these instructions.

Now you can commit your changes on mybranch, go back to the main branch, update its contents and merge your commit:

git add --all
git commit -m "message for your commit"
git checkout main
git pull 			# in case somebody else pushed new commits in the meantime...
git merge mybranch 

If somebody else made a commit while you were busy, you might have to resolve conflicts when merging mybranch (and merge your changes manually).

Push your changes to the main branch when you are done.

git push 

The website should be published automatically after a few minutes.

You can now delete mybranch by running:

git branch -d mybranch

Modifying an existing page

Content pages

You will find content pages under docs/<category>/<page-title>. These are markdown files that you can edit.

Adding a page to an existing category

You will find that category's folder under docs/<category>. Add a markdown file <page-name>.md for your page there. The name is not important, as it is the 'page id' that serves for linking documents through the site. The file should have the following header:

---
id: <page-id>
title: <page-title>
---

You should link this page by adding its category and id to the file sidebars.json. Subcategories for the sidebar can be specified directly in this file.

Adding a category section

We now have a number of categories: research, projects, resources, teaching and CLTL.

To create a new category:

  • Create a new folder under docs, e.g. new-category. This is not required for the website, but only to keep a clean project structure.
  • Add a new page for this category, e.g. new-page.md with id new-page.
  • Edit docusaurus.config.js to add a tab for that category in the navigation bar and link it to an index or a first document: look for themeConfig, and add a new item to the navigation bar.
  • Edit sidebars.json to create a page sidebar for this category.

Changing the website

Homepage

The index page for the website is located in src/pages/index.js. This is a React/Javascript file, that you can also edit.

Footer

The footer of the website can be modified through website/core/Footer.js. You can initialize a (separate) docusaurus project to get a richer example for the index or the footer.

Styling

See src/css/custom.css for colors, and src/pages/index.module.css for the homepage.

Deploying the site locally

Requirements

You will need Node.js version 18.0 or more.

Instructions

You can view the website locally (on http://localhost:3000) by running

npm start

About

CLTL organization site

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published