moodle / devdocs

Source of the Moodle Developer Resources and Documentation
https://moodledev.io/
Other
40 stars 288 forks source link

[feature] Add page change notifications #262

Open andrewnicols opened 2 years ago

andrewnicols commented 2 years ago

What do we need to do?

Provide a way for people to subscribe to changes to individual pages.

This should:

brendanheywood commented 2 years ago

The pain due to a lack of this is slowly growing. Is there any sort of workaround like rss feeds from github that we can document here?

acquaalta commented 1 year ago

I'm also would be very happy to see this feature implemented, since at the old dev Moodle Docs, there is an RSS feed.

BTW, I hope that by changes to pages you include the action of adding a new page to the site.

Thanks

scara commented 1 year ago

From the Moodle Dev Chat (2022-12-30T10:59):

Andrew Lyons: You can get rss feeds for any GitHub file by viewing the git commit history for that file and adding .atom to the url https://stackoverflow.com/questions/21986561/rss-to-a-github-file

acquaalta commented 1 year ago

scara c

Hi, I'm able to understand that this page: https://moodledev.io/general/releases is actually created or updated here: https://github.com/moodle/devdocs/blob/main/general/releases.md

But what I don't understand is how creating an RSS for a specific GitHub file would help people who want to know about new and updated pages to the devdocs.

Could you please clarify this issue? Maybe I'm missing something.

scara commented 1 year ago

Hi @acquaalta,

could you please clarify this issue? Maybe I'm missing something.

I just reported back the idea from the Dev Chat, e.g. if you have an interest in Moodle Policies you can have the related RSS feed as https://github.com/moodle/devdocs/commits/main/general/development/policies.md.atom :

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xml:lang="en-US">
  <id>tag:github.com,2008:/moodle/devdocs/commits/main/general/development/policies.md</id>
  <link type="text/html" rel="alternate" href="https://github.com/moodle/devdocs/commits/main/general/development/policies.md"/>
  <link type="application/atom+xml" rel="self" href="https://github.com/moodle/devdocs/commits/main/general/development/policies.md.atom"/>
  <title>Recent Commits to devdocs:main</title>
  <updated>2022-12-22T06:07:47Z</updated>
  <entry>
    <id>tag:github.com,2008:Grit::Commit/e3a4f6f0d7a56bb6e19ef0e08886fa3bf0ffb1f1</id>
    <link type="text/html" rel="alternate" href="https://github.com/moodle/devdocs/commit/e3a4f6f0d7a56bb6e19ef0e08886fa3bf0ffb1f1"/>
    <title>
        [docs] Migrate Web_services
    </title>
    <updated>2022-12-22T06:07:47Z</updated>
    <media:thumbnail height="30" width="30" url="https://avatars.githubusercontent.com/u/370047?s=30&amp;v=4"/>
    <author>
      <name>andrewnicols</name>
      <uri>https://github.com/andrewnicols</uri>
    </author>
    <content type="html">
      &lt;pre style=&#39;white-space:pre-wrap;width:81ex&#39;&gt;[docs] Migrate Web_services&lt;/pre&gt;
    </content>
  </entry>
  <!-- more entries... -->
</feed>

For your specific page:

You can subscribe to that feed in your client (or the specific Moodle Block) and you'll be notified for any new commit.

It could be a kind-of-hacking option, for those who want to follow the changes of some specific pages.

HTH, Matteo

andrewnicols commented 1 year ago

Hi @acquaalta,

All pages in the developer docs have their source in this repository.

The GitHub atom feeds allow you to generate RSS feeds for any URL which supports a list of commits.

In the examples above from Matteo, that's for one specific file, for example:

Since you can also view the commit history for any folder too, you can also generate an RSS feed for a folder, or even the entire repository. For example:

Subscribe to the changes to changes to, and creation of, new release notes:

Subscrube to all changes across the repository:

acquaalta commented 1 year ago

Subscrube to all changes across the repository:

Thanks a lot for the detailed explanation :-) I subscribed to the entire repository.