openmultiplayer / web Goto Github PK
View Code? Open in Web Editor NEWThe open.mp web services monorepo. Homepage, documentation, server index, and more! All in one place.
Home Page: https://open.mp/
The open.mp web services monorepo. Homepage, documentation, server index, and more! All in one place.
Home Page: https://open.mp/
MDXProvider puts a wrapper around markdown content, but it shouldn't apply to next-mdx-remote content using hydrate
, only .mdx files inside the pages/ directory.
This is because those pages style themselves using custom layout, but .mdx files need padding etc.
In my submission, open.mp The language options on the home page need to be modified.
"zh-TW": "正體中文/繁體中文",
"zh-CN": "简化字",
For most other websites, the distinction between simplified and traditional characters is as follows
"zh-TW": "繁体中文",
"zh-CN": "简体中文",
A section for editors with guides on how to set them up.
This is really a small and unimportant thing, but Warnings and Tips are only read on the wiki if they have the English key tag, which means that they cannot be translated. (Warnings, Tips, Caution etc.)
As I said, it is literally a small thing, but it is still an unusual part in the middle of a translated page.
Some work needs to be done to style documents nicer. Currently it's just a font with defaults.
Quick overview of how styles work:
Inside frontend/styles/
there is a file named base.css
and this is the base CSS that will be applied globally to the whole site. This is where to set styles for basic typographic elements such as h1
, p
, etc...
In the source code, there are two additional styling approaches:
display: grid
elements and other specific things. This is generally only used for complex layouts and again should not be used for typography and style.base.css
should not contain classes, or if it does, they should be bound to an element type. Generally you should only be styling typographic elements in this file.
I checked with some codeowners and the same happened with them.
This is something quite important to the open.mp project: making it easy for communities around the world to access and use open.mp software and documentation.
The wiki site uses Docusaurus v2 and there is currently no internationalisation support: facebook/docusaurus#3317 so we can either wait for support to land or start to introduce translations for pages then migrate to whatever Docusaurus implements when it's ready.
Edit:
For now, use this: https://github.com/openmultiplayer/wiki/blob/master/docs/translations/README.md
Categorize the long list of functions.
To footer
This issues will be updated everytime someone made ID translation updates on wiki.
I took lists from #196 migrating from openmultiplayer/wiki#263
Hallo semuanya, disini aku meminta bantuan kalian untuk membantu aku untuk menerjemahkan wiki ini dengan bahasa indonesia, namun sebelum memulai membantu ada hal yang harus di sampaikan terlebih dahulu agar nantinya tidak salah dan tidak asal-asalan.
Oh iya, ini akan selalu di update setiap ada yang translate indonesia di wiki, mau siapapun itu.
Tinggal komentar aja dibagian mana yang di update atau mention nanti bakal di merge secepatnya.
Itu saja yang bisa aku kasih tau, terimakasih telah membantu memberdayakan wiki ini 👏
List Translation Pages:
client
meta
scripting/callbacks
scripting/functions
scripting/language
scripting/resources
scripting/resources/_server
tutorials
I ran across https://web.archive.org/web/20190415202208/https://wiki.sa-mp.com/wiki/Words and initially thought it had no real value but I realised it does, and it needs to be improved.
New scripters often have no idea of all the new vocabulary introduced, not just by programming, but by SA-MP.
Currently the language select causes a 404 on docs pages.
What needs to happen is the language select should be based on what translations are available for the current page. Then, when the page is navigated to, grab the locale
from context and read the translated file on getStaticProps
.
During build, we can probably also build a list of all possible translations of each page by trying to walk the same tree with docs/translations/...
prefixing the path.
These pages are the only thing that use next-mdx and it would simplify everything by just removing it and using our existing MDX infrastructure for rendering.
So, the blog posts need to be moved to content/en/blog and then we can either make the index renderer [...].tsx
so it matches any path or make a new [slug].tsx
in pages/blog/
The latter would be simplest and only touch blog code. The former will be slightly more complex but more future proof.
The benefit of doing this is that blog posts can then be translated simply by writing the translated version into the same directory structure in another language directory. We should also add a fallback warning just like docs.
Essentially, all the static content of the site will now be rendered the same way - using the mdx-helpers functions.
Potential auth methods:
I'd rather not store passwords tbh, email magic link would be a good first implementation, and github login isn't too difficult to implement.
Would like some feedback on this from users regarding their preferred methods of authenticating.
Docs pages are currently case sensitive - because the site is run on a linux environment which is case sensitive.
Not entirely sure how to solve this one. Probably just lowercase everything or do a glob search at build time...
Each page needs an "Edit this page" button that just directs to GitHub using the same file with /edit/
in the path.
The x,y coordinate is the top left coordinate for the text draw area based on a 640x448 "canvas" (irrespective of screen resolution).
I think it should be 640x480
.
Nav currently just has Home, Servers and Docs - which is nice and minimal, but there's also some temporary links to add:
Currently, most pages are pulled from the API at render time in order to reduce build times. Unfortunately, this means that pages added via pull request don't get built and are missing when previewed - this kind of defeats the purpose of using Vercel now, at least for documentation contributors. The preview tool is vital for catching formatting errors for documentation markdown.
So, the solution for this that doesn't involve 20+ minute build times is to pass a set of pages to getStaticPaths
which are any files modified in the current diff against master
branch inside the docs/
directory.
Hopefully this won't be too hard:
VERCEL_ENV
git diff master HEAD --name-only -- docs
to get a list of files that this current PR touched in docs/
getStaticPaths
This issue contains a checklist of Polish translations, so everyone who wants to contribute can check which pages are missing. You can also discuss here about translation quality or notify me, if I haven't updated the list with your contribution yet.
Tutaj znajdziesz listę kontrolną polskiego tłumaczenia, więc każdy kto chce pomóc może sprawdzić, których stron brakuje. Można tutaj także dyskutować o jakości tłumaczenia lub powiadomić mnie, jeżeli jeszcze nie zaktualizowałem listy z Waszymi zmianami.
meta
scripting/callbacks
scripting/functions
scripting/language
scripting/resources
scripting/resources/_server
tutorials
Clicking link
on Related Functions
may result 404 because didn't remove .md
part.
These need to be ported from the old homepage, as well as for docs, but that's a little more complicated so it deserves its own issue.
These originally were using remark admonitions but this doesn't work any more because the plugins run before the elements are executed so this means it just results in the raw :::warning
text instead of the actual typographic elements.
Possible solution: finish #7 so they have styles, then just make the VersionWarn component ouput a raw HTML (JSX) admonition.
I noticed a odd issue with the masterlist on the website.
My server recently moved to a new ip. I added the new ip to the masterlist via the ip/domain add feature. My old ip that is no longer used shows the server as online, and the new ip seems to have been removed.
Old Ip:167.114.104.51:7777
New: 149.56.185.92:7777
OBS: Alguns arquivos serão marcados como NDA (Necessita de Atualização) mesmo após serem marcados como traduzidos.
Caso deseje contribuir, verifique-os também!
client
meta
server
scripting/callbacks
scripting/functions
scripting/reference
scripting/language
scripting/resources
tutorials
The current nav is fine on mobile, but it won't fit any more buttons on it so we need a mobile friendly nav for more options.
For users to edit their listing and augment it with additional information like a description, images, graphs, etc.
That verification process must be as simple as possible and cover as many users' skill levels.
Here are some ideas:
curl
/wget
/Invoke-WebRequest
command that the user calls from their server that includes a unique token to prove they own itannounce.exe
binaryA lot of our files use English and a lot use American-English.
Consistency is important and it seems American-English is winning in terms of numbers. Also the natives themselves use AE.
The NPC API has been missing from the wiki for a while.
I don't think it deserves its own section, but definitely needs admonitions on each page to indicate the APIs are only for use within NPC scripts.
https://web.archive.org/web/20190808191615/https://wiki.sa-mp.com/wiki/Category:NPC
The NPCs (Non-Player Characters, also known as 'bots') are a feature introduced since SA-MP 0.3. This new feature allows you to add one or more NPCs inside your server who will work like 'virtual players'. They use a server slot, just like a player would do. What the NPCs do inside your server is scripted using PAWN scripts. The scripts with the 'artificial inteligence' of each NPC isn't scripted inside the gamemode file, nor in a filterscript. They use their own compiled scripts for this task, which have to stay inside the npcmodes directory. That is, if you want to have 20 different NPCs doing different things, you will most likely have to have 20 pawn compiled scripts inside the npcmodes directory. This doesn't mean that you can't use the normal player functions applied to your NPCs (like SetPlayerPos, for example) from inside a gamemode or filterscript.
Each NPC runs in its own process. This can make better use for multi-core proccesors. The new NPC feature adds some more callbacks and functions which can be used just inside NPC scripts. Normally, these scripts just include the a_npc include file, and not the a_samp one as most gamemodes and filterscripts do. There are also a couple of added functions which work in gamemodes and filterscripts to make easier the NPC handling.
The following resources are exclusive for NPC scripts, unless otherwise is stated:
Add below 'This function does not work for train' also 'This function will return 0 if a player isn't near (10mt or less) the vehicleid specified'.
I know a lot of people didn't expect or understand the reason for the sudden website change, so I'll quickly explain that here as I don't think it's written down all in one place:
There were primarily two problems:
open.mp
domain. The wiki was not hosted on a domain, but we had to make it work on open.mp/docs
so it used HTTP rewrites to achieve that. All 404s were rewritten to wiki.openmultiplayer.vercel.app
which ran the wiki in order for assets on /
on both sites worked. This meant 404s on the main site were confusing. It also meant that page loads resulted in at least one HTTP rewrite and maybe two HTTP redirects. Also wiki.open.mp
introduced more complexity. It was a big mess that just so happened to work!So the new site was built very quickly in order to serve those of the community who wanted to browse the documentation without a supercomputer and those who wanted to contribute to the wiki without waiting 20 minutes for a preview to build.
As a result, it's quite plain looking. Functionality comes first! And yes I'm working on search.
So with that out of the way...
This is a good opportunity to get the community involved. Post your design idea/inspiration here and we can open a discussion about what the new site can look like!
Here's a list of assets:
#8477b7
#dfdfdf
#2c2d2d
My browser language is set to Italian, so if I go on open.mp/ it'll redirects me to open.mp/it.
When I click the language selection button to select the English language, it won't redirect to open.mp/en but instead it redirects to open.mp/
Steps to reproduce the bug:
Cloudflare's docs site does this:
Basically, each category heading also needs its own page. So you can link to a collection of pages easily, like /functions or /callbacks.
But, as a bonus, it would be really neat to be able to write custom content for these pages too. So maybe introduce a special page that can exist inside each directory named _index.mdx
or something where you can write text and then underneath this text is an automatically generated list of pages.
Urdu translation progress:
Client:
Meta:
Server:
Callbacks:
Functions:
Language:
Tutorials:
I think this just needs styling, there are classes that admonitions are given so you just need to style those.
Don't put this in base.css, make a new file and import it into _app.tsx
This won't affect admonitions done via though, that needs another solution... #8
What
3 ideas to help with making the tutorials more effective. Some of these may apply to the rest of the docs as well.
I don't believe the capability to embed pawn fiddles exists as of now. In any case, links to tutorial fiddles can be helpful in providing a faster feedback loop when reading about a subject.
Check your understanding sections would be simple multiple choice/fill in the blanks questions that serve the same purpose as the fiddles. Could be done simply by putting the correct answers within a spoiler tag or by adding some functionality into the docs that would check for right answer, etc. Practically, the spoiler seems to be the winner but the built-in docs option would, in my opinion, lead to more engagement/better results.
Topics in tutorials can always, if not for the most part, be classified into those two categories. There would be no restriction for a topic to have both theory and application, but for the most part you're always applying some concept that you can link back to. Here too, I can think of two ways of supporting it:
The first one is the easier to put in place, but the benefit of grouping these can prove useful as more tutorials are added.
Why
The better readers of a tutorial grasp the concepts at play, the better. I believe I have offered some good arguments above as to how these additions would improve the effectiveness of tutorials. I have also tried to include different ways that they could be implemented, with their advantages/disadvantages.
Curious to see your feedback on this: eager to see additions/modifications/removals, or comments.
The site needs search support.
Docsearch doesn't seem to work so we can just build our own index at build time.
#22 is for the site itself, but docs pages also need to generate their own title/description meta tags.
This can be done by parsing the frontmatter.
Not sure where to do this yet. Probably at build time.
Something about props destructuring on undefined. Doesn't happen in local dev, only in prod. Possibly next.js bug or something up with mdx remote hydrate
This wasn't added because it requires a github token, but I want to keep build logs public so contributors can debug things.
So, I think we should move the actual GitHub query to the backend - just to simplify the frontend so it doesn't have an API component.
Or move it to a simple cloudflare worker or something.
Need to swap out img
for Image
in MDXContext
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.