-
Notifications
You must be signed in to change notification settings - Fork 189
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
Need to specify the link in nav-bar #250
Comments
@azzamsa, glad you like the theme! We’re currently wrapping things up for the 2.0 release, so there are still some untied ends. We have also set up a new website for Elegant, where we host the theme’s documentation as well: https://pelican-elegant.github.io/ The feature you are asking about still needs to be documented, and the issue for it is here: https://github.com/Pelican-Elegant/documentation/issues/23 In short, hard-coding was a limitation of Elegant due to the dependency on Tipue Search. The change in #186 was a compromise between Pelcan’s flexibility and Tipue Search’s inflexibility. Since you’ve done some research on this already, but weren’t involved with writing the change in the first place, you’d be a perfect candidate to write that little piece. If you’re willing to volunteer, of course 😉 |
@azzamsa that's strange. You should not have to add these settings. See our code here https://github.com/Pelican-Elegant/elegant/blob/master/templates/base.html#L70-L72 Notice the
The code should have worked outside the box. Can you please,
|
@talha131 Sure I read those code carefully. So that I opened the issue here. I am using the latest version of this repo. I read the code carefully, even I modify archives.html, categories.html and other to have ability for hiding page with my custom metadata.
This is my source |
@silverhook yes. it's very neat and beautiful :). I migrated from octopress this morning after using it for about 2 year. Very happy today, because I understand what every files are doing. I don't have any ideas why those bunch of octropess exist. Have more control now with pelican :)
This conf and article examples help me a lot in this migration. It easier to see the real world example. Those "real" source really helped A LOT.
Sure, I love python, I may take a look at this. |
@azzamsa Thanks for the quick response. I need the source code of your blog. What you have pointed me towards, is the generated html. I need the repository which has your markdown files and pelican configuration in order to reproduce the issue at my end. |
@talha131 Indeed that was the "source". I put them together with the output in Github, in different branch. One for source files, another for output |
@iranzo if possible can you spare some time for this? I tested it cursory on my end but failed to reproduce the issue. I will revisit it later, but meanwhile please look into it if it's not a trouble for you. |
I would say, based on getpelican/pelican#1111 that 'defaults' are empty, so as we do use them we should use a comparison and use ARCHIVES_URL or 'archives.html' instead on those ocurrences |
I am lost here. I thought If we change |
AFAIK, it should, if @azzamsa confirms, I'll use the source files he indicates without the variables he indicated in this post to test |
modified pelicanconf.py
@@ -6,9 +6,9 @@ AUTHOR = 'azzamsa'
-TAGS_URL = 'tags.html'
-CATEGORIES_URL = 'categories.html'
-ARCHIVES_URL = 'archives.html'
+# TAGS_URL = 'tags.html'
+# CATEGORIES_URL = 'categories.html'
+# ARCHIVES_URL = 'archives.html'
modified templates/base.html
@@ -73,9 +73,9 @@
- <li {% if page_name == 'archives' %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ ARCHIVES_URL|default('archives') }}">Archives</a></li>
- <li {% if page_name == 'categories' %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ CATEGORIES_URL|default('categories') }}">Categories</a></li>
- <li {% if page_name == 'tags' %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ TAGS_URL|default('tags') }}">Tags</a></li>
+ <li {% if page_name == 'archives' %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ ARCHIVES_URL|default('archives.html') }}">Archives</a></li>
+ <li {% if page_name == 'categories' %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ CATEGORIES_URL|default('categories.html') }}">Categories</a></li>
+ <li {% if page_name == 'tags' %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ TAGS_URL|default('tags.html') }}">Tags</a></li> HTTP request indicates that the file found
|
While testing #270 , I've tried removing the values for: #TAGS_URL = 'tags.html'
# CATEGORIES_URL = 'categories.html'
# ARCHIVES_URL = 'archives.html' by commenting them and it worked fine. Please note that my updated files for 270 were rebased against master, so not sure if there was any other missing commit there Categories, archives and tags does work and the default is the 'folder' so /categories/ /tags/ or /archives/ @azzamsa can you test the files attached to 270 and revalidate this issue? |
Dunno what happened. Tried:
Nothing works. Maybe the error comes from my local machine. |
Check too with the tarball on 270 |
When running the 'untouched' pure tarball. It can't work, page not found. I have to uncomment the commented line from you. |
That's my diff for your pelicanconf: -TAGS_URL = 'tags.html' And the tarball uploaded again, with 'standard' Elegant pelican theme (without customizations): rm -Rfv themes plugins When running make devserver, the generated page has working ccategories, archives and tags, and the url shown in my browser is: http://localhost:8000/archives |
Hi, iranzo / tmp azzamsa ls
azzamsa.github.io azzamsa.github.io-v2.zip
iranzo / tmp azzamsa cd azzamsa.github.io/
iranzo test / tmp azzamsa azzamsa.github.io ls
content output peru.yaml publishconf.py requirements.txt themes
Makefile pelicanconf.py plugins __pycache__ tasks.py
iranzo test / tmp azzamsa azzamsa.github.io make devserver
pelican -lr /tmp/azzamsa/azzamsa.github.io/content -o /tmp/azzamsa/azzamsa.github.io/output -s /tmp/azzamsa/azzamsa.github.io/pelicanconf.py
-> Modified: content, theme, settings, [static]theme/images, [static]images. re-generating...
Done: Processed 19 articles, 0 drafts, 0 pages, 0 hidden pages and 0 draft pages in 0.59 seconds.
127.0.0.1 - - [16/Jan/2019 14:55:45] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [16/Jan/2019 14:55:45] "GET /theme/css/style.min.css?8bdcf96a HTTP/1.1" 304 -
127.0.0.1 - - [16/Jan/2019 14:55:46] "GET /archives HTTP/1.1" 200 -
127.0.0.1 - - [16/Jan/2019 14:55:47] "GET /categories/ HTTP/1.1" 200 -
127.0.0.1 - - [16/Jan/2019 14:55:49] "GET /tags HTTP/1.1" 200 -
127.0.0.1 - - [16/Jan/2019 14:55:50] "GET /archives HTTP/1.1" 304 -
Still works for me on a new temporary folder being created for this. If you've pipsi installed can you try with latest pelican version and use make devserver which uses the pelican builtin server? |
Strange, So, if |
As far as I know browser will read index.html if it read a folder, this same behavior of jekyll, when we created pages about. it created about-dir/index.html. I suspect devserver handle this 'magically'. |
I always did make devserver, tested and then make github and it worked, but it's easy for you to give it a try :-) |
DONE. Summary:
Even if non direct link didn't work with I think pelican had already handle non direct link magically. If I am not mistaken. Thank you for all the help, thanks a ton for very very kind and supportive, Elegant team. 🎉 |
Thanks a lot @iranzo. Great job. |
Hi
I saw some issue about this. The original code using "hard coded" .html url. Then someone change it to non hard code.
It took me long time to read the issue and searching the web. Till I find this solution
It works after I specify
Why it doesn't work by default, at least for me ? Am I missing something ?
Thank you for this beloved theme :)
The text was updated successfully, but these errors were encountered: