Giter Club home page Giter Club logo

nuitka-website's Introduction

Nuitka Website

Nuitka Logo

Thanks

Please help and improve this in all ways, typos, better looks, more information, etc. all is appreciated and necessary.

Right now, this is very much possible to improve. Your turn!

Usage

Container

The recommended way to edit this is using Visual Code and devcontainers. You will be amazed at how easy it actually is to contribute changes in this way. There is also a manual way described below, but this is the recommended approach.

  1. Have a GitHub account. This is free and easy, most if not all developers these days have an account like this. Sign up if you want to be able to submit your edits.

    https://docs.github.com/en/get-started/quickstart/creating-an-account-on-github

  2. Download and install Visual Code. This page has a download button. It won't matter if you are on Windows, macOS, or Linux, all will work equally well. just install it for your OS.

    https://code.visualstudio.com/

  3. Launch Visual Code.

    Note

    Cloning is a term used in version control, meaning you create a local copy of a central repository and git is a tool used for it. Do not worry much about those things, Visual Code hides it away from you largely.

    On its welcome page, there is a button "Clone Git repository" which executes the command "Clone from GitHub" and there you paste https://github.com/Nuitka/Nuitka-website.git and it will show a description of the repo, and you confirm a target folder, where you create a folder names "Nuitka-website.git", it then asks if you want to open it, and yeah, you want to do that. It will also ask if you trust the authors, and you can accept that. It then will be able to do more convenience things for you.

    Once you do that, it prompts you "Folder Contains a Dev Container configuration file" and suggests to re-open. This is on a timeout, after a minute, this goes away. Say yes, or re-open the project in Visual Code.

  4. Container start

    When starting, what it will do is to download a small container image of Ubuntu, which is a popular Linux from Microsoft server and run a few commands to customize the image, and become able to build and render the pages of the web site.

    Note

    Do not worry, that this is Linux, you won't have to notice or do anything different at all. The container image is automated and Visual Code will deal with git for you.

    After some time, it will prompt you to open a localhost (your machine) 8080 port browser window in your standard browser, and you can use it to navigate the website. Everything but the shop parts will work, since these are not included in the repo, and secret (using private keys).

  5. Making your change.

    Once you edit a page, e.g. doc/index.rst what happens is that a launches a rebuild of the website each time you modify. If you happen to have a browser open with that page, once it completes it will reload.

    Some kinds of changes, e.g. to the CSS theme, or if you change what JavaScript is included, may require a relaunch. You then use the command "Dev Container: Rebuild container" and then it takes a short moment, and is fully fresh again. For normal page edits of the restructured text, no such issue exists.

  6. Staging your change

    In the Visual Code there is a section "Source Control" where you may already know your way, but it will display the list of changes you made. What you do here, is to create commits. You add changes, and can look at the difference, by clicking them, which opens new windows. The staged parts then can be added with a message. You see that there is an indication in your bottom bar, if you have those.

  7. Create a Pull Request.

    By selecting the command GitHug Pull Requests: Create Pull Request, visual code will guide you through the process of making a PR out of your pull request.

  8. Communicate about your pull request. You will be informed of a URL, and it will be e.g. like this: TBD and once your change has been reviewed, you might get asked to make some changes to it, where you open the project and just make them. And update the pull request, or you get informed about the merge of it.
  9. Success.

    None of this is strictly difficult. You almost have a bit of "what you see is what you get" editing, but the website is text driven on purpose, such that collaboration on it is very easy, and that we can change to underlying tools easily.

Manual

This is used to build the Nuitka web site. Enhancements of all kinds are welcome. You will need python 3.10 and pipenv to build it.

# Creates a virtualenv with all that is needed to develop the
# site.
python3 -m pip install -U invoke
python3 -m invoke virtualenv

# Now lets build the site, to see if it's all correct.
python3 -m invoke doc

# Optionally build the localized sites.
python3 -m invoke intl -l zh_CN
python3 -m invoke intl -l de_DE
...

# Post processing, e.g. adds language switcher, compact
# JS/CSS, adapts external links, and more.
python3 -m invoke run -t post-process

# Start local web server with the site, and do automatic
# rebuilds. Localization are rebuilt if they were previously
# built.
python3 -m invoke run -t serve-site

# Browse it (Linux)
xdg-open http://localhost:8080
# Browse it (Windows)
explorer http://localhost:8080

Usage of Sphinx

So the site is basically mostly an automation of importing a few files from the Nuitka git repository, splitting up e.g. the Changelog.rst into pages, with otherwise using Sphinx to render it. Reference the Sphinx documentation and esp. the one for Read the Docs theme and ABlog.

Restructured Text (REST)

Restructured text is a format very similar to Markdown, which some of you may already know, but with more features. You can check out the syntax here.

https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html

Sphinx Theme

We are using the customization of "read the docs" things theme. We use this

https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html

The current configuration is in shared_conf.py and relatively empty, we might want to explore and document our choices for some of these options.

Blog with ABlog

We are using a sphinx extension called ABlog that can create the RSS feeds and pages of the Nuitka blog.

https://ablog.readthedocs.io/en/stable/manual/ablog-configuration-options.html

New posting

Create the *.rst file similar to e.g. doc/letting-go-of-c11.rst and then execute this

Translation

Translations of the Nuitka website are very welcome. We have a team for those want to work on it, with push rights to the repository. Right now a translation branch is used, but the plan is for it to be merged, and to provide the infrastructure in the main branch.

Here is a table of the files to translate and their styles. Everything that is not mentioned here, should be asked about if in doubt. Not all pages make sense to translate.

Important

Before translating, I would love you to also actually review the content, if you agree it makes sense, if it can be better structured. This is very much needed unfortunately.

Note

There are plans to get rid of pages and doc sub-folders of the site folder doc. For URLs, these are plain bad, and would e.g. be much better as python-compiler and the like. A plan will be devised and put into place, but it will just move and renamed pages.

Directory posts/

At this time, the blog posts, esp. old ones should not be translated. I believe often new content will be created in post form, and then moved over to pages for translation. A current example are tutorial style pages including screenshots, which depending on how the e.g. Python installer look in your language, Explorer and shell prompt, even screenshots might have to be translated. This will come only later though.

Page pages/donations.rst

Yes, please go ahead. Let me know if there is any need to hint Paypal, or when Paypal is not available in your country, what alternative ways we could use.

Page pages/overview.rst

Please hold off from this one. It currently is just a duplicate of content that is just the same in index.rst and not linked anywhere, so please ignore it for now.

There is a plan to have a "feel good" cross road entry page, that will lead to the kind of page, that the home page is right now.

Page pages/pyside2.rst

Very important kind of page, of which I want to have more. Nuitka links itself to this from the plugin, and it's a landing page to inform users about troubles that can be expected. We want to have some boilerplate for this, and a general way of adding these. These user hint pages are where I think we ought to help the users from real Nuitka to find the information, and even localized for their needs.

Page pages/support.rst

This one is not mentioning the Discord server yet, I will add that soon though. Very important page that should be linked to from many places.

Page pages/gsoc2019.rst

This is historical information, translation makes no sense, not sure what to do with it. But if Nuitka were to do it again, we would translate it ideally for the next time.

Page pages/impressum.rst

This one is required by law in my country, translators might want to add their information here. I cannot take responsibility for the content of translations, as I cannot verify it in many cases.

Page pages/Presentations.rst

This one probably should get more love content wise. It's under construction. I want to go over the blog and link all information from there. But if you are aware of material in your language, please go ahead and add it.

Page Streaming.rst

Since this about an English offer, not sure it makes sense, I will also update it in near future somewhat, but making clear it's going to be an English content, I think it ought to be translated on a basic level at the beginning of the page, and then have untranslated content?

Page doc/api-doc.rst

Translation makes no sense and cannot be done currently anyway. The API doc is going to be generated with Spinx, Doxygen docs are without love.

Page doc/commercial.rst and folder commercial

Translation is very welcome. There will be more content added over time. For payment options, please check out if they work for your country and if not, help me find alternatives. I was e.g. rejected for AliPay in China, but maybe other things can work. And Russia e.g. has no Paypal (which I mean to add as an alternative still).

Page doc/factory.rst

Very useful to have it translated.

Page doc/welcome.rst

This is just a playground for me, do not translate, unless we want to play around with translation mechanics. We will want to e.g. have an intelligent language switcher at some point, and could try it out there.

Page doc/Changelog.rst

Do not translate, this is a bizarre amount of work.

Page download.rst

Very welcome, but beware that download.rst.j2 is the real source. Tables are generated into the document, this is probably a harder case technically, so hold off until this is sorted out.

Page developer-manual.rst

Makes no sense to translate. But potentially there is content that belongs to user manual in there or should be split off.

Page roadmap.rst

Much like changelog, not as much work, but also not as important.

Page doc/user-manual.rst

This one is most important in my mind, optimization section needs a serious update from my side, maybe ignore that, until I get there. Review applies here very much. I think Tutorial parts might be factored out to separate documents.

How to translate

# Generate the .pot files
cd intl
make gettext

# Generate .po files from .pot
sphinx-intl update -p ../output/gettext -l your_language_code

Under locales in the folder with the language code you will then have many .po files. In the .po file you can see msgid and below it msgstr. msgid contains the english original, in msgstr you can write the translation. If you then want to transfer your changes via PR, please commit only the files you have translated.

Image Optimization

# Optimize PNG files like this, normally not needed, this
# is lossless.
sudo apt-get install optipng
find . -iname *.png -a -type f -exec optipng -o7 -zm1-9 {} \;

# Optimize JPEG files like this, normally not needed, this
# is lossless.
sudo apt-get install jpegoptim
find . -iname *.jpg -a -type f -exec jpegoptim {} \;

nuitka-website's People

Contributors

biblicabeebli avatar bingdom avatar bksahu avatar dependabot[bot] avatar deronnax avatar dmitrii-galantsev avatar fire-cube avatar gabeklavans avatar gunungpw avatar ijustlovemath avatar jorjmckie avatar josh596 avatar kayhayen avatar marco-perin avatar marta-matvii avatar oz123 avatar podsvirov avatar stsav012 avatar timhoffm avatar tommyli3318 avatar treylav avatar xinetzone avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.