============== GNUnet Website ============== Sourcecode for https://gnunet.org created from the https://taler.net code base. Requirements ------------ - python3 modules: - jinja2 - babel - ruamel.yaml - BeautifulSoup 4 - python3 interpreter: - python 3.7 or later. - lxml - gettext - sassc, to compile the stylesheets general short buildsteps: ./bootstrap ./configure make 'configure' takes arguments, run ./configure --help or ./configure -h to find out what could be fitting for you. Generally configure tries to be smart about detecting names, if it doesn't find them for you, you should report this as a bug. GNU make operates on "GNUmakefile", "Makefile" is used by at least NetBSD make in this context (we do get a speed improvement by writing different files with different structures optimized for the make implementation). Running "make" builds the HTML. Expect its output to show up in rendered/en/ and other language folders. Run the following to start a python webserver: make run or BROWSER=firefox make run Layout / how this comes to be ============================= config.mk autogenerated file by taler-build-scripts static/ contains images, css, PDFs, robots.txt, team-images static/navbar.css CSS for the navigation bar (common/navigation.j2.inc) static/styles.css CSS for the rest of the website template/ the flat namespace of html.j2 files dist/ 3rd party content (bootstrap 4, font-awesome) common/ jinja2 templates. template.py operates on template directory and produces output in 'rendered/' directory news/ One file per news post. See also "Writing News" The 'dist' and 'static' directories will be copied to the output directory ('rendered/') in the 'all' phase of make. robots.txt is copied to relevant folders. Writing News ============ Writing news posts for gnunet.org involves a couple of steps. If you intend to write a new post, read this carefully. Note that this section will be worked into a separate onboarding section in the manual. * Every news post is wrapped in an
element, outside of the news post itself. * Every news post must have its headline in an

element. Ideally you don't use more than 1

in the news post. This can change in the future. The first h1 is what gets assigned as the title for the rss feed item for this post. * Every news post must get added as a dict to the newspost list in www.yml. If you are not sure what those words mean, search "newsposts" in www.yml. There you will find a structure where you have to add a new member. New posts get added to the top of the list, not at the bottom (this list is also responsible for the 5 newest entries on the frontpage). - page: 2019-0.12.0.html date: 2019-12-15 title: GNUnet 0.12.0 * page must be the name of the file without the leading news/ * date must be a valid date in exactly this format. * title can be any title but preferable equal to the title (

) in the file. * If you use website-internal links in your post, do not use plain href targets. Read template.py and grep for *url* to see what can be used and grep the rest of the pages for examples how to use these functions. * Last but least build the website locally and check if the news post renders correctly. Archiving Old News ================== To create an archive page with old news, copy one of the existing template/news/oldnews-*.html.j2 files and adjust the year in the "oldnews(...)" macro call. Developing with GNU Guix ======================== Creating an ad-hoc development environment containing all of the necessary software needed to build the HTML files can be easily done using the GNU Guix functional package manager. This can be achieved with the following command: `guix environment --ad-hoc coreutils bash python python-babel python-jinja2 gettext-minimal make -- bash` After installing the packages, this will drop you into a bash environment from which you can proceed to run "make". Alternative Build Method: Docker ================================ Run "make docker" to generate the HTML using a docker container-image (which will be built from the included ./Dockerfile). This could be useful if, for example, you are unable to install the required packages on your system, because it will use the container to install and run all of the required packages. Additional Notes ================ Please use HTML codes, not international signs as found on your keyboard. This website has been tested with: * python 3.7.1, Babel 2.6.0, py-jinja2 2.10 (pkgsrc, NetBSD 8.0) Since python development in collaborative environments with a whole range of possibilities in what your environment looks like, please state problems on the mailinglist instead of just fixing what *could* work for you. Thanks!