Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Migrate CSS_Coding_Style #697

Open
sarjona opened this issue Aug 10, 2023 · 4 comments
Open

[docs] Migrate CSS_Coding_Style #697

sarjona opened this issue Aug 10, 2023 · 4 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed migration Migration of a document from the legacy site

Comments

@sarjona
Copy link
Member

sarjona commented Aug 10, 2023

The URL of the page on https://docs.moodle.org/dev/

https://docs.moodle.org/dev/CSS_Coding_Style

Is this documentation specific to a Moodle version?

No

What location would you suggest in the new docs?

/docs/guides/styles or /general/development/policies/codingstyle/css

Related with #983

@sarjona sarjona added documentation Improvements or additions to documentation migration Migration of a document from the legacy site labels Aug 10, 2023
@sarjona sarjona added help wanted Extra attention is needed good first issue Good for newcomers and removed needs-triage labels Aug 10, 2023
@Arjun-A3
Copy link

Arjun-A3 commented Oct 1, 2023

hey @sarjona,
I would like to work on the above-mentioned problem
can you provide a bit more information about the documentation?

@sarjona
Copy link
Member Author

sarjona commented Oct 2, 2023

Hi @Arjun-A3!
In case you're interested in migrating some of the pages from the old wiki to the new devdocs, here you have the instructions:

  1. Install the devdocs requirements (basically yarn): https://moodledev.io/general/documentation/contributing#installation
  2. Clone locally the Github devdocs repository (https://github.com/moodle/devdocs).
  3. Run yarn install and yarn start commands (to start locally your devdocs project).
  4. Look at the issues in the github project (https://github.com/moodle/devdocs/issues or https://tracker.moodle.org/browse/MDL-79219) and pick one of them. You can also run the script ./scripts/wikimedia-sync.js fetch-todo to get the list of pages that still need to be migrated and then choose your favourite one.
  5. Run yarn migrate <wikimedia_page> <newpath> to fetch the content and adapt it from the Wikimedia format to Markdown. For instance, yarn migrate Admin_tools general/projects/api/admin-tools.md
    • Remember "docs" is for versioned pages depending on the Moodle version, like the APIs and "general" for unversioned pages, like the Coding style, the process or Tracker.
  6. Review the content, and improve it, to guarantee it's updated and has some of the nice Markdown features that Docusaurus includes (https://docusaurus.io/docs/markdown-features).
    • Remember to add a link to the proper sidebar (docs.js or general.js).
  7. Once you're happy with the migrated page, commit changes, push them to your repository and create a pull request to the devdocs project.

Before starting any migration, this is the "cheating sheet" to commit and push your changes:

git checkout main
git pull
git checkout -b branchname
yarn migrate <wikimedia_page> <newpath>
git add -A
git commit -m '[docs] Migrate xxxx page'
git push origin branchname
Create a pull request to the devdocs project

There are also a few tools that can help you:

A. To find the list of pending pages that need to be migrated (or marked as WillNotMigrate) you can run the following command from the root of the devdocs folder:

node scripts/wikimedia-sync.js fetch-todo

B. To mark as WillNotMigrate obsolete pages or pages that make no sense to migrate to devdocs, you only need to edit the legacy page and add the following code at the beginning:

{{Template:WillNotMigrate}}

C. When you review the code, remember you can add some of the nice admonitions: https://docusaurus.io/docs/markdown-features/admonitions to make it more readable.

D. There are a couple of useful commands, to check the links and the spelling:

yarn mdlint-all
yarn spell

@Arjun-A3
Copy link

Arjun-A3 commented Oct 6, 2023

hey @sarjona,
I am working on migrating css_coding_style but unfortunately, I am Stuck at the migrating stage
image
can you help me out here
I tried changing or commenting out the 183rd line yet it did not work.

@sarjona
Copy link
Member Author

sarjona commented Oct 6, 2023

Hi @Arjun-A3!
I would suggest ussing "`" , `styles_<theme name>.css`
If it doesn't work, you can also try to escape < using \ before it (so \< )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed migration Migration of a document from the legacy site
Projects
None yet
Development

No branches or pull requests

2 participants